Reward Distribution Contract
rwddist.xsat
Actions
Mint XSAT and distribute it to validators
Quickstart
Table Information
STRUCT validator_info
validator_info
{name} account
- validator account{uint64_t} staking
- the validator's staking amount{time_point_sec} created_at
- created at time
example
TABLE rewardlogs
rewardlogs
scope height
height
params
{uint64_t} height
- block height{checksum256} hash
- block hash{asset} synchronizer_rewards
- the synchronizer assigns the number of rewards{asset} consensus_rewards
- the consensus validator allocates the number of rewards{asset} staking_rewards
- the validator assigns the number of rewards{uint32_t} num_validators
- the number of validators who pledge more than 100 BTC{std::vector<validator_info> } provider_validators
- list of endorsed validators{uint64_t} endorsed_staking
- total endorsed staking amount{uint64_t} reached_consensus_staking
- the total staking amount to reach consensus is(number of validators * 2/3+ 1 staking amount)
{uint32_t} num_validators_assigned
- the number of validators that have been allocated rewards{name} synchronizer
-synchronizer account{name} miner
- miner account{name} parser
- parse the account of the block{checksum256} tx_id
- tx_id of the reward after distribution{time_point_sec} latest_exec_time
- latest reward distribution time
example
TABLE rewardbal
rewardbal
scope
rwddist.xsat
params
{uint64_t} height
- block height{asset} synchronizer_rewards_unclaimed
- unclaimed synchronizer rewards{asset} consensus_rewards_unclaimed
- unclaimed consensus rewards{asset} staking_rewards_unclaimed
- unclaimed staking rewards
example
STRUCT reward_rate_t
reward_rate_t
params
{uint64_t} miner_reward_rate
- reward rate for miners{uint64_t} synchronizer_reward_rate
- reward rate for synchronizers{uint64_t} btc_consensus_reward_rate
- reward rate for BTC consensus{uint64_t} xsat_consensus_reward_rate
- reward rate for XSAT consensus{uint64_t} xsat_staking_reward_rate
- reward rate for XSAT staking{uint64_t} reserve1
- reserved for future use{uint64_t} reserve2
- reserved for future use{std::optional<int>} reserved3
- reserved for future use
example
TABLE rewardconfig
rewardconfig
scope
rwddist.xsat
params
{uint16_t} cached_version
- cached version (0 - unset){reward_rate_t} v1
- reward rate configuration version 1{reward_rate_t} v2
- reward rate configuration version 2
example
ACTION distribute
distribute
authority:
utxomng.xsat
Allocate rewards and record allocation information.
params
{uint64_t} height
- Block height for allocating rewards
example
ACTION endtreward
endtreward
authority:
utxomng.xsat
Allocate rewards and record allocation information.
params
{uint64_t} height
- block height{uint32_t} from_index
- the starting reward index of provider_validators{uint32_t} to_index
- end reward index of provider_validators
example
ACTION endtreward2
endtreward2
authority:
utxomng.xsat
Allocate XSAT rewards and record allocation information.
params
{uint64_t} height
- block height{uint32_t} from_index
- the starting reward index of provider_validators{uint32_t} to_index
- end reward index of provider_validators
example
ACTION setrwdconfig
setrwdconfig
authority: rwddist.xsat
Set reward configuration.
params
{reward_config_row} config
- reward configuration
example
Last updated