the depositTokens
function of the Bridge.sol
allow users to send a token to the starknet
:
during the time of depositing and sending the message to the L2 contract, an amount of fee
is required as per the starknet
docs
the issue with the current implementation is that, the fee is not handled appropriately as per the starknet
, the ark protocol uses the msg.value
as the amount of fee:
the problem here is that, there's no minimum or max amount a user can provide, meaning, if the user provides a huge amount, it'll be consumed by the sequencer
without returning the excess amount
User providing a huge amount will be consumed and no refund will be made
manual review
Use the method provided by the starknet
to quote the fee and get the estimate amount of it and also make sure user did not provide more than that
The fee itself is calculated in the same manner as "regular" L2 transactions. You can use the CLI to get an estimate of an L1 → L2 message fee.
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.
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.