fees calculations are not accurate
The fee calculation mints new tokens to the fee beneficiary based on the pre-mint total supply, which dilutes the beneficiary's share and results in them receiving less value than intended. An attacker could not directly exploit this, but the fee beneficiary receives less than the calculated fee.
Submitted by certora
after that fee is calculated, it is minted to the feeBeneficiary. simply minting the exact amount results lower fee than it should be.
Impact
feeBeneficiary will get less fees than it should.
Proof of Concept
let’s assume that the basket assets are worth 1M dollars, and totalSupply = 1M. the result of calcOutStandingAnnualizedFee is 100,00 so the feeBeneficiary should get 100,00 dollars. however, when minting 100,00 the totalSupply will increase to 1,100,000 so they will own 100000/1100000 * (1M dollars) = 90909.09 dollars instead of 100k
loki-sama (Amun) acknowledged:
This is mitigated by the feeBeneficiary diluting his own shares if he gets fees on his fees.
I’m not exactly sure if I understand what the warden is stating here. Could you confirm @loki-sama ?
Ok, I myself misunderstood. He is correct that we don’t get the full value. When we take a fee of 10% like from his example. What we do is mint 10% of the basket to ourselves. That 10% after minting is not holding 10% of the underling.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the fee is calculated as a percentage of the current total supply and then minted directly, without accounting for the dilution caused by the minting itself.
Impact
The fee beneficiary receives less value than the intended fee amount, as demonstrated by the example where a 100,000 fee results in only about 90,909 in value.
What the attacker needed
None
The fix
The fee calculation should account for the dilution by minting a larger amount or using a different mechanism to transfer value without diluting the beneficiary's share.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a fee is charged, the system creates new tokens for the fee collector. But because creating new tokens increases the total number of tokens, the fee collector's share becomes smaller than expected. This means they get less money than the fee amount suggests.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.