liquity / bold

Liquity v2 monorepo containing the contracts, subgraph and frontend.
https://www.liquity.org/liquity-v2
45 stars 13 forks source link

CS-BOLD-033 Informational 7.16: Upfront Fee Is Zero for Small Borrows #492

Open bingen opened 1 month ago

bingen commented 1 month ago

Note that the period is currently 1 week, and the weighted debt is equal to the trove debt times the average interest rate in the system.

Hence, the upfront fee is rounded to zero when

debt * averageinterestrate/52e18 < 0

When the average the interest rate is 0.5% (5e15), then anyone borrowing less than 10400 (52e18 / 5e15) wei pays no fees.

Similarily, the interest rate charged on small troves can be rounded to zero. For a trove with 1e8 debt and an interest rate of 5e15, updating the interest rate every 12 seconds would not result in any interest owed:

1e8 * 5e15 * 12 < 31536000 * 1e18
bingen commented 1 month ago

This is only possible for zombie troves. 10k wei (1e-14 BOLD) seems a negligible amount, both in at user and system wide level.