Skip to content

EOS System Contracts v3.5.0 Pre-Release Notes

Pre-release
Pre-release
Compare
Choose a tag to compare
@nsjames nsjames released this 19 Jun 10:23
· 7 commits to release/3.5 since this release
1117b73

This release focuses on REX changes.

Overview

Following the tokenomics update this release changes some minor REX system mechanics to make it easier to use, enforce lockup, and have a longer lockup duration.

Bpay Contract

A new contract that gets deployed on top of the eosio.bpay account.
This contract allows the distribution of system fees that flow into it into the hands of the top 21 BPs.

claimrewards

Claim rewards for a block producer.
You must have been producing at the moment that rewards were catalogued in the contract.

void claimrewards( const name owner );

REX changes (system contract)

The core changes to REX are:

  • Remove voting requirements
  • Change 4 day lockup to dynamic lockup setting
    • Will be 21 days on first deployment MSIG
  • Immediately move all REX to the savings bucket

setrexmature

Sets configuration options for REX.

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 
);
  • num_of_maturity_buckets - Sets the number of days for lockup
  • sell_matured_rex - Whether or not matured REX is sold immediately
  • buy_rex_to_savings - Whether or not bought REX is moved immediately to savings

Reward contract

A new contract that gets deployed on top of the eosio.reward account.
This contract distributes rewards from the staking rewards bucket to a given set of strategies.

This new contract handles the distribution of fees to configurable destinations and rates.

This simplifies the ability to control the flow of fees within EOS as well as making them easier to track and view on explorers and other tooling.

Tables

struct strategies_row {
    name       strategy;
    uint16_t   weight;

    uint64_t primary_key() const { return strategy.value; }
};

The strategies table is always scoped to self (eosio.reward).

setstrategy

Available strategies:

  • eosio.rex - Distributes to the REX system
  • eosio.bonds - Distributes to EOS bonds
void setstrategy( 
    const name strategy, 
    const uint16_t weight 
)

Sets (create or update) a strategy's weight into effect for subsequent distributions.

  • strategy - Must be one of the predefined strategies above
  • weight - A number proportional to the total weight of all strategies

delstrategy

void delstrategy( const name strategy );

Removes a strategy from distributions.

distribute

void distribute();

Claims its rewards from eosio.saving and distributes them to the designated strategies based on their weights.

Static methods

static uint32_t get_total_weight( 
    const name contract = "eosio.reward"_n 
);

The get_total_weight static method returns the sum of all weights for all configured strategies.

WASM Hashes

eosio.system - ad12d594b75bdb4ab84c568f29d97f1ce82f50cca55a1f8a7d0406d4728d0e4b
eosio.bpay - 32181be084b539d882d92ff85a3d0b9962c8cb7292902cc558bc9a77dedd8fa9
eosio.reward - 49155e7e98991d9dad21970bb1d1cfec0d5ab77e842feaaa0dac1d1a91180cc7

Contributors

Special thanks to the contributors that worked on this release:

Full Changelog: v3.4.0...v3.5.0-rc1