liquity / bold

Ideas for improvements and enhancements in a Liquity v2.
https://www.liquity.org/liquity-v2
33 stars 6 forks source link

CS-BOLD-018 Informational 7.15: Small Redemptions Do Not Increase Base Rate #491

Open bingen opened 2 weeks ago

bingen commented 2 weeks ago

The function CollateralRegistry._getUpdatedBaseRateFromRedemption calculates the base rate from the share of bold tokens that are redeemed.

// get the fraction of total supply that was redeemed
uint256 redeemedBoldFraction = _redeemAmount * DECIMAL_PRECISION / _totalBoldSupply;

As the redeemedBoldFraction is rounded down, splitting a redemption into multiple smaller ones can reduce the fee paid. The most extreme case are redemptions with redeemAmount < totalBoldSupply / 1e18, which will have their fraction rounded to zero, meaning they will not increase the base rate at all. However, multiple redemptions will incur higher gas costs.

bingen commented 5 days ago

For “the most extreme case”, assuming a total supply of 10B (1e10 * 1e18), the redeem amount would be 1e10 wei, i.e. 1e-8 BOLD. It doesn’t make sense to redeem such amount, as the amount paid in gas would be much higher.