how-to-withdraw
This document will provide a comprehensive guide on how to perform withdraw operations. withdraw is divided into two types based on the roles: validator withdraw and voter withdraw.
Validator withdraw
Query locked MAPO amount
You can use the following command to query the amount of locked MAPO, which represents the amount of MAPO available for withdraw.
T-2:bin t$ ./marker getAccountTotalLockedGold --rpcaddr https://rpc.maplabs.io --target 0xa116617832F02cFFFb9aE8b78D8299E31A27Cc8f
INFO [10-13|14:52:08.383] === getAccountTotalLockedGold === admin=0x0000000000000000000000000000000000000000 target=0xa116617832F02cFFFb9aE8b78D8299E31A27Cc8f
INFO [10-13|14:52:10.410] result lockedGold=230,038,174,196,116,506,009,036Unregister validator
This step is not mandatory, but if your locked balance is less than 10000000 after unlocking, please proceed with the unregistration. The unregistration can only be performed after being registered as a validator for 60 days, and it will take effect after the last block of the current epoch.
./marker deregister --rpcaddr http://127.0.0.1:7445 --keystore /Users/alex/data/atlas-1/keystore/UTC--2022-06-14T05-46-17.312327000Z--73bc690093b9dd0400c91886184a60cc127b2c33
INFO [08-02|16:52:40.688] === deregisterValidator ===
INFO [08-02|16:52:40.701] TxInfo func=sendContractTransaction TX data nonce =10 gasLimit =4,500,000 gasPrice =101,000,000,000 chainID =22776
INFO [08-02|16:52:40.702] Please waiting func=getResult txHash =0xb904cae42c8e9d5481b0023b367a35a5be37802c1a9f7a9ff55835cd72044def
INFO [08-02|16:52:41.107] Transaction Success func=queryTx block Number=1211Unlocking
This step is used to transition the status of MAPO from locked to pending withdraw.
Query Pending Withdrawals
From the output, we can see that there are two pending withdrawal amounts, indexed as 0 and 1. Next, we will withdraw the funds with index 1.
Withdraw
This step will convert the reward status from a pending withdraw state to an account balance, but it can only be executed after a 15-day unlocking period.
Query account balance
Now that the redeemed MAPO has been added to your account balance, let's verify it.
Voter withdraw
Query voted validators
Query which validators the current account has voted for.
Query active votes
Query the number of active votes from your account for a validator.
Revoke active vote
Revoke your active vote for a validator. This step will transition the status of MAPO from active to unvoted.
Query pending votes
Query the number of pending votes from your account for a validator.
Revoke pending Votes
Revoke your pending votes. This step will transition the status of MAPO from pending to unvoted.
Query nonvoting MAPO amount
Unlocking
This step is used to transition the status of MAPO from locked to pending withdraw.
Query pending withdrawals
withdraw
This step will convert the reward status from a pending withdraw state to an account balance, but it can only be executed after a 15-day unlocking period.
Query account balance
You can query your account balance to verify if the withdraw MAPO has been added to your account.
Last updated