Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display locked token balance #481

Closed
13 tasks done
kcole16 opened this issue Mar 27, 2020 · 4 comments
Closed
13 tasks done

Display locked token balance #481

kcole16 opened this issue Mar 27, 2020 · 4 comments
Assignees
Labels
Priority 1 Top Priority

Comments

@kcole16
Copy link
Contributor

kcole16 commented Mar 27, 2020

Overview

Users of the wallet will often not have full control over their NEAR tokens. There are four main reasons for this, the first two of which are covered by this issue.

  • Vesting
    • Several community members (NEAR team, contributors) have tokens that vest over time, and will be unlocked linearly, block by block
  • State stake (Minimum Balance)
    • There is a minimum required balance (NEP #40) for all accounts. This can only be transferred by deleting the account
  • Staking
  • Delegating

Story

As a user, I want to view both my active and locked (vesting, state staked, etc) token balances, so I can understand the quantity of tokens that are fully usable and transferrable.

As a user, I want to be prevented from attempting a transaction that will go over my available balance, so my transaction doesn't fail.

Acceptance Criteria

  • Total NEAR balance (available+locked) is visible
  • Available NEAR balance is visible (total - locked)
  • Locked NEAR balance is visible, and broken down into
    • Staked
    • Minimum Balance (storage_used * cost_per_byte)
  • Difference between locked and available is explained
  • User is prevented from submitting TX to Send Money over their available balance
  • Available balance is viewable on Send Money page, with explanation
  • User is prevented from submitting TX Login or Sign over their available balance
  • Available balance is viewable on Login and Sign page, with explanation
  • Minimum balance is explained
  • Mobile ok
  • Tested
@kcole16 kcole16 added Story Priority 2 Important Priority 1 Top Priority and removed Priority 2 Important labels Mar 27, 2020
@Patrick1904 Patrick1904 added the 🛠 UX / UI Requires discovery and/or deliverables from Product Design label Mar 27, 2020
@kcole16
Copy link
Contributor Author

kcole16 commented Apr 17, 2020

@frol Will we be able to get a locked balance breakdown from this RPC endpoint? https://docs.nearprotocol.com/docs/interaction/rpc#accountaccount_id

@kcole16
Copy link
Contributor Author

kcole16 commented Apr 17, 2020

Rephrasing: Which of the "locked" balance types (staked, vesting, state stake) will be included in the locked parameter returned from the account RPC endpoint?

@frol
Copy link
Contributor

frol commented Apr 18, 2020

Locked balance includes validator stake. Vesting is going to be implemented on the level of the contracts, so I assume it will be treated as a token transfer (@evgenykuzyakov is this accurate?). I am not sure where the state stake fit (@ilblackdragon can you help here?).

@kcole16 kcole16 removed the 🛠 UX / UI Requires discovery and/or deliverables from Product Design label Apr 21, 2020
@Patrick1904 Patrick1904 self-assigned this Apr 21, 2020
@bowenwang1996
Copy link
Contributor

Lockup will have to be separately considered because it requires interaction with the contract deployed on the account. To support that, we need a way to tell whether the account has a lockup contract deployed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 1 Top Priority
Projects
None yet
Development

No branches or pull requests

5 participants