Reward Contract v1.0 Pre-Release Notes
Pre-releaseFor broader release notes see here
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 systemeosio.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 aboveweight
- 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.reward
- 49155e7e98991d9dad21970bb1d1cfec0d5ab77e842feaaa0dac1d1a91180cc7
Contributors
Special thanks to the contributors that worked on this release: