Create Unstaking Request

Overview

To transact using your staked assets, including your earned rewards, you must first unstake them. Unstaked assets stop receiving rewards. Like staking, unstaking transactions must abide by your enterprise and wallet policies. When unstaking, some assets have a defined cooldown period when the asset can't be used.

For many assets, unstaking requires 2 transactions:

  • An unstaking transaction to start the unstaking process.
  • A claim transaction to retrieve the delegated amount which, including rewards.

Once the delegated amount is unlocked, you can transfer the funds out of the staking wallet.

When you submit an unstaking request, BitGo determines the number of transactions needed to unstake and generates the first unstaking transaction for you to sign. After BitGo broadcasts the full-signed unstaking transaction, the cooldown period begins. When the cooldown period finishes, BitGo automatically generates the claim transaction you to sign.

Prerequisites

Steps

Submit an unstaking request.

  • SDK
  • API
1 2 3 4 5 const stakingWallet = wallet.toStakingWallet(); const stakingRequest = await stakingWallet.unstake({ delegationId: 'e0225adbc-66a3-4ccd-9a9d-726a05bca0cf', cliendId: 'e055adbc-66a3-4ccd-9a9d-726a05bca0cf' });

Step Result

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 { "id": "e055adbc-66a3-4ccd-9a9d-726a05bca0cf", "clientId": "f054adbc-26a3-4acd-8a9d-726a05bca0dr", "requestUserId": "6092e75c451052000636831deb797bd1", "enterpriseId": "1032e75c451052000436831deb797af1", "walletId": "2032e75g451052000636831abd797bd3", "withdrawalAddress": "3Lwg4hE19Kg4BdUkuDh4v8xXoyoRQkbDMM6wX7zjQP6i", "walletType": "custodial", "type": "UNSTAKE", "coin": "sol", "createdDate": "2022-01-10T14:32:28Z", "statusModifiedDate": "2022-01-10T14:32:28Z", "status": "NEW", "amount": 1012000000 }

Next Steps

  • Custodial
  • Self-Managed Hot
  1. Transaction Approval (Optional) - If the unstaking transaction requires admin approval, it remains in a pending approval status until receiving final approval.
  2. If a claim transaction is required, after the unstaking cooldown period, BitGo automatically generates the claim transaction.
  3. Transaction Approval (Optional) - If the claim transaction requires admin approval, it remains in a pending approval status until receiving final approval.

See Also