Skip to content

Latest commit

 

History

History
546 lines (487 loc) · 31.7 KB

fip-0021.md

File metadata and controls

546 lines (487 loc) · 31.7 KB
fip title status type author created updated
21
FIO Staking
Final
Functionality
Pawel Mastalerz <pawel@fioprotocol.io>
2020-11-18
2022-01-29

Abstract

This FIP proposes FIO Staking, an on-chain program which rewards users for participating in blockchain governance.

Fee distribution modifications

Recipient Before FIP After FIP
Block Producers 85% 60%
Staking Rewards 0% 25%

Token supply modifications

Token group Before FIP After FIP
Staking Rewards Reserves 0 25,000,000
FIO Address Giveaways 125,000,000 100,000,000

Total token supply increase/(decrease): 0

New Contracts

A new system account will be added to the FIO Protocol. This will be called fio.staking. This new account will have a new contract of the same name. This contract will contain the global state and account wise information required for staking. The contract will also contain the required actions to modify this state information. The goal of this new contract is to reduce the contract bloat that might result if we were to add this information directly to the fio.system contract.

New actions

Contract Action Endpoint Description
fio.staking stakefio stake_fio_tokens Stake FIO Tokens.
fio.staking unstakefio unstake_fio_tokens Unstake FIO Tokens.

Modified actions

Contract Action Endpoint Description
Multiple Fee collection on any action Multiple Modified to redirect 25% of fee paid to Staking Rewards.
fio.treasury bpclaim claim_bp_rewards Modified to mint Staking Reward Reserves.
fio.token trnsloctoks transfer_locked_tokens Modified to take in SUFs for periods instead of percentages and modified maximum allowed periods to 5 from 365.

Modified getters

Endpoint Description
get_fio_balance Modified to consider and include staked tokens.
get_locks Modified to return SUFs for periods instead of percentages.

Motivation

The FIO Protocol is subject to the network effect, meaning the more participants adopt it, the more useful it is to all. To accelerate the adoption, on-chain incentives for integrators in the form of TPID rewards and New User Bounties, as well as for block producers in the form of rewards and reserves are built into the FIO Chain. Currently, there are no incentives for end-users. Yet early token holders add value to the network by voting for block producers and helping the network grow.

This FIP proposes an on-chain staking functionality, which rewards users for taking an active role in the FIO Protocol governance.

Specification

Key concepts

Concept Description Incremented Decremented Scope System variable
Account Staking Reward Point (SRP) Representation of staking rewards owned by single account. When user stakes FIO, SRPs are issued. When user unstakes FIO, SRPs are converted back to FIO. Account total_srp
Account Tokens Staked FIO Tokens staked in an individual account. When user stakes FIO. When user un-stakes FIO. Account total_staked_fio
Global Staking Reward Point (SRP) Sum of all Account Staking Reward Points* (SRPs). It represents all SRPs issued and held by users. When user stakes FIO, SRPs are issued. When user unstakes FIO, SRPs are converted back to FIO. Global global_srp_count
Staked Token Pool Sum of all Account Tokens Staked. It represents all FIO staked. When user stakes FIO. When user un-stakes FIO. Global staked_token_pool
Rewards Token Pool Represents total number of FIO tokens redirected as 25% of fees paid towards the staking rewards. When fee is paid, 25% of it goes to this pool. It serves primarily as an audit function. Never. Treasury rewards_token_pool
Combined Token Pool Represents all FIO staked + staking rewards redirected from fees or minted by the chain. When user stakes FIO. When fee is paid, 25% of it goes to this pool. When Staking Rewards Reserves are minted. When user un-stakes FIO their principal and reward gets deducted from this pool. Global combined_token_pool
Rate of Exchange (ROE) Used to determine number of SRPs to issue based on staking amount, or additional FIO Tokens to issue when unstaking. When fee is paid. When Staking Rewards Reserves are minted. Never. Computed as needed. roesufspersrp
Staked Token Pool Minimum To avoid ROE volatility, Staking Rewards will only be credited if Staked Token Pool counter is greater than 1M FIO Tokens (Staking Activation). Never. Never. System Constant STAKEDTOKENPOOLMINIMUM
Earliest Activation Date To ensure wallets and exchanges have enough time to integrate FIO Staking, Staking Activation cannot occur earlier than October 20th, 2021 (subject to change during development and testing). Never. Never. System Constant ENABLESTAKINGREWARDSEPOCHSEC
Daily Staking Mint Threshold If tokens received from fees to Rewards Token Pool in a 24-hour period are less that Daily Staking Mint Threshold, the difference between fees received and Daily Staking Mint Threshold will be minted and added to Combined Token Pool Never. Never. Global DAILYSTAKINGMINTTHRESHOLD
Staking Rewards Reserves Maximum Set to 25,000,000 FIO tokens, it's the maximum number of tokens that can be issued to supplement Staking Rewards from fees. Never. Never. System constant STAKINGREWARDSRESERVEMAXIMUM
Staking Rewards Reserves Minted Amount of Staking Rewards Reserves minted to date. When Staking Rewards Reserves are minted. Never. Global staking_rewards_reserves_minted

High-level

Staking

User can stake any available FIO Token amount in their account at any point in time. To stake, the account has to be voting for at least 1 BP or proxying/auto-proxying. The FIO Tokens do not actually leave the user's account, but are instead "locked" and cannot be spent until unstaked.

When tokens are staked, they cannot be transferred, used to pay a FIO Chain fee, or locked.

Tokens Staked do count towards voting power of account.

Tokens locked via Mainnet or FIP-6 locks, cannot be staked. If the account has Mainnet locked tokens, then the user may stake and unstake the unlocked portion of those tokens in that account (all unlocked tokens are eligible for staking, and should stake and unstake as expected). If the account has general FIP-6 locked tokens, then the user may stake and unstake the unlocked portion of those tokens in the account (all unlocked tokens are eligible for staking, and should stake and unstake as expected).

The Account Staking Reward Point, and the Account Tokens Staked are updated when staking occurs. This maintains accurate staking information per account.

Staking Reward Point

When user stakes FIO Tokens they "exchange" FIO Tokens for Staking Reward Points (SRPs) at then current Rate of Exchange (ROE). SRP is not an actual token and cannot be transferred. It simply acts as a representation of future staking rewards and is attached to the account which is staking.

Staking Rewards

Currently when a fee is paid, it gets distributed as follows:

Share Recipient
85% Block Producers
10% Entity facilitating transaction (TPID) or, if not provided, block producers.
5% Foundation

This FIP proposes a change to the fee distribution to redirect 25% of the fee paid to the Staking Rewards, which will be used to reward users who are staking their FIO Tokens.

After this FIP is adopted, when a fee is paid, it is distributed as follows:

Share Recipient
60% Block Producers.
25% Staking Rewards.
10% Entity facilitating transaction (TPID) or, if not provided, block producers.
5% Foundation.

Staking Rewards Reserves

In addition, if 25% of fees collected in any one day is less than 25,000 FIO, new tokens will be minted to increase the amount "reserved" for Staking Rewards to 25,000 FIO. The Staking Rewards Reserves Maximum will be set at 25M. Once that is reached there will not be a minimum daily amount redirected to Staking Rewards.

The Foundation will burn 25M FIO Tokens from Address Giveaway bucket to ensure total supply stays at 1B.

Unstaking

User can unstake any amount in their account at any point in time. When they do, they will exchange SRPs back into FIO Tokens at the current Rate of Exchange. Since the ROE is likely to be higher at time of unstake, they will end up with more FIO Tokens than originally staked.

Since the user specifies FIO Tokens when unstaking, to determine the amount of SRPs that need to be converted, the following calculation is completed:

SRPs to Unstake = SRPs in Account * (Unstaked Tokens/Total Tokens Staked in Account)

The unstaked amount of FIO Tokens is locked in the account for a period of 7 days (using FIP-6 logic) before it can be transferred or staked again. All tokens locked as a result of staking should unlock on the same time of day (0:00:01 GMT) to avoid multiple entries into lock table. This way the lock will be anywhere from 6 to 7 days depending on when the unstake action is called.

When unstaking, the protocol will remove any general locking periods that have already expired. This will provide users the ability to wait for periods to pass should they run into the situation where they have close to the maximum permitted locking periods in thier general locks.

The Account Staking Reward Point, and the Account Tokens Staked are updated when unstaking occurs. This maintains accurate staking information per account.

Rate of Exchange

ROE is determined based on the following formula:

1 SRP = [ Tokens in Combined Token Pool / Global SRPs ] FIO

Because staking and un-staking increments/decrements tokens in Combined Token Pool and Global SRPs at the then current ROE, only addition of Staking Rewards to Combined Token Pool will increase the ROE.

ROE will be initialize at 1 FIO = 2 SRT and remain that until Staking Activation.

In addition:

  • ROE can only go up, so user is guaranteed at least their principal back.
  • The sooner they stake the better the ROE.
  • The more fees collected, the higher the ROE.
  • Future ROE and therefore annualized return cannot be determined at the time of staking as it is dependent on future fees collected and tokens staked.
  • When a user stakes/unstakes tokens, the ROE should be computed before their stake/unstake amounts are added to global state.

Staking Activation

Staking Activation occurs when both conditions are met:

  • Staked Token Pool Minimum FIO Tokens have been staked.
  • Current date is later than Earliest Activation Date.

Once activated, Staking cannot become deactivated, even if FIO Tokens staked drops below Staked Token Pool Minimum.

Before Staking Activation

All functionality described in this FIP is operational, except the ROE is overwritten to be 1 FIO = 2 SRT irrespective of the calculated ROE. This means:

  • Users can stake tokens.
  • Staking Rewards are accruing to the Rewards Token Pool.
  • Staking Rewards Reserves are being minted.
  • Users can un-stake tokens. However, since the ROE is overwritten to be 1 FIO = 2 SRT, they will receive the same number of tokens they staked.
  • If a user's stake transaction crosses the Staked Token Pool Minimum, Staking is Activated as the last stepo, meaning it will impact the next user, not the one who executed the transaction which corssed the Staked Token Pool Minimum.

After Staking Activation

All functionality described in this FIP is operational and calculated ROE is used. This means users will now likely receive a higher number of tokens upon unstake.

Rewards for TPID

When user unstakes FIO Tokens, the TPID attached to the unstake action receives (using same methodology as all TPID rewards: accrues to TPID and is claimed using claim_tpid_rewards) 10% of the difference between tokens being unstaked and FIO Tokens received as a result of SRP to FIO Token conversion. If no TPID is provided, the 10% remains undistributed.

New actions

Stake FIO Tokens

Stake FIO Tokens.

Contract: fio.staking

New action: stakefio

New end point: /stake_fio_tokens

New fee: stake_fio_tokens, bundle-eligible (1 bundled transaction) fee amount will be determined during development and updated here

RAM increase: To be determined during implementation

Request body

Parameter Required Format Definition
amount Yes Int Amount of SUFs to stake.
fio_address Yes String FIO Address if using bundled transactions to pay. May be left empty if paying a fee instead.
max_fee Yes Positive Int Maximum amount of SUFs the user is willing to pay for fee. Should be preceded by /get_fee for correct value.
tpid Yes FIO Address FIO Address of the entity which generates this transaction. TPID rewards will be paid to this address. Set to empty if not known.
actor Yes 12 character string Valid actor of signer
Example
{
  "amount": 1000000000,
  "fio_address": alice@purse,
  "max_fee": 1000000000,
  "tpid": "rewards@wallet",
  "actor": "aftyershcu22"
}

Processing

  • Request is validated per Exception handling.
  • stake_fio_tokens fee is collected or bundled transaction deducted (if FIO Address passed in and has available bundled transactions)
  • RAM of signer is increased. amount of RAM increase will be computed during development and updated in this FIP
  • SRPs to Award are computed: amount / Rate of Exchange
  • Account Tokens Staked is incremented by amount in account related table. Account Tokens Staked cannot be spent by the user.
  • Account Staking Reward Point is incremented by SRPs to Award in account related table
  • Combined Token Pool count is incremented by amount.
  • Global SRP count is incremented by SRPs to Award.
  • Staked Token Pool is incremented by amount.
  • check for maximum FIO transaction size is applied
  • If the account has not voted or proxied their tokens and TPID is provided and that TPID is a valid proxy, the Account not voted or proxied exception should not be triggered. This will allow for auto-proxy to be set-up with the stakefio action.

Exception handling

Error condition Trigger Type fields:name fields:value Error message
Account not voted or proxied Staker's account has not voted for at least 1 BP or is not proxying/auto-proxying. 400 "actor" Value sent in, e.g. "aftyershcu22" "Account has not voted or is not proxying."
Invalid amount value amount format is not valid 400 "amount" Value sent in, e.g. "-100" "Invalid amount value"
Invalid FIO Address Format of FIO Address not valid, FIO Address does not exist or is not mapped to a valid FIO Public Key. 400 "fio_address" Value sent in, i.e. "purse@alice" "FIO Address invalid, does not exist."
FIO Address expired Supplied FIO Address has expired 400 "fio_address" Value sent in, i.e. "purse@alice" "FIO Address expired."
FIO Domain expired Domain of supplied FIO Address has expired more than 30 days ago 400 "fio_address" Value sent in, i.e. "purse@alice" "FIO Domain expired."
Invalid fee value max_fee format is not valid 400 "max_fee" Value sent in, e.g. "-100" "Invalid fee value"
Fee exceeds maximum Actual fee is greater than supplied max_fee 400 "max_fee" Value sent in, e.g. "1000000000" "Fee exceeds supplied maximum"
Insufficient balance Available (unlocked and unstaked) balance in Staker's account is less than chain fee + amount 400 "max_fee" Value sent in, e.g. "100000000000" "Insufficient balance"
Invalid TPID tpid format is not valid 400 "tpid" Value sent in, e.g. "notvalidfioaddress" "TPID must be empty or valid FIO address"
Not owner of FIO Address The signer does not own the FIO Address 403 Type: invalid_signature
Signer not actor Signer not actor 403 Type: invalid_signature

Response body

Parameter Format Definition
status String OK if successful
fee_collected Int Amount of SUFs collected as fee
Example
{
  "status": "OK",
  "fee_collected": 2000000000
}

Unstake FIO Tokens

Unstake FIO Tokens.

Contract: fio.staking

New action: unstakefio

New end point: /unstake_fio_tokens

New fee: unstake_fio_tokens, bundle-eligible (1 bundled transaction) fee amount will be computed during development and updated here.

RAM increase: To be determined during implementation

Request body

Parameter Required Format Definition
amount Yes Int Amount of SUFs to unstake.
fio_address Yes String FIO Address if using bundled transactions to pay. May be left empty if paying a fee instead.
max_fee Yes Positive Int Maximum amount of SUFs the user is willing to pay for fee. Should be preceded by /get_fee for correct value.
tpid Yes FIO Address FIO Address of the entity which generates this transaction. TPID rewards will be paid to this address. Set to empty if not known.
actor Yes 12 character string Valid actor of signer
Example
{
  "amount": 1000000000,
  "fio_address": alice@purse,
  "max_fee": 1000000000,
  "tpid": "rewards@wallet",
  "actor": "aftyershcu22"
}

Processing

  • Request is validated per Exception handling.
  • unstake_fio_tokens fee is collected or bundled transaction deducted (if FIO Address passed in and has available bundled transactions)
  • RAM of signer is increased, amount of ram increment will be computed and updated into FIP during development
  • SRPs to Claim are computed: Staker's Account SRPs * (Unstaked amount / * Total Tokens Staked in Staker's Account*)
  • Staking Reward Amount is computed: ((SRPs to Claim * Rate of Exchnage) - Unstake amount) * 0.9
  • TPID Reward Amount is computed: ((SRPs to Claim * Rate of Exchnage) - Unstake amount) * 0.1
  • Account Tokens Staked is decremented by amount in account related table.
  • Account Staking Reward Point is decremented by SRPs to Award in account related table
  • Staking Reward Amount is transferred to Staker's Account. Memo: "Paying Staking Rewards"
  • Global SRP count is decremented by SRPs to Claim .
  • Combined Token Pool count is decremented by amount + Staking Reward Amount.
  • Staked Token Pool is decremented by amount
  • If tpid was provided, TPID Reward Amount is awarded (using same methodology as all TPID rewards: accrues to TPID and is claimed using claim_tpid_rewards) to the tpid and decremented from Combined Token Pool.
  • check for max FIO transaction size exceeded will be applied.
  • amount + Staking Reward Amount is [locked]is locked in Staker's Account for 7 days. in Staker's Account for 7 days.
  • Ensure that expired locking periods are removed.
  • Ensure that new locking period is added same day as any pre-existing locking period.

Exception handling

Error condition Trigger Type fields:name fields:value Error message
Invalid amount value amount format is not valid 400 "amount" Value sent in, e.g. "-100" "Invalid amount value"
Ustake exceeds staked amount to unstake is greater than the total staked by account 400 "amount" Value sent in, e.g. "100000000000" "Cannot unstake more than staked."
Invalid fee value max_fee format is not valid 400 "max_fee" Value sent in, e.g. "-100" "Invalid fee value"
Invalid FIO Address Format of FIO Address not valid, FIO Address does not exist or is not mapped to a valid FIO Public Key. 400 "fio_address" Value sent in, i.e. "purse@alice" "FIO Address invalid, does not exist."
FIO Address expired Supplied FIO Address has expired 400 "fio_address" Value sent in, i.e. "purse@alice" "FIO Address expired."
FIO Domain expired Domain of supplied FIO Address has expired more than 30 days ago 400 "fio_address" Value sent in, i.e. "purse@alice" "FIO Domain expired."
Fee exceeds maximum Actual fee is greater than supplied max_fee 400 "max_fee" Value sent in, e.g. "1000000000" "Fee exceeds supplied maximum"
Insufficient balance Available (unlocked and unstaked) balance in Staker's account is less than chain fee + amount 400 "max_oracle_fee" Value sent in, e.g. "100000000000" "Insufficient balance"
Invalid TPID tpid format is not valid 400 "tpid" Value sent in, e.g. "notvalidfioaddress" "TPID must be empty or valid FIO address"
Not owner of FIO Address The signer does not own the FIO Address 403 Type: invalid_signature
Signer not actor Signer not actor 403 Type: invalid_signature

Response body

Parameter Format Definition
status String OK if successful
fee_collected Int Amount of SUFs collected as fee
Example
{
  "status": "OK",
  "fee_collected": 2000000000
}

Modified actions

Fee collection on any action

Anytime a fee is paid, 25% of the amount collected is added to Daily Staking Rewards counter, but the entire amount of the fee is transferred to treasury account (same as today).

BP claim

Modified to mint Staking Reward Reserves.

Contract: fio.treasury

Modified action: bpclaim

Modified end point: /claim_bp_rewards

Request body

No changes

Example

No changes

Processing

When bpclaim is ran for the first time in a 24-hour period and payment schedule is being built the following Staking Rewards logic will be executed:

  • If Daily Staking Rewards is less than 25,000 FIO Tokens and Staking Rewards Reserves Minted is less than Staking Rewards Reserves Maximum:
    • The difference between 25,000 FIO Tokens and Daily Staking Rewards (or difference between Staking Rewards Reserves Minted and Staking Rewards Reserves Maximum, whichever is smaller) is minted, transferred to treasury account and added to Staking Rewards Reserves Minted.
    • Daily Staking Rewards is incremented by the tokens minted.
  • Daily Staking Rewards amount is:
    • Added to Combined Token Pool, which modifies ROE
    • Set to 0

Exception handling

No changes

Response body

No changes

Example

No changes

Transfer locked tokens

Modified to take in SUFs for periods instead of percentages.

Contract: fio.token

Modified action: trnsloctoks

Modified end point: /transfer_locked_tokens

Request body

Parameter Required Format Definition
payee_public_key Yes Valid FIO Public Key FIO public key of account where locked tokens will be sent.
can_vote Yes 0 is not can_vote, 1 is can_vote. This indicates if the locked amount can vote/proxy while locked.
periods Yes JSON Array of unlock periods. See periods below. See Lock period verification in Processing for requirements. Schedule by which tokens become unlocked.
amount Yes Int The amount of tokens to transfer and lock in SUFs
max_fee Yes Positive Int Maximum amount of SUFs the user is willing to pay for fee. Should be preceded by /get_fee for correct value.
tpid Yes FIO Address FIO Address of the entity which generates this transaction. TPID rewards will be paid to this address. Set to empty if not known.
actor Yes 12 character string Valid actor of signer
unlock_periods
Parameter Required Format Definition
duration Yes Int Seconds from lock creation to when unlock of corresponding percentage occurs.
amount Yes Int Amount of locked tokens in SUFs that unlock after corresponding duration lapsed.
Example
{
	"payee_public_key": "FIO8PRe4WRZJj5mkem6qVGKyvNFgPsNnjNN6kPhh6EaCpzCVin5Jj",
	"can_vote": 0,
	"periods": [
		{
			"duration": 86400,
			"amount": 1000000000000
		},
		{
			"duration": 172800,
			"amount": 500000000000
		},
		{
			"duration": 259200,
			"amount": 500000000000
		}
	],
	"amount": 2000000000000,
	"max_fee": 40000000000,
	"tpid": "rewards@wallet",
	"actor": "aftyershcu22"
}

Processing

Modify to:

  • Process SUFs and not percentages
  • Validate that amount of lock is equal to sum of amounts in periods, if not return already spec'd Invalid Amount error
  • Maximum number of allowed periods is now 50.

Exception handling

No changes

Response body

No changes

Example

No changes

Modified getters

Get locks

Modified to return SUFs for periods instead of percentages.

Modified end point: /get_locks

Request body

No changes

Example

No changes

Processing

No changes

Exception handling

No changes

Response body

Group Parameter Format Definition
lock_amount Int SUFs initial locked.
remaining_lock_amount Int SUFs still locked.
time_stamp Int Epoch time when lock started.
payouts_performed Int Number of unlock periods which were unlocked.
can_vote Int Indicates if the locked amount can vote while locked: 0 - can not vote, 1 - can vote.
unlock_periods duration Int Seconds from lock creation to when unlock of coresponding percentage occurs.
unlock_periods amount Int Amount of locked tokens in SUFs that unlock after coresponding duration lapsed.
Example
{
	"lock_amount": 2000000000000,
	"remaining_lock_amount": 1000000000000,
	"time_stamp": 1638918166,
	"payouts_performed": 2,
	"can_vote": 1,
	"unlock_periods": [
		{
			"duration": 86400,
			"amount": 1000000000000
		},
		{
			"duration": 172800,
			"amount": 500000000000
		},
		{
			"duration": 259200,
			"amount": 500000000000
		}
	]
}

Get balance

Modified to consider and include staked tokens.

Modified end point: /get_fio_balance

Request body

Unchanged

Example
{
	"fio_public_key": "FIO8PRe4WRZJj5mkem6qVGKyvNFgPsNnjNN6kPhh6EaCpzCVin5Jj"
}

Processing

  • Available balance should exclude staked tokens. Staked tokens are returned as new value.
  • If available is different from balance the getter will check the FIP-6 getter table and recalculate available based on balance - staked - what is actually locked based on current time. This is to ensure accurate available is returned in case where a lock period has passed (tokens are unlocked), but the user has not made any actions to the chain to recalculate the locks table and available. In addition unlock_periods which are in the past are removed from the array.

Exception handling

Unchanged

Response body

Parameter Format Definition
balance Int Total SUF balance associated with supplied public key (includes locked tokens).
available Int Available SUF balance (see Processing).
staked Int SUFs being staked.
srps Int Amount of SRPs in account.
roe Double Current SRP-FIO rate of exchange. Before Staking Activation this should always be 1.
Example
{
	"balance": 100000000000,
	"available": 100000000000,
	"staked": 1000000000,
	"srps: 1000000000,
	"roe": 2.333333333
}

Rationale

Other approaches

There were several versions of staking discussed and considered. The SRP approach was modeled after EOSIO REX Implementation. EOSIO requires a transfer of tokens and issues a transferable REX token. FIO’s implementation does not have to require a transfer because:

  • We do not have a requirement for the reward point to be transferable.
  • We do have ability to lock tokens in account.

Vote/proxy on unstake

Requiring users to vote/proxy within 30 days on ustake was considered, but abandoned due to potential usability impact.

Burning/minting of tokens for Staking Rewards

An approach was considered to burn the 25% of tokens paid on any fee and then minting that amount when required to pay out the rewards on unstaking. It was abandoned to stay consistent with how fees are collected and tracked today.

Changes to locks

As part of this FIP, it was discovered that existing FIP-6 locking functionality, which uses percentage for each lock period, will not be able to sufficiently support unstaking locking required by this FIP. As a result, and to make locks more robust for future applications, this FIP modifies locking to accept SUFs instead of percentages when specifying period amount. In addition, FIP-29 was created to disable existing locking until this enhancement can be delivered.

In addition, during testing it was discovered that trnsloctoks does not handle large number of lock periods. Therefore, it was determined that the best strategy for now is to limit the number of periods to 50.

Staked Token Pool Minimum

Staked Token Pool Minimum has been put in place to prevent big swings in ROE early on when Staking Rewards are deposited while Staked Token Pool is low.

Implementation

Detailed Design

The detailed design, project plan, and implementation plan will be published into the Development Specification.

Token burning

Foundation will burn 25,000,000 FIO Tokens from FIO Address Giveaways using retire action being implemented in FIP-22. Tokens from the following buckets would be burned:

FIO88G7GxhNwdyU18NtGoUQdCm1VHCa36qcJkzQn2Xa9AkRsQG6JN,1000000
FIO7va9jDjPwqzcMSaEWgbrN9uK34TMdQGyDBfsKHN11mqubtj4xe,1000000
FIO8JxdnAvzw4csiKspGTRrome9y8wGYAdqcaggpK3G8LXyzRHiAf,1000000
FIO8j8oEuH33Y7BTpHeMQW8vxSb4ty3quBQfGxWDQWvHqjySm8VnL,1000000
FIO8fDMQW9ZKxve5BioLmWBs8fkSQGH9SWRYyidMUoGhcBfRjmjDB,1000000
FIO4tfBPYAiJ4CPgtixxYNp13qqwH6YtBNcAw2XWhDmHLM6TuKY5R,1000000
FIO77gtGcW4uJCDTCQTGhHnuoFfBAJYqPeeMCA473rVua1PTJK4o5,1000000
FIO8MVFTp6D67fdrgwr6ixdU1AocsfBQCXEAVCRBsy54RoiKY2NSh,1000000
FIO6kmFa4ChwTSBYvSWsuJLCMEZTKRtQtBwvcgQgK4sZ3VaURcgsN,1000000
FIO51GYMDc5KRiBc9HjcBmxqUoNq2feZQ6NKp3tXsC98J8MyWNBxH,1000000
FIO7WQDewPZ51YHYLrA1FiJYibd2oH7dqYuekMWsGjfSKwnDFybeK,1000000
FIO7R2LkGFa7NGCMb3q4NLLcyemd5a5myRLKDHwsMBTonooV8NkNq,1000000
FIO6tmSL9d3QfM53xVmwtC1zyg9PaP5cQG3FxLZVx4UFEDWdHXThs,1000000
FIO52JyFvZ3dFGEYRhWZjRbPgZE3PLCHvQUR7fY6NDKpVLTC5jNTN,1000000
FIO6jKigWguQp5aNBo63ZKvvoqtu3NRJLThQ97M1KS1mszcnSKmHj,1000000
FIO4vysXkZgyxT4CVy29CddbhNd8Bu7jEX5jBv6qB5bMij8yoCbSt,1000000
FIO87ske8DY6sWbuCctm5B2m41gfvptFh1NxK1YQtJ8ZYEqm4J7nJ,1000000
FIO5kXPMpTWWWqzjhbx7Y2U4VyGKDKYH7APnfopTNAfz7yci36TfN,1000000
FIO7ruWrSw7wYN7zbwN11RQ2SY67NMQbPaBwUTnY9PUo9oCPj2VoS,1000000
FIO5KW2oXEXkRMzWRZfGkyggvv5XXpMUdTijXDKqNVduDGnaeAnUL,1000000
FIO4xAj8QNedsx2w2PtomNHekbuvdhLx3VxFvhz9nSJTZidWW3jdD,1000000
FIO79GsPoupXYPKgZQeNKF1LexGgcHJW9zWKJK8CWaVAne7FeTZvp,1000000
FIO5XkTE59mwzfNwji5fqR4jSca4dxZbNNJfnc4S5VF1hh7Aon9Fs,1000000
FIO5S7PrXM1osAN4t5DjWPsT9tDYpTgXmDdfto2emPRGja6GHsuUx,1000000
FIO8PTt3EPLuMGjnQvZXUe5TfZJW7DbpWby4VjXFRnxHW5peBsFU1,1000000

Variables to track in state

  • Combined Token Pool
  • Staked Token Pool
  • Staking Rewards
  • Staking Rewards Reserves Minted
  • Global SRP
  • SRPs per account
  • Tokens Staked per account
  • Daily Staking Rewards

Release information

The following changes were included in fio.contracts v2.6.0

  • New contract actions stakefio and unstakefio were added
  • trnsloctoks was modified as per FIP-21

The following changes were included in fio v3.2.0

  • New stake_fio_tokens and unstake_fio_tokens API endpoints were added
  • transfer_locked_tokens, get_fio_balance, and get_locks were modified as per FIP-21

Backwards Compatibility

/get_fio_balance is the only existing API method being modified, but only new response elements are added, so wallets currently implementing this call should not be affected.

Future considerations

None

Discussion link

https://fioprotocol.atlassian.net/wiki/spaces/WP/pages/34078744/FIO+Staking