Liquidated USDO from BigBang not being burned after liquidation inflates USDO supply and can threaten peg permanently
The BigBang market fails to burn USDO after liquidating a user, leaving unbacked USDO in the system. This inflates USDO supply beyond collateral, threatening the peg and causing yieldBox strategies to hold worthless USDO.
Submitted by unsafesol, also found by peakbolt, 0xnev, rvierdiiev, and 0xRobocop
Absence of proper USDO burn after liquidation in the BigBang market results in a redundant amount of USDO being minted without any collateral or backing. Thus, the overcollaterization of USDO achieved through BigBang will be eventually lost and the value of USDO in supply (1USDO = 1$) will exceed the amount of collateral locked in BigBang. This has multiple repercussions- the USDO peg will be threatened and yieldBox will have USDO which has virtually no value, resulting in all the BigBang strategies failing.
Proof of Concept
According to the Tapioca documentation, the BigBang market mints USDO when a user deposits sufficient collateral and borrows tokens. When a user repays the borrowed USDO, the market burns the borrowed USDO and unlocks the appropriate amount of collateral. This is essential to the peg of USDO, since USDO tokens need a valid collateral backing.
While liquidating a user as well, the same procedure should be followed- after swapping the user’s collateral for USDO, the repaid USDO (with liquidation) must be burned so as to sustain the USDO peg. However, this is not being done. As we can see here: https://github.com/Tapioca-DAO/tapioca-bar-audit/blob/2286f80f928f41c8bc189d0657d74ba83286c668/contracts/markets/bigBang/BigBang.sol#L618-L637, the collateral is swapped for USDO, and fee is extracted and transferred to the appropriate parties, but nothing is done for the remaining USDO which was repaid. At the same time, this was done correctly done in BigBang#_repay for repayment here: https://github.com/Tapioca-DAO/tapioca-bar-audit/blob/2286f80f928f41c8bc189d0657d74ba83286c668/contracts/markets/bigBang/BigBang.sol#L734-L736.
This has the following effects:
- The BigBang market now has redundant yieldBox USDO shares which have no backing.
- The redundant USDO is now performing in yieldBox strategies of tapioca.
- The USDO eventually becomes overinflated and exceeds the value of underlying collateral.
- The strategies start not performing since they have unbacked USDO, and the USDO peg is lost as well since there is no appropriate amount of underlying collateral.
Recommended Mitigation Steps
Burn the USDO acquired through liquidation after extracting fees for appropriate parties.
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 liquidation function swaps collateral for USDO and extracts fees but does not burn the remaining repaid USDO, unlike the repayment function.
Impact
The USDO peg could be threatened and yieldBox strategies may fail because they hold unbacked USDO.
What the attacker needed
A liquidation event occurs
The fix
Burn the USDO acquired through liquidation after extracting fees for appropriate parties.
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.
USDO is a stablecoin meant to be backed by collateral. When someone is liquidated, their collateral is sold for USDO, but the code forgets to destroy that USDO. This leaves extra USDO in circulation that is not backed by anything, which can make the stablecoin lose its value.
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.