Assets sent from MarginAccount to InsuranceFund will be locked forever
The InsuranceFund contract lacks a function to transfer non-VUSD tokens, so any such assets sent to it become stuck. An attacker could not directly exploit this, but assets sent by mistake or design would be locked.
Submitted by 0xliumin, also found by hyh, minhquanym, and WatchPug
Assets sent from MarginAccount to InsuranceFund will be locked forever.
Proof of Concept
The insurance fund doesn’t have a way to transfer non-vusd out of the contract.
Assets transferred to the InsuranceFund will be locked forever.
Recommended Mitigation Steps
Have a way for governance to sweep tokens to swap them.
atvanguard (Hubble) confirmed and commented:
Yes, this a known issue and already on our roadmap.
The insurance fund contract is also upgradeable so it’s a fairly simple fix upgrade and to sweep the tokens out when the time comes - i.e. tokens won’t be lost forever. Still would be better to have it in from the start to avoid this process. Considering moving to medium. Assessing other issues first, will circle back.
moose-code (judge) decreased severity to Medium and commented:
Moving to medium as contracts are upgradeable so the tokens can always be collected later. If the contract was non-upgradeable I would have left as high.
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
Impact
Assets sent to the InsuranceFund are locked forever, though the contract is upgradeable so they could be recovered later via an upgrade.
What the attacker needed
Assets sent to InsuranceFund
The fix
Add a governance function to sweep non-VUSD tokens out of the InsuranceFund.
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.
A smart contract can hold tokens, but without a function to send them out, those tokens are stuck forever. Here, the InsuranceFund contract can receive tokens other than VUSD but has no way to move them, so they are effectively lost.
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.