code-423n4 / 2021-12-amun-findings

0 stars 0 forks source link

Annualized fee APY dependence on the frequency of executing a function #280

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

Czar102

Vulnerability details

Impact

The APY of the annualized fee is dependent on the frequency of the execution of the BasketFacet::chargeOutstandingAnnualizedFee(). If it is called more frequently, the compounding is more frequent and the APY is higher. For less used baskets, the APY might be lower, because the compounding will happen at lower rate.

Tools Used

Manual analysis

Recommended Mitigation Steps

Consider calculating the fee as the compounding was continous or with a constant compounding period.

0xleastwood commented 2 years ago

Nice find!