Skip to content

Commit

Permalink
Merge pull request #3 from bout3fiddy/fix/wrong_balances
Browse files Browse the repository at this point in the history
fix: remove IS_REBASING logic from _balances
  • Loading branch information
bout3fiddy committed Jun 26, 2023
2 parents 686298e + b6b90be commit 2c407b5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions contracts/main/CurveStableSwap2NG.vy
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,8 @@ def _balances() -> uint256[N_COINS]:
@dev This method ensures LPs keep all rebases and admin only claims swap fees.
"""
result: uint256[N_COINS] = empty(uint256[N_COINS])

if not IS_REBASING:
return self.stored_balances # only used for optimistic swaps
else:
for i in range(N_COINS):
result[i] = ERC20(self.coins[i]).balanceOf(self) - self.admin_balances[i]
for i in range(N_COINS):
result[i] = ERC20(self.coins[i]).balanceOf(self) - self.admin_balances[i]

return result

Expand Down

0 comments on commit 2c407b5

Please sign in to comment.