Bridge::depositTokens()
does not check for minimum required fee
Minimum fee is required in order message from L1 to be deserialized and processed on L2. According to docs https://book.cairo-lang.org/ch16-04-L1-L2-messaging.html, minimum required fee is 20k wei + some additional value.
It's important to note that we have {value: msg.value}
. In fact, the minimum value we've to send here is 20k wei
, due to the fact that the StarknetMessaging
contract will register the hash of our message in the storage of Ethereum.
In addition to those 20k wei
, since the L1HandlerTransaction
executed by the sequencer is not tied to any account (the message originates from L1), you must also ensure that you pay enough fees on L1 for your message to be deserialized and processed on L2.
StarknetMessaging::sendMessageToL2
checks only if msg.value > 0
.
Medium, message cannot be processed on L2 when not enough fees sent
Manual review
Add require check in Bridge::depositTokens
for minimum fee.
You can profile the gas consumption using starkli
or snforge
to estimate the cost of your message execution.
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.