Withdraw ETH from Gas Tank
Last updated
Was this helpful?
Last updated
Was this helpful?
The Loopring Wallet app displays your Gas Tank balance, but only up to 7 decimal places. To view the full ETH balance, use the on-chain contract reader:
🔗
Scroll to the balanceOf
function.
Enter your wallet address.
Click Query to see the full ETH balance displayed in wei.
If you’re not withdrawing the exact balance, keeping up to 6 decimal digits should work fine.
ETH in your Gas Tank is used to pay gas fees on the Taiko network. Withdrawing the full balance may cause the transaction to fail if there's not enough ETH left to cover the fee.
Gas fees on Taiko are minimal, but we recommend reserving a small amount of ETH in the Gas Tank to avoid issues.
If you want to calculate your withdrawAmount
precisely, follow these steps:
Estimate the gas cost
Try submitting a full withdrawal.
If it fails, note the estimated gas cost (e.g., 0.0000023 ETH
).
Add a buffer Multiply the estimated cost by 1.5 to ensure your transaction succeeds:
0.0000023 ETH × 1.5 = 0.00000345 ETH
Convert to wei Convert the buffered amount from ETH to wei:
0.00000345 ETH × 1e18 = 3,450,000,000,000 wei
Subtract from your balance Subtract the buffered gas fee (in wei) from your total ETH balance (also in wei).
Example:
Full Balance
376667029381073 wei
Gas Fee Buffer
-3450000000000 wei
Withdraw Amount
373217029381073 wei
Use this value
Use the result as your withdrawAmount
when calling the smart contract’s withdraw
function.
It's okay to slightly overestimate the buffer. Leaving a tiny amount of ETH in the tank ensures your transaction won’t fail due to insufficient gas.
Connect Wallet: Use WalletConnect to link the Loopring Wallet you want to withdraw from.
Click on Write Contract
Use the withdrawTo
method:
withdrawAddress
: Enter the wallet address where you want to send the ETH.
withdrawAmount
: Enter the amount to withdraw (your total balance minus the reserved fee).
Click Write to submit the transaction.
The Loopring Wallet app will show a confirmation popup:
Tap Approve.
Enter your wallet password if prompted.
You can close the popup immediately after approving — no further action is required.
After approving:
Go to the Transactions section in your wallet app.
Confirm that the ETH has been successfully withdrawn from the Gas Tank.
🔗