Prevent Minting During Emergency Exit
The emergency exit mechanism does not prevent minting against debt, so during a critical incident users could still mint new tokens backed by debt, potentially locking up funds or allowing an attacker to cause more damage.
Submitted by TimmyToes, also found by defsec
Impact
Potential increased financial loss during security incident.
Proof of Concept
Consider a critical incident where a vault is being drained or in danger of being drained due to a vulnerability within the vault or its strategies.
At this stage, you want to trigger emergency exit and users want to withdraw their funds and repay/liquidate to enable the withdrawal of funds. However, minting against debt does not seem like a desirable behaviour at this time. It only seems to enable unaware users to get themselves into trouble by locking up their funds, or allow an attacker to do more damage.
Recommended Mitigation Steps
Convert emergency exit check to a modifier, award wardens who made that suggestion, and then apply that modifier here.
Alternatively, it is possible that the team might want to allow minting against credit: users minting against credit would effectively be cashing out their rewards. This might be seen as desirable during emergency exit, or it might be seen as a potential extra source of risk. If this is desired, then the emergency exit check could be placed at line 624 with a modified message, instructing users to only use credit.
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 emergency exit check is not applied to the minting function, so minting against debt remains possible during emergency exit.
Impact
During a security incident, users could lock up their funds or an attacker could cause increased financial loss by minting against debt.
What the attacker needed
Emergency exit is triggered; vault is being drained or at risk
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.
This is a smart contract audit finding. The contract has an emergency exit mode meant to stop risky actions when a vault is being drained. However, the code still allows users to create new tokens backed by debt, which could make things worse during an attack.
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.