onlyOwner Role Can Unintentionally Influence settleAuction()
The owner role can change auction parameters immediately, without the one-day timelock that applies to other changes, so an owner transaction can land just before a settleAuction() call. This can make the auction bonder overpay during a rebalance, and the bonder has no way to recover the tokens.
Submitted by leastwood
Impact
The onlyOwner role is able to make changes to the protocol with an immediate affect, while other changes made in Basket.sol and Auction.sol incur a one day timelock. As a result, an onlyOwner role may unintentionally frontrun a settleAuction() transaction by making changes to auctionDecrement and auctionMultiplier, potentially causing the auction bonder to over compensate during a rebalance. Additionally, there is no way for an auction bonder to recover their tokens in the event this does happen.
Proof of Concept
- https://github.com/code-423n4/2021-09-defiProtocol/blob/main/contracts/contracts/Factory.sol#L39-L59
- https://github.com/code-423n4/2021-09-defiProtocol/blob/main/contracts/contracts/Auction.sol#L89-L99
Tools Used
Manual code review
Recommended Mitigation Steps
Consider adding a timelock delay to all functions affecting protocol execution. Alternatively, bondForRebalance() can set state variables for any external calls made to Factory.sol (i.e. factory.auctionMultiplier() and factory.auctionDecrement()), ensuring that settleAuction() is called according to these expected results.
frank-beard (Kuiper) acknowledged:
it is assumed the owner is trustworthy in this version of the protocol, however we will add mitigations and further decentralization in future updates
Alex the Entreprenerd (judge) commented:
Agree with the finding, users are taking “owner privileges” risks while interacting with the protocol. The warden has identified a specific grief / DOS that the owner can cause
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 owner-only parameter changes in Factory.sol take effect immediately rather than under the same one-day timelock as other protocol changes, and settleAuction() reads those live values.
Impact
An auction bonder could over-compensate during a rebalance and cannot recover the tokens; the report notes the owner is assumed trustworthy, so this is a griefing risk rather than a direct theft.
What the attacker needed
Owner account acts; auction bonder settles an auction
The fix
All functions affecting protocol execution should get a timelock delay, or bondForRebalance() should snapshot the factory's auctionMultiplier and auctionDecrement values for its external calls.
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.
Some smart contracts have an owner account that can change settings. Most changes here wait a day before taking effect, but a few auction settings change at once. If the owner changes those settings at the same moment someone settles an auction, that person can end up paying more than expected, and there is no refund path.
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.