No minimum rate in the auction may break the protocol under network failure
The auction contract calculates a new index ratio that can become very close to zero over time, especially during network failures. An attacker could then redeem bonds for extremely cheap or free, devaluing the basket and causing losses.
Submitted by jonah1005
Impact
The aution contract decides a new ibRatio in the function settleAuction. Auction.sol#L89-L91
uint256 a = factory.auctionMultiplier() * basket.ibRatio();
uint256 b = (bondTimestamp - auctionStart) * BASE / factory.auctionDecrement();
uint256 newRatio = a - b;
There’s a chance that newRatio would be really close to zero. This imposes too much risk on the protocol. The network may not really be healthy all the time. Solana and Arbitrum were down and Ethereum was suffered a forking issue recently. Also, the network may be jammed from time to time. This could cause huge damage to a protocol. Please refer to Black Thursday for makerdao 8.32 million was liquidated for 0 dai
Given the chance that all user may lose their money, I consider this is a medium-risk issue.
Proof of Concept
Black Thursfay for makerdao 8.32 million was liquidated for 0 dai bug-impacting-over-50-of-ethereum-clients-leads-to-fork
Tools Used
None
Recommended Mitigation Steps
I recommend setting a minimum ibRatio when a publisher publishes a new index. The auction should be killed if the ibRatio is too low.
frank-beard (Kuiper) confirmed
Alex the Entreprenerd (judge) commented:
Agree that
newRatiodecreases over time, if nothing is done it will eventually get close to 0, at which pointtokensNeededwill tend to 0, which would mean that the amount of underlying necessary to redeem the bond decreases over timeThis can hypothetically allow to redeem the bond for extremely cheap if not for free
The bond is denominated in the basketToken which effectively represents the value of the “mixture” of the tokens
Over time, you’re getting the same bond (basket) for less tokens (tokensNeeded), which also means that the basket itself is loosing value (because you can extra the excess value via bonding)
Sounds to me like the entire
settleAuctionmechanism is devaluing the basket over time which arguably is a high severity vulnerability.Will continue the judging and may end up getting in touch with the sponsor over some additional risks.
The finding is valid because it shows that the protocol can break given a specific circumstance, I do believe the warden could have found a higher severity by digging deeper
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 auction settlement formula reduces the index ratio without a lower bound, so it can approach zero during network outages.
Impact
The protocol could be broken, allowing bonds to be redeemed for extremely cheap or free, causing users to lose their money.
What the attacker needed
Network failure or congestion
The fix
A minimum `ibRatio` should be set when a publisher publishes a new index, and the auction should be killed if the ratio is too low.
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 for auctions. The contract slowly lowers a number called the index ratio. If the network goes down, the number can drop almost to zero. Then someone could buy the auctioned items for almost nothing, and everyone else loses money.
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.