Users are potentially DOSed when depositing tokens
When depositing tokens to the bridge, the Bridge::depositTokens
function the length of the payload of the message to be sent to the Starknet network. Here is the check of the payload's length:
In the case the payload's length equals MAX_PAYLOAD_LENGTH
, the transaction will revert. It should go through as MAX_PAYLOAD_LENGTH
is the maximum length a payload can be. This results in a TooManyTokensError
revert when the payload length is exactly the maximum allowed, preventing the user from depositing the desired tokens.
Users are prevented to deposit their tokens when the payload length is MAX_PAYLOAD_LENGTH
Manual review.
Change the check to this:
Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.
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.