Skip to main content
Version: 0.7

Stake AVT

Stakes the specified amount of AVT, locking its free usage in order to earn rewards.


First time stakers must stake a minimum of 100 AVT.


This operation uses a relayer account that the sender authorizes to submit the transfer transaction. You can learn more about relayers HERE.

You can get the AVN_GATEWAY_URL and AVN_RELAYER here.

const AVN_API = require("avn-api");
const AVN_GATEWAY_URL = "<node_url>";
const options = {
suri: "<account_suri>",
const API = new AVN_API(AVN_GATEWAY_URL, options);

const AVN_RELAYER = "5Fb...yTh";
//Amount of AVT in 18 decimals
const AMOUNT_TO_STAKE = '1000000000000000000';

async function main() {
await API.init();

let result = await API.send.stake(
// Returns a request id

(async () => {
await main();

You have now successfully submitted a transaction to the AVN.


You can query the state of your transaction here using the returned request id.


There are two JSON-RPC methods to staking AVT.

  1. proxyStakeAvt - Only to be used for first time stakers.
  2. proxyIncreaseStake Only to be used for current stakers.


This should only be used for first time stakers - please query getStakingStatus to check first.

POST <https://AVN_GATEWAY_URL/send>

Content-Type: application/json Authorization': bearer <awtToken>


The initial staking requires 2 sets of proofs, one to cover the bonding step and one to cover the nominating step


  • relayer (AVN_RELAYER) [required] - a string representing the relayer's SS58 address.
  • user [required] - a string representing the user's SS58 address.
  • payer [required] - a string representing the payer's SS58 address.
  • amount [required] - a string integer value representing the full amount of AVT to stake.
  • targets [required] - The list of validators to nominate.
  • bondMethodName [required] - Method name must be 'proxyBond'.
  • proxyBondSignature [required] - a proof signed by the user allowing the bond transaction to be proxied.
  • bondFeePaymentSignature [required] - a proof signed by the user allowing the bond relayer fees to be paid.
  • bondPaymentNonce [required] - string integer value of the payment nonce used in the bondFeePaymentSignature.
  • nominateMethodName [required] - Method name must be 'proxyNominate'.
  • proxyNominateSignature [required] - a proof signed by the user allowing the nominate transaction to be proxied.
  • nominateFeePaymentSignature [required] - a proof signed by the user allowing the nominate relayer fees to be paid.
  • nominatePaymentNonce [required] - string integer value of the payment nonce used in the nominateFeePaymentSignature.

nominatePaymentNonce MUST succeed bondPaymentNonce

JSON-RPC Example

curl https://AVN_GATEWAY_URL/send \
-H "Content-Type: application/json" \
-H "Authorization: bearer <awtToken>" \
-d '{"jsonrpc":"2.0", "method":"proxyStakeAvt", "params":{"relayer":"5F...yTh", "user":"5DA...dMr", "amount":"1000000000000000000", "proxyBondSignature":"0x8cd139e3ac19d8fe217574c138ca320a73041b15527ba220280117588ad3597c20788049b4fbb6df2d96e579af68d6643c1cd4234812f8c9adb0e102a5840145",
"proxyNominateSignature":"0x4bd139e3ac19d8fe217574c138ca320a73041b15527ba220280117588ad3597c20788049b4fbb6df2d96e579af68d6643c1cd4234812f8c9adb0e102a5840145", "bondFeePaymentSignature":"0x243ad5e9df7e5443b29de409e5668753aea836b97d73af3b491c018d11a1269ef091f712b27e75847f8e5d056a996b4186d0ee80b3eb05ef0d1991c05539b0c8","nominateFeePaymentSignature":"0x123ad5e9df7e5443b29de409e5668753aea836b97d73af3b491c018d11a1269ef091f712b27e75847f8e5d056a996b4186d0ee80b3eb05ef0d1991c05539b0c8", "bondPaymentNonce":"305", "targets": ["0x9c64fea89ee6743bc48fb637f4d0349d299c4254676e44ecca989d9b34690f98", "0x67dfe6abf2495977d56ef4870333c0f00b78e0a5a3b7172e4b5e7b33716f00ab", "0x1ad675be22638c4257b059941ad4556e42369f5617d51ed012aa927af22f29ca"]}, "id":1}'


This endpoint can only be called while the eraElectionWindow is closed. The status of the Election period can be checked here. If it is called during an election, the following error response will be returned:

"message":"Invalid Request",
"data": {
"gatewayError":"election window is open",