DOT staking mechanics
DOT Liquid Staking lets the user stake their funds through the Ankr deposit address on the Polkadot network, accumulate rewards, and receive their stake+rewards when unstaking.
Ankr principles for the staking are:
Receive DOT from the user to the Ankr deposit address.
Mint aDOTb on Ethereum. Make all claiming aDOTb transactions on the Ethereum network.
Use the fixed exchange rate 1:1 for aDOTb to DOT. aDOTb always represents 1 DOT token even though we sacrifice ERC-20 compatibility for this.
aDOTb ratio changes, thus all aDOTb balances “automatically” grow.
The following section explains staking requirements, fees, rewards, validators, smart contracts and function calls to interact with these smart contracts.
The requirements when staking are:
Minimum value to stake — 1 DOT.
Maximum value to stake — unlimited, at the user’s discretion.
Staking can be repeated anytime, without waiting for the current staking to completed as staking on Polkadot is done by the Ankr-owned wallet where users send their stake directly.
The requirements when unstaking are:
Minimum value to unstake — 0 DOT.
Maximum value to unstake — staked amount + % of the reward, up to the user’s balance.
Release period — up to 28 days.
The user pays 2% fee from the staking reward.
The user must also count in the gas price for outgoing transactions.
Validators/delegators receive rewards daily.
Ankr backend calculates the ratio of rewards to the total stake amount weekly and publishes it to the aDOTb smart contract respectively.
Ankr delegates the staked funds to trusted validators from Polkadot. Specific validators may change in >= 1 day.
Smart contracts addresses involved in DOT staking are:
Polkadot deposit address:
Ankr deposit address — address that receives the staked DOT on Polkadot.
aDOTb — contract on the Ethereum network that mints or burns aDOTb tokens for the user in 1:1 ratio with the staked amount.
PolkadotPool — contract on the Ethereum network where the user sends their request to mint or burn aDOTb.
The flow consists of two parts: staking DOT and claiming aDOTb.
The workflow is both user and Ankr-driven. The user part is Steps 1–3, the Ankr part is Steps 3–5. User interacts with Ankr and Polkadot via the Ankr Staking Dashboard.
Due to Polkadot backend architecture, we currently do not disclose our API endpoints to avoid scams or unregulated heavy traffic to the Ankr backend.
User requests the Ankr deposit address via the Ankr backend.
User sends DOT to the obtained Ankr deposit address via the Ankr backend.
User sends their extrinsic id to the Ankr backend. In Substate, an extrinsic is a piece of information that comes from outside the chain and is included in a block.
Once the transaction has been finalized, the user can see their DOT balance in Akr Earn.
Ankr backend monitor deposits to the Ankr deposit address. Once new DOT are available for staking, the backend:
- Transfers the DOT to one of the Ankr dedicated accounts if necessary.
- Bonds DOT for staking.
- Constantly nominates a subset of validators.
The workflow is user-driven. User interacts with Ankr and Polkadot via Ankr frontend.
User sees their claimable balance on the DOT staking dashboard. The balance is obtained from the Ankr backend; the user
addressis extracted from their Polkadot.js wallet;
claimableis the amount that can be currently claimed and is an aggregate of the stake and reward.
User sees their staking history on the DOT staking dashboard.
For claimable aDOTb, the user sees a suggestion to claim them. In order to claim, the user must unlock and connect their MetaMask or another compatible Ethereum wallet to the Ethereum network.
When claiming, the user sees the claiming form and inputs the amount of aDOTb to be claimed along with the user’s Ethereum address. By default, Ankr suggests the max possible claim and address from the connected user’s Ethereum wallet.
Upon claim confirmation, the user interacts with the Polkadot.js extension to send a request to the Ankr backend to get a notarization signature. To send the request, the user creates a signature and includes it in the request.
claimobject in the reply contains the following fields:
"loanId": 0 # 0 for staking, >0 for crowdloans
To check there are no errors, before the actual claim, the user runs a call to
bytes memory signature
) external view returns (bool)
If the call returns true, the user sends a transaction to claim aDOTb:
bytes memory signature
All fields are taken from the
claimpayload from Step 5.
Once the transaction is successful,
PolkadotPoolmints aDOTb to the user's wallet. The balance shows on the staking dashboard and in MetaMask (only if user added the token) via a call to
Daily exchange ratio updates
To update the ratio, the Ankr backend:
Collects information about all stakes in progress and rewards to be received by the end of the current validation period.
Collects all aDOTb claims.
Collects information about the total supply of aDOTb from
Recalculates the aDOTb share — the aDOTb exchange ratio. The share is an analog of aETHc (which historically was aETH), but for Polkadot. For example, user has 1 share, but due to ratio change, aDOTb balance grows daily.
PolkadotPool::burnBond(address bond, uint256 amount, bytes calldata polkadotRecipient)where
bondis the aDOTb contract address,
amountis the amount to burn, and
polkadotRecipientis the user’s address on Polkadot.
Ankr backend sees a
TokensBurnedevent, emitted by
PolkadotPool, and saves the unstaking request to the database.
If Ankr deposit address doesn’t have the corresponding number of DOT at the moment, the Ankr backend sends an unbonding request to the Polkadot network.
When the Ankr deposit address has enough DOT available to fulfill the request, the funds are sent to the user’s address on Polkadot.
The user sees a new
UNSTAKEentry in their staking history on the staking dashboard.