Skip to content

Commit

Permalink
fix: get rid of balanceOf
Browse files Browse the repository at this point in the history
  • Loading branch information
heswithme committed Oct 17, 2024
1 parent 950d17f commit 9b2d994
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions contracts/RewardsHandler.vy
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,9 @@ def _take_snapshot():
# supply in circulation = controllers' debt + peg keppers' debt
circulating_supply: uint256 = staticcall self.stablecoin_lens.circulating_supply()

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

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

0 comments on commit 9b2d994

Please sign in to comment.