Project

General

Profile

New feature / Change #4398

Get minimum amount from AVN-API 0.6.0

Added by Olivier Bitsch 9 months ago. Updated 9 months 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.

History

#1

Updated by Gilles Hemmerlé 9 months 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.

#2

Updated by Gilles Hemmerlé 9 months ago

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

Updated by Gilles Hemmerlé 9 months ago

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

Updated by Olivier Bitsch 9 months ago

  • Status changed from Testing to Done

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 97.7 MB)