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

Implement "Unvest" ACTION #131

Closed
Tracked by #128 ...
DenisCarriere opened this issue Apr 27, 2024 · 1 comment
Closed
Tracked by #128 ...

Implement "Unvest" ACTION #131

DenisCarriere opened this issue Apr 27, 2024 · 1 comment
Labels

Comments

@DenisCarriere
Copy link
Contributor

DenisCarriere commented Apr 27, 2024

Purpose

Introduce the unvest ACTION to enable the revocation of unallocated vested staked tokens from a designated account that meets specific vesting preconditions set by the system contract. This action requires the return of these tokens to the eosio system account.

Feedback provided by

unvest ACTION Specification

/**
 * Facilitates the removal of vested staked tokens from an account, ensuring that these tokens are reallocated to the system's pool.
 *
 * @param account - the target account from which tokens are to be unvested.
 * @param stake_net_quantity - the amount of NET tokens to unvest.
 * @param stake_cpu_quantity - the amount of CPU tokens to unvest.
 */
[[eosio::action]]
void unvest(const name account, const asset stake_net_quantity, const asset stake_cpu_quantity);

Preconditions

  • System authentication through require_auth(eosio) is mandatory.
  • The stake_net_quantity must not surpass the net_weight attributed to the account in userres.
  • The stake_cpu_quantity must not exceed the cpu_weight linked to the account in userres.
  • The unvested tokens will be transferred directly to the eosio system account.
  • Normal unstaking periods will be disregarded during this process.
  • The voting weight associated with the account will be recalibrated subsequent to the token unvesting.
  • Unvest action can only be applied to b1 account

References

Note: changes should be pushed to Antelope Reference contracts https://github.com/AntelopeIO/reference-contracts

@DenisCarriere
Copy link
Contributor Author

Implemented via AntelopeIO/reference-contracts@d664b5a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants