Withdraw
Preliminary Steps
Connect MetaMask: Make sure your MetaMask wallet is connected to the same admin address used during your grant creation.
Navigate to Dashboard: Once connected, the Ramestta Bridge dashboard should appear.
Access Bridge Interface: From the dashboard, navigate to the Ramestta Bridge page. Alternatively, you can also click on the Bridge icon in the left navigation drawer.
Withdrawal Steps
Select 'Withdraw': Switch to the withdrawal view as described in the PoS section.
Choose Tokens: Select RAMA from the token list.
Enter Amount: Specify how much you wish to withdraw, or click 'MAX' to withdraw all.
Confirm Transaction Fee: Acknowledge the transaction fee and the time it may take (up to 7 days).
Sign Transactions: Sign two transactions, similar to the PoS method.
Completion: The withdrawal may take up to 7 days to complete. Once the time frame is completed user again has to submit the burn proof in the Polygon network (Calling process exit in withdrawal contract). Confirm using Polygonscan after that period.
Verify Funds: Once the challenge period is over, check your Polygon wallet to confirm the tokens have arrived.
Important Note
The 'challenge period' is the time required for the network to confirm the legitimacy of your transaction. It could take a few hours with PoS or up to 7 days with Plasma, depending on the method you choose.
Plasma Bridge Withdrawal: Backend Operations
Plasma - Burn (Withdraw Function)
When you initiate a withdrawal request using the Plasma bridge, the first operation that happens in the backend is the invocation of a function known as withdraw
. This function essentially "burns" the tokens you have in the Ramestta L2 layer. "Burning" in this context means these tokens are permanently removed from the circulating supply on the L2, rendering them unusable there. This step acts as a lock-in mechanism to ensure that the same tokens can't be used simultaneously on both L2 and L1. Essentially, it prepares your tokens for their journey from the Ramestta L2 back to the Polygon L1.
Confirm Withdraw (Checkpoint Submission)
The next phase in the backend is the Confirm Withdraw
operation. However, this operation can't be immediately carried out. First, a "checkpoint" needs to be submitted to the main Polygon chain. A checkpoint is like a snapshot of all transactions that have taken place on the Ramestta L2 since the last snapshot. Once this checkpoint is successfully submitted and confirmed on the Polygon mainnet, the startExitWithBurntTokens
function can be called. This function validates that the tokens have indeed been burnt (or locked) on Ramestta L2. Essentially, it confirms that the tokens are ready to be reissued on the Polygon L1 and marks them for exit.
Process Exit (Submit Proof of Burn)
The final backend operation in a Plasma-based withdrawal is the Process Exit
phase. This involves a function known as processExits
. Here, you are required to submit a "proof of burn" — essentially a cryptographic proof demonstrating that the tokens were genuinely burned on Ramestta L2. This is a security measure to prevent fraudulent withdrawals. Once the Polygon network validates this proof, the same number of tokens are reissued or "minted" on Polygon L1. These tokens are then transferred back into your wallet, completing the full circle of the withdrawal process.
So, while you interact with a user-friendly frontend interface to initiate the withdrawal, there are these critical backend operations being executed to ensure the secure and accurate transfer of your tokens from Ramestta to Polygon.
Last updated