Skip to content

Commit

Permalink
fix: calc_token_amount correction
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoCentonze committed Mar 17, 2024
1 parent b43b327 commit 232ba08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/main/CurveStableSwapNGViews.vy
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def calc_token_amount(
else:
difference = new_balance - ideal_balance

xs = old_balances[i] + new_balance
xs = rates[i] * (old_balances[i] + new_balance) / PRECISION
_dynamic_fee_i = self._dynamic_fee(xs, ys, base_fee, fee_multiplier)
new_balances[i] -= _dynamic_fee_i * difference / FEE_DENOMINATOR

Expand Down

0 comments on commit 232ba08

Please sign in to comment.