Withdrawal
The withdrawal process on the Monad network using the Staking API can be done in a few steps:
-
Undelegate the staked tokens from the P2P validator.
-
Withdraw unstaked tokens after the waiting period.
After each operation, sign and send the transaction to the network.
Request examples are provided using cURL.
1. Create undelegate request
-
To remove tokens from being actively delegated, send a POST request to /api/v2/monad/{network}/delegators/{delegatorAddress}/stakes/undelegations.
Example request (for
testnetnetwork):curl --request POST \ --url https://api-test.p2p.org/api/v2/monad/testnet/delegators/0x1234567890abcdef1234567890abcdef12345678/stakes/undelegations \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' \ --header 'content-type: application/json' \ --data ' { "gas": { "priorityPricePerGas": "21000", "maxPricePerGas": "1000000000" }, "amount": "1000000000000000000" } 'delegatorAddress— delegator address on the Monad network.amount— amount of tokens to undelegate in Wei (1 MON = 10¹⁸ Wei).gas— computational effort required to execute the transaction measured in gas units:priorityPricePerGas— price per unit of gas in Wei (1 Wei = 10⁻¹⁸ MON), which is added to the EIP-1559 block's base fee. This added fee is used to incentivize validators to prioritize this transaction.maxPricePerGas— maximum price per unit of gas this transaction will pay for the combined EIP-1559 block's base fee and this transaction's priority fee in Wei (1 Wei = 10⁻¹⁸ MON).
Example response:
{ "result": { "amount": "1000000000000000000", "createdAt": "2025-05-06T10:40:00.000Z", "delegatorAddress": "0x1234567890abcdef1234567890abcdef12345678", "gas": { "gasLimit": "260850", "priorityPricePerGas": "1000000000", "maxPricePerGas": "2000000000" }, "unsignedTransaction": "0x02f8758301e24004...", "validatorId": 1, "withdrawId": 0 }, "error": {} }amount— amount of tokens to undelegate in Wei (1 MON = 10¹⁸ Wei).createdAt— timestamp of the transaction in the ISO 8601 format.delegatorAddress— delegator address on the Monad network.gas— computational effort required to execute the transaction measured in gas units:gasLimit— maximum gas limit for the transaction.priorityPricePerGas— price per unit of gas in Wei (1 Wei = 10⁻¹⁸ MON), which is added to the EIP-1559 block's base fee. This added fee is used to incentivize validators to prioritize this transaction.maxPricePerGas— maximum price per unit of gas this transaction will pay for the combined EIP-1559 block's base fee and this transaction's priority fee in Wei (1 Wei = 10⁻¹⁸ MON).
unsignedTransaction— unsigned transaction in the hexadecimal format. Sign the transaction and submit it to the blockchain to perform the called action.validatorId— ID of the validator to which the tokens were delegated.withdrawId— identifier of the withdrawal request represented as an integer between 0 and 255; up to 256 in-flight withdrawal requests are available.
-
Use
unsignedTransactionto sign and send the transaction to the Monad network.
Note that it may take up to 12 hours to undelegate your tokens depending on the request time, since Monad uses a system of epochs, each of which lasts around 5,5 hours.
In order to ensure fairness and network security when you deactivate your stake, it will remain locked up until remaining this epoch.
2. Create withdrawal request
-
To withdraw undelegated tokens, send a POST request to /api/v2/monad/{network}/delegators/{delegatorAddress}/stakes/withdrawals.
Example request (for
testnetnetwork):curl --request POST \ --url https://api-test.p2p.org/api/v2/monad/testnet/delegators/0x1234567890abcdef1234567890abcdef12345678/stakes/withdrawals \ --header 'accept: application/json' \ --header 'authorization: Bearer <token>' \ --header 'content-type: application/json' \ --data ' { "gas": { "priorityPricePerGas": "21000", "maxPricePerGas": "1000000000" }, "withdrawId": 0 } 'delegatorAddress— delegator address on the Monad network.gas— computational effort required to execute the transaction measured in gas units.withdrawId— identifier of the withdrawal request.
Example response:
{ "result": { "createdAt": "2025-05-06T10:40:00.000Z", "delegatorAddress": "0x1234567890abcdef1234567890abcdef12345678", "gas": { "gasLimit": "260850", "priorityPricePerGas": "1000000000", "maxPricePerGas": "2000000000" }, "unsignedTransaction": "0x02f8758301e24004...", "validatorId": 1, "withdrawId": 0 }, "error": {} }createdAt— timestamp of the transaction in the ISO 8601 format.delegatorAddress— delegator address on the Monad network.gas— computational effort required to execute the transaction measured in gas units:gasLimit— maximum gas limit for the transaction.priorityPricePerGas— price per unit of gas in Wei (1 Wei = 10⁻¹⁸ MON), which is added to the EIP-1559 block's base fee. This added fee is used to incentivize validators to prioritize this transaction.maxPricePerGas— maximum price per unit of gas this transaction will pay for the combined EIP-1559 block's base fee and this transaction's priority fee in Wei (1 Wei = 10⁻¹⁸ MON).
unsignedTransaction— unsigned transaction in the hexadecimal format. Sign the transaction and submit it to the blockchain to perform the called action.validatorId— ID of the validator from which the tokens are withdrawn.withdrawId— identifier of the withdrawal request.
-
Use
unsignedTransactionto sign and send the transaction to the Monad network.
What's next?
- Sign and Broadcast Transaction
- Staking API reference
Updated about 10 hours ago