Users can make deposit transacions with less than the required amount of gas.
When users call Bridge::depositTokens(...) function on L1 to initiate transfers to starktnet, they are required to send a message fee (gas fee) for the execution of the transaction.
The problem is that because a minimum fee requirement is not enforced, when a user deposits on L1 they can call Bridge::depositTokens(...)with 1 wei and the transaction will succeed becuase as shown on L131 below it only checks if msg.value > 0. So using msg.value = 1 will succeed.
CODED POC
As shown in the POC below, the user deposits successfully with 1 wei of gas
Add the test case below to the Bridge.t.solfile and then run forge test --mt test_depositTokenERC721Nogas -vv
User make deposit without paying the actual amount of gas used in the transaction
Foundry test
Implement checks directly in the Bridge::depositTokens(...) function on L1 to ensure that the correct gas fees are paid whenever deposits are initiated.
In fact, a minimum gas fee should be implemented.
Impact: Medium/High. Need an admin to start a cancellation and wait for 5 days once done. DoS > 5 days. Likelyhood: Low. Everytime a wallet/or a user do not send enough gas
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.