The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: medium
Invalid

Burn fees

Summary

Vulnerability Details

When burning EUROs, users have to pay the fee:

function burn(uint256 _amount) external ifMinted(_amount) {
uint256 fee = _amount * ISmartVaultManagerV3(manager).burnFeeRate() / ISmartVaultManagerV3(manager).HUNDRED_PC();
minted = minted - _amount;
EUROs.burn(msg.sender, _amount);
IERC20(address(EUROs)).safeTransferFrom(msg.sender, ISmartVaultManagerV3(manager).protocol(), fee);
emit EUROsBurned(_amount, fee);
}

It burns the specified amount and additionally transfers the fee, so the total amount required from the user is _amount + fee. Problems:

  1. ifMinted does not account for the fee.

  2. users have to pay the fee on top of the amount. it would make more sense to burn _amount - fee and then transfer the fee.

Impact

More tokens than specified will be transferred from the user. Based on my understanding, it is not intuitive.

Tools Used

Manual review

Recommendations

EUROs.burn(msg.sender, _amount - fee);

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

fee-loss

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

fee-loss

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.