Skip to content

Commit 9b2d994

Browse files
committed
fix: get rid of balanceOf
1 parent 950d17f commit 9b2d994

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

contracts/RewardsHandler.vy

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,9 @@ def _take_snapshot():
201201
# supply in circulation = controllers' debt + peg keppers' debt
202202
circulating_supply: uint256 = staticcall self.stablecoin_lens.circulating_supply()
203203

204-
# obtain the supply of crvUSD contained in the vault by simply checking its
205-
# balance since it's an ERC4626 vault. This will also take into account
206-
# rewards that are not yet distributed.
207-
supply_in_vault: uint256 = staticcall stablecoin.balanceOf(vault.address)
204+
# obtain the supply of crvUSD contained in the vault by checking its
205+
# totalAssets. This will also not take into account rewards that are not yet distributed.
206+
supply_in_vault: uint256 = staticcall vault.totalAssets()
208207

209208
# here we intentionally reduce the precision of the ratio because the
210209
# dynamic weight interface expects a percentage in BPS.

0 commit comments

Comments
 (0)