GEB Docs
  • Introduction to GEB
  • Community Resources
  • FLX Mechanics
  • FAQ
  • RAI
    • RAI Use-Cases
    • Multi-chain RAI
    • RAI Integrations
  • The Money God League
    • Intro to The League
  • Ungovernance
    • Governance Minimization Guide
  • Risk
    • GEB Risks
    • PID Failure Modes & Responses
  • Incentives
    • RAI Uniswap V2 Mint + LP Incentives Program
    • RAI Uniswap V3 Mint + LP Incentives Program (Inactive)
    • FLX Staking
    • RAI / ETH Uniswap V3 Oracle LP Incentives Program
  • Contract Variables Translation
    • Core Contracts Naming Transition
    • Governance Contracts Naming Transition
    • SAFE Management Contract Naming Transition
  • System Contracts
    • Core Module
      • SAFE Engine
      • Liquidation Engine
      • Accounting Engine
    • Auction Module
      • English Collateral Auction House
      • Fixed Discount Collateral Auction House
      • Increasing Discount Collateral Auction House
      • Debt Auction House
      • Surplus Auction House
    • Oracle Module
      • Oracle Relayer
      • Medianizer
        • DSValue
        • Governance Led Median
        • Chainlink Median
        • Uniswap V2 Median
      • FSM
        • Oracle Security Module
        • Dampened Security Module
        • FSM Governance Interface
    • Token Module
      • Token Adapters
      • System Coin
      • Protocol Token
      • Protocol Token Authority
      • Protocol Token Printing Permissions
    • Money Market Module
      • Tax Collector
    • Sustainability Module
      • Stability Fee Treasury
      • FSM Wrapper
      • Increasing Treasury Reimbursement
      • Mandatory Fixed Treasury Reimbursement
      • Increasing Reward Relayer
    • Automation Module
      • Collateral Auction Throttler
      • Single Spot Debt Ceiling Setter
      • ESM Threshold Setter
    • Governance Module
      • DSPause
    • Shutdown Module
      • Global Settlement
      • ESM
  • Proxy Infrastructure
    • DSProxy
    • Proxy Registry
  • Helper Contracts
    • SAFE Manager
  • GEB.js
    • Getting Started
    • Global Settlement Guide
    • API Reference
      • Geb
      • Safe
      • Proxy Actions
      • Geb Admin
  • APIs
    • API Endpoints
  • Pyflex
    • Getting Started
      • Configuration
      • GEB Basics
    • SAFE Management
      • Opening a SAFE
      • Closing a SAFE
    • Numerics
  • Keepers
    • Keeper Overview
    • Collateral Auction Keeper
      • Running in Docker
      • Running on a Host
      • Liquidations & Collateral Auctions
      • Collateral Auction Flash Swaps
    • Debt Auction Keeper
      • Running in Docker
      • Running on a Host
    • Staked Token Auction Keeper
      • Running in Docker
      • Running on a Host
    • Surplus Auction Keeper
      • Running in Docker
      • Running on a Host
    • Bidding Models
  • Liquidation Protection
    • SAFE Protection
    • Liquidation Protection Guide
    • Uni-V2 RAI/ETH Savior Details
    • Curve V1 Savior Details
Powered by GitBook
On this page
  • 1. Overview
  • 2. Staking Pool Parameters
  • Mainnet
  • Kovan
  • 3. RAI Insolvency
  • Determining Insolvency
  • 4. Staking Walkthrough

Was this helpful?

  1. Incentives

FLX Staking

PreviousRAI Uniswap V3 Mint + LP Incentives Program (Inactive)NextRAI / ETH Uniswap V3 Oracle LP Incentives Program

Last updated 1 year ago

Was this helpful?

1. Overview

Stakers are in charge with protecting the RAI protocol from insolvency. They stake in a smart contract that then constantly checks whether RAI is well capitalized.

In case the protocol is undercapitalized (has debt that is not backed by collateral), the staking pool will start to auction FLX/ETH LP tokens in exchange for RAI that is then used to bring the protocol above water. Stakers will get diluted in this process. In exchange for protecting the protocol, stakers receive more FLX.

2. Staking Pool Parameters

Mainnet

  • Exit delay (thawing period): 21 days

  • Reward unlock period: 3 months. Locked rewards are unlocked linearly during a 3 month time period from the moment a staker requests that they claim their rewards

  • Percentage of rewards unlocked over 3 months: 75%

  • Percentage of rewards that can be claimed right away (no unlock): 25%

  • Percentage of LP tokens in the pool that can be slashed/auctioned: 30% (the rest of the pool isn't auctioned/slashed)

Kovan

  • Exit delay (thawing period): 1 minute

  • Reward unlock period: 10 minutes. Locked rewards are unlocked linearly during a 10 minute time period from the moment a staker requests that they claim their rewards

  • Percentage of rewards unlocked over 10 minutes: 75%

  • Percentage of rewards that can be claimed right away (no unlock): 25%

  • Percentage of LP tokens in the pool that can be slashed/auctioned: 30% (the rest of the pool isn't auctioned/slashed)

3. RAI Insolvency

The RAI protocol is "insolvent" when liquidations (collateral auctions) are not successful (cannot repay a Safe's debt by selling ETH) and they leave leftover RAI which is not backed by collateral anymore.

Liquidations can be unsuccessful when:

  • Only a portion of RAI is received by the liquidation out of the total amount of RAI that was requested

  • The value of ETH drops during a liquidation and there isn't any incentive to bid with RAI (value of ETH is less than the value of RAI requested)

  • The market price of RAI soars more than 10% above the redemption price which makes liquidations unprofitable

If there's too much unbacked RAI in the protocol, the system becomes insolvent. In case of insolvency, stakers are the first line of defense.

Anyone can call the staking pool to auction LP tokens immediately after the protocol becomes insolvent. In Section 2 above you can see the percentage of the staking pool that can be auctioned in exchange for RAI which is subsequently used to eliminate unbacked debt.

Determining Insolvency

4. Staking Walkthrough

In the Stake section, you can specify how many LP tokens you'd like to stake.

Once you stake, you will start to accrue rewards every block. You can claim rewards anytime using the Claim Reward button.

When you want to start unstaking, you can head over to the Unstaking section.

Unstaking must be done in two stages:

  • You request that a portion of your currently staked tokens should be unstaked

  • You wait for the full thawing period until you can get your LP tokens back from the staking contract

There are also several important things you must keep in mind when you unstake:

  • The amount of tokens that are waiting to be unstaked do not count toward accruing rewards anymore. You only accrue rewards for the tokens that are both staked and are not waiting to be unstaked

  • Take the following scenario: Alice has 10 tokens staked. She requests to unstake 5 tokens and has to wait 3 weeks to withdraw them from the contract. After 2 weeks, Alice requests that she unstakes another 3 extra tokens (so she's only earning rewards with 2 tokens now). Alice must wait 3 weeks from the moment of the second unstake request in order to withdraw the whole 8 tokens from the contract

  • Take another scenario: Alice has 10 tokens staked. She requests to unstake 5 tokens and has to wait 4 weeks to withdraw them from the contract. After 5 weeks, Alice does not unstake the 5 tokens but rather requests that she unstakes another 3 extra tokens (so she's only earning rewards with 2 tokens now). Alice must wait 4 weeks from the moment of the second unstake request even if the 5 tokens could have been withdrawn from the contract

Two things to keep in mind:

  • After you stake, the staking pool will mint a claim token for you called Staked FLX (stFLX). stFLX is not transferrable

  • You can still get slashed while you're waiting to unstake from the pool

You will notice that the amount of stFLX you receive might differ from the amount of LP tokens you stake. That is normal behaviour.

RAI being "insolvent" means that there must be at least debtAuctionBidSize unbacked RAI on the protocol's balance sheet. The debtAuctionBidSize can be automatically recomputed by the protocol approximately every 4 days (assuming that someone calls the protocol to recalculate the parameter). The current debtAuctionBidSize parameter value can be read from the contract.

The staking pool can read the amount of unbacked debt that the has and compare it to the debtAuctionBidSize value. If there's more unbacked debt than debtAuctionBidSize, it means that the protocol is insolvent and the staking pool can start to auction tokens.

First, you need to provide liquidity in this for mainnet and in for Kovan.

Once you receive your FLX/ETH LP tokens, head over (for mainnet) and (for Kovan) in order to see the staking dashboard.

FLX/ETH Uniswap v2 LP tokens
accounting engine
accounting engine
FLX/ETH Uniswap v2 pool
this pool
here
here
FLX/ETH Uniswap v2 Pool
Thawing period passed and you can now withdraw your LP tokens