Users can mint EUROs without paying minting fee. Normally if a user wants to mint EUROs by calling mint()
in SmartVaultV3.sol
, then he has to pay a fee i.e
uint256 fee = _amount * ISmartVaultManagerV3(manager).mintFeeRate() / ISmartVaultManagerV3(manager).HUNDRED_PC();
This fee is calculated based on the mintFeeRate()
. So for a mintFeeRate()
of 500, we can generate 199 EUROs in a batch, without paying any fee. This is possible because of a rounding error that happens while calculating the fee. Similarly for a mintFeeRate()
of 2000, we can generate 49 EUROs in a batch without paying any fee.
So if we select mint amount to be 199, and we know the mintFeeRate() to be 500, then the fee will be 0 , because
_amount * ISmartVaultManagerV3(manager).mintFeeRate()
< ISmartVaultManagerV3(manager).HUNDRED_PC()
i.e
uint256 fee = 199 * 500 / 100000
, will be 0
So, we can continue minting EUROs in the batch of 199 EUROs , until we reach maxmintable limit, without paying any fee.
Similarly we can escape burning fee also, by making the fee to be 0 due to the rounding error.
Here is the hardhat test for minting EUROs without paying any fee :
This will mean direct financial loss to the protocol. The protocol will lose the minting and burning fee.
A user can borrow or repay without any fee.
Manual review
Prevent the rounding error
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.