NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

there is no way to calculate the starknet fee and no way to refund excess eth sent

Summary

there is no way to calculate the starknet fee and no way to refund excess eth sent

Vulnerability Details

IStarknetMessaging(_starknetCoreAddress).sendMessageToL2{
value: msg.value

when sending a message to L2 we must also send along some eth to the transaction in order to pay for the bridging fee on starknet. Because there isnt a way to calculate this fee on the contract, a user migh do 1 of 2 things:

Send not enough eth to bridge
Send too much eth to the bridge

In the first case the tx will simply revert and the user will lose gas funds.
In the second case the user will send to much eth and will not be refunded the excess fee

Impact

Loss of excess eth because the contract does not refund excess eth to the user.

Tools Used

manual reveiw

Recommendations

add a way to calculate the bridging fee and refund the excess fee that is not used to the user.

Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational / Gas

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.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.