Change in auctionMultiplier/auctionDecrement change profitability of auctions and factory can steal all tokens from a basket abusing it
The factory owner can change auction parameters (auctionMultiplier and auctionDecrement) without any protection, which alters the profitability of bonded auctions. By setting auctionMultiplier to zero and auctionDecrement to its maximum, the factory owner can make settleAuction withdraw all tokens from a basket for free.
Submitted by 0x0x0x
When factory changes auctionMultiplier or auctionDecrement profitability of bonded auctions change. There is no protection against this behaviour. Furthermore, factory owners can decide to get all tokens from baskets where they are bonded for the auction.
Proof of concept
1- Factory owners call bondForRebalance for an auction.
2- Factory owners sets auctionMultiplier as 0 and auctionDecrement as maximum value
3- settleAuction is called. newRatio = 0, since a = b = 0. All tokens can be withdrawn with this call, since tokensNeeded = 0.
Extra notes
Furthermore, even the factory owners does not try to scam users. In case auctionMultiplier or auctionDecrement is changed, all current auctionBonder from Auctions can only call settleAuction with different constraints. Because of different constraints, users/bonder will lose/gain funds.
Mitigation step
Save auctionDecrement and auctionMultiplier to global variables in Auction.sol, when startAuction is called.
frank-beard (Kuiper) confirmed and commented:
Adding in protection from the global governance is definitely important.
0xleastwood (judge) decreased severity to Medium and commented:
The warden has identified an issue whereby the factory owner can rug-pull baskets through the re-balancing mechanism. Because
newRatio = 0, the basket improperly checks the tokens needed in the contract. However, this assumes that the factory owner is malicious which satisfiesmediumseverity due to assets not being at direct risk.The sponsor has decided to add additional protections (potentially via timelock) to mitigate this issue.
This rug-pull is made even more difficult by the fact that
newRatiomust be>= minIbRatio. BecauseminIbRatiois behind timelock, I think this rug vector is unlikely or at least can only be used to steal a fixed amount of funds.
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 parameters are read from the factory at settlement time rather than being fixed when the auction starts, so the factory owner can manipulate them to make the settlement require zero tokens.
Impact
The factory owner could steal all tokens from a basket, but the judge notes that newRatio must be >= minIbRatio (behind timelock), making the rug vector unlikely or limited to a fixed amount.
What the attacker needed
Factory owner is malicious; newRatio >= minIbRatio (behind timelock)
The fix
The auction parameters should be saved to global variables in Auction.sol when startAuction is called, and additional protections (potentially via timelock) should be added.
How it was found
- Factory owners call bondForRebalance for an auction.
- Factory owners set auctionMultiplier to 0 and auctionDecrement to maximum value.
- settleAuction is called, resulting in newRatio = 0 and tokensNeeded = 0, allowing all tokens to be withdrawn.
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 lets a factory owner adjust settings that control how auctions work. If the owner sets those settings to extreme values, they can take all the tokens from a basket without paying. This is like a referee changing the rules mid-game to win.
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.