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

Tokenomics - REX Upgrade #80

Merged
merged 11 commits into from
Jun 14, 2024
Merged

Tokenomics - REX Upgrade #80

merged 11 commits into from
Jun 14, 2024

Conversation

DenisCarriere
Copy link
Member

@DenisCarriere DenisCarriere commented May 3, 2024

Change Description

REX upgrades related to buying, selling & unstaking REX.

Deployment Changes

  • deployment of eosio system contract

API Changes

 /**
  * Facilitates the modification of REX maturity buckets
  *
  * @param num_of_maturity_buckets - used to calculate maturity time of purchase REX tokens from end of the day UTC.
  * @param sell_matured_rex - if true, matured REX is sold immediately.
  *                           https://github.com/eosnetworkfoundation/eos-system-contracts/issues/134
  * @param buy_rex_to_savings - if true, buying REX is moved immediately to REX savings.
  *                             https://github.com/eosnetworkfoundation/eos-system-contracts/issues/135
  */
 [[eosio::action]]
 void setrexmature(const std::optional<uint32_t> num_of_maturity_buckets, const std::optional<bool> sell_matured_rex, const std::optional<bool> buy_rex_to_savings );
struct rex_maturity {
  uint32_t num_of_maturity_buckets = 5;
  bool sell_matured_rex = false;
  bool buy_rex_to_savings = false;
};

Documentation Additions

REX Legacy

  1. Buy REX => matures in 4 days (earning yield)
  2. Can sell REX anytime while holding to matured (liquid) REX

REX maturing state happens on buying REX

REX 2.0

  1. Buy REX => moves all newly purchased REX to savings
  2. To start unstaking, user must call mvfrsaving to start the 21 day unstaking period
  3. Once 21 day unstaking period is over, funds are force sold to their user balance (on their next REX action)

REX maturing after moving from savings
REX cannot be held in matured (liquid) form

REX 2 0

@DenisCarriere DenisCarriere marked this pull request as ready for review May 3, 2024 14:30
@DenisCarriere DenisCarriere requested a review from nsjames May 4, 2024 14:45
@nsjames nsjames merged commit 1a603bb into tokenomics Jun 14, 2024
1 check passed
@nsjames nsjames deleted the tokenomics-rex-upgrade branch June 14, 2024 11:19
@nsjames nsjames restored the tokenomics-rex-upgrade branch June 14, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants