When the user gets the r,s,v values off chain to call withdrawTokensToL1(),they will simply be able to replay this transaction draining the vault of all it's funds.
WithdrawtoL1() specifies a ERC20 transfer to be executed by the Bridge contract, from the vault, to the recipient, which can be executed repeatedly until all funds are drained.
High impact, will result in the Vault being completely drained of all funds.
Manual Review, foundry testing
It is recommended to use a Nonce mapping per user to allow for a transaction signature to be used only once.
When signing the message off-chain, include the nonce as part of the data to be hashed and signed.
the smart contract will have a mapping mapping(address => uint256) public lastNonce;
, and in withdrawToL1 the user will be able to decode a nonce associated with this offchain signature.
This will ensure the same signature can not be used more than once.
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.