The Standard

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

Protocol Minting Fee lead to EUROs stable coin inflation and PEG instability

Summary

The mint function in the SmartVaultV3 has a critical flaw due to the way it handles fee calculation and minting of EURO tokens. The issue arises from the function minting additional tokens as fees for the protocol, instead of deducting the fee from the user's funds.

This leads to the creation of EURO tokens that are not backed by collateral, resulting in inflation and potential destabilization of the stablecoin's peg as for each mint call an extra mintFeeRate is minted out of thin air

Vulnerability Details

In the mint function, a fee is calculated based on the amount of EUROs to be minted for the user.

function mint(address _to, uint256 _amount) external onlyOwner ifNotLiquidated {
--> uint256 fee = _amount * ISmartVaultManagerV3(manager).mintFeeRate() / ISmartVaultManagerV3(manager).HUNDRED_PC();
require(fullyCollateralised(_amount + fee), UNDER_COLL);
EUROs.mint(_to, _amount);
--> EUROs.mint(ISmartVaultManagerV3(manager).protocol(), fee);
emit EUROsMinted(_to, _amount, fee);
}

However, instead of deducting this fee from the user's minted amount, the contract mints the full amount for the user and additionally mints the fee for the protocol.

This approach results in the total amount of EUROs minted (user amount + fee) being greater than the collateralized amount.

Since the fees minted for the protocol are not backed by any additional collateral, they effectively inflate the EURO supply without adequate backing, violating the fundamental principle of a collateral-backed stablecoin.

For each 100 EUROs minted an extra mintFeeRate is minted

Impact

Stablecoin Inflation: Minting EUROs without corresponding collateral leads to inflation, undermining the stability and value of the stablecoin.

Peg Destabilization: The inflation of the EURO token can destabilize its peg to the underlying asset or currency, a critical issue for any stablecoin.

Tools Used

Manual Code Review: Detailed analysis of the contract's mint function to identify the flawed logic in fee handling and token minting

Recommendations

Adjust Fee Handling: Modify the mint function to deduct the fee from the user's minted amount, rather than minting additional tokens for the fee. This ensures that all minted EUROs are backed by collateral.

Ensure Full Collateralization: Implement checks to guarantee that the total amount of EUROs minted, post-fee deduction, is fully backed by the available collateral

Updates

Lead Judging Commences

hrishibhat Lead Judge almost 2 years 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.