We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52bddd9 commit 7d39684Copy full SHA for 7d39684
1 file changed
contracts/main/Twocrypto.vy
@@ -1534,8 +1534,8 @@ def _calc_token_fee(amounts: uint256[N_COINS],
1534
if current_expiry > block.timestamp:
1535
# The penalty is proportional to the remaining protection time and the current pool fee.
1536
protection_factor: uint256 = min((current_expiry - block.timestamp) * PRECISION // self.donation_protection_period, PRECISION)
1537
- lp_spam_penalty_fee = protection_factor * fee // PRECISION
1538
-
+ # Penalty is also proportional to donation shares amount relative to max donations ratio.
+ lp_spam_penalty_fee = protection_factor * fee * self.donation_shares // self.totalSupply // self.donation_shares_max_ratio
1539
return fee * Sdiff // S + NOISE_FEE + lp_spam_penalty_fee
1540
1541
@view
0 commit comments