Project

General

Profile

Actions

New feature / Change #4398

closed

Get minimum amount from AVN-API 0.6.0

Added by Olivier Bitsch over 2 years ago. Updated over 2 years ago.

Status:
Done
Priority:
Normal
Target version:
Start date:
04/26/2022
Due date:
% Done:

0%

Estimated time:

Description

Staking should prevent you from trying to stake less than 100 on the first time you stake. Get this value from AVN-API.

Actions #1

Updated by Gilles Hemmerlé over 2 years ago

  • Assignee set to Olivier Bitsch
  • Status changed from In Study to To be discussed

I believe you are talking about api.query.getStakingStats().
To be discussed with aventus.

It seems to return the following (on a wallet seeded with some tokens) :

{"stats": {"averageStaked": "5092416049999999965436", "maxNominatorsRewardedPerValidator": "256", "minUserBond": "100000000000000000000", "minimumStaked": "99999999999999987404", "totalStaked": "50924160499999999654366", "totalStakers": 4}}

I suppose we are supposed to use the minUserBond value ? However, how are we supposed to know if it is the first staking or not? The user could have stake 100 then unstake them (and having a staking balance = 0). But in this scenario he is not required to stake 100 AVT.

Actions #2

Updated by Gilles Hemmerlé over 2 years ago

  • Assignee changed from Olivier Bitsch to Gilles Hemmerlé
  • Status changed from To be discussed to Development
Actions #3

Updated by Gilles Hemmerlé over 2 years ago

  • Assignee changed from Gilles Hemmerlé to Olivier Bitsch
  • Status changed from Development to Testing
Actions #4

Updated by Olivier Bitsch over 2 years ago

  • Status changed from Testing to Done
Actions

Also available in: Atom PDF