The process to cancel a transfer from Layer 1 (L1) to Layer 2 (L2) requires initiating the cancellation through the startL1ToL2MessageCancellation
function of the Starknet Core Contract, which is encapsulated within the startRequestCancellation
function. However, due to the latter being restricted to the owner's access, users cannot independently initiate cancellations, leading to a highly centralized system.
The procedure for cancelling an L1 to L2 message, as outlined in the Starknet documentation, involves:
The user that initiated the L1→L2 message calls the startL1ToL2MessageCancellation
function in the Starknet Core Contract.
The user waits five days until she can finalize the cancellation.
The user calls the cancelL1ToL2Message
function.
The existing setup prevents the requester of an NFT transfer from performing step 1, as the startRequestCancellation
function, crucial for initiating the cancellation, is exclusively accessible by the owner.
Transferring parties are unable to cancel their transfer requests.
Manual
Modify the startRequestCancellation
function by removing the onlyOwner
restriction and incorporating a verification step to confirm the original requester is initiating the cancellation. Here's the revised function:
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.