RubiconRouter: Offers created through offerForETH cannot be cancelled
Offers created via RubiconRouter's offerForETH set the router as the offer owner, but the router lacks a cancellation function. If no one accepts the offer, the user's tokens remain locked in the contract.
Submitted by cccz
When a user creates an offer through the offerForETH function of the RubiconRouter contract, the offer function of the RubiconMarket contract is called, and the RubiconRouter contract address is set to offer.owner in the offer function.
But the RubiconRouter contract does not implement a function to cancel this offer. This means that if no one accepts the offer, the user’s tokens will be locked in the contract.
Proof of Concept
Recommended Mitigation Steps
Implement cancelForERC function to cancel this offer. And set the owner of offer_id to msg.sender in offerForETH function and check it in cancelForERC function
bghughes (Rubicon) marked as duplicate:
Duplicate of #17.
Not a duplicate. Referring to separate lacking functionality of cancellation of ERC20 -> WETH offers (eg. a
cancelWithETHfunction).
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
The router contract sets itself as the offer owner but does not provide a function to cancel offers it created.
Impact
Users' tokens could be locked in the contract if no one accepts their offer.
What the attacker needed
User creates offer via offerForETH; no one accepts the offer
The fix
Implement a cancelForERC function and set the offer owner to msg.sender in offerForETH, checking it in cancelForERC.
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.
When you use a smart contract to make a trade offer, the contract becomes the owner of that offer. If the contract has no way to cancel the offer, your tokens stay stuck until someone accepts. This report points out that missing cancel function.
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.