The fillOffchainOrders
function is used to submit orders on-chain, which were signed by their owners off-chain in a batch by a Keeper. However, malicious users can create a DoS attack by transferring their TradingAccount or updating their nonce.
The Normal flow for fillOffChainOrder
is the users sign their orders off-chain . The keeper will pick them and submit them in a batch to on-chain.
This function would cancel all the OffChain order :
In the code above, if the owner of the TradingAccount does not match the signer or if the nonce has already been used, the function will revert. A malicious user can exploit this to create a permanent DoS attack by either transferring their account or resetting the nonce. Since transaction costs on Arbitrum are low, this attack is feasible. Additionally, this should not be confused with front-running, as front-running cannot occur on Arbitrum.
Alice wants to create a DoS for fillOffChainOrders
.
Alice signs the OffChainOrder, let's suppose at block 1.
Alice either calls transferFrom
on the ERC721 contract to transfer the account or calls cancelAllOffChainOrder
to invalidate the nonce.
The offchain orders are still to be picked by the Keeper.
At block 3, the Keeper picks the offchain order batch and tries to submit it on-chain.
The transaction would revert with either InvalidOrderSigner
due to the token transfer or InvalidSignedNonce
due to resetting the nonce.
The malicious user could create a permanent DoS by signing an off-chain order and then resetting their nonce or transferring the account ownership.
Manual Review
If the nonce or ownership is invalid, avoid reverting the transaction. Instead, emit a log to notify the off-chain system and proceed with execution.
If you send 1 cancel and 1 create it should still run the cancel, not revert everything.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.