Geode Document Hub
  • Geode Document Hub
  • The Staking Library
    • 🔥The Issue
    • 🧯A Solution
  • Operator Marketplace
    • 🟢A Validator's Lifecycle
    • 🔵Maintenance Fee
    • 🟡Onboarding New Operators
    • 🔴Regulating the Marketplace
      • 🚨Prison
  • Key Concepts
    • 🪙Staking Derivatives
      • G-Derivatives
        • gETH vs gAVAX
    • 🌀Portal
      • 🔐Isolated Storage
      • 🤝Dual Governance
      • ⚠️Limited Upgradability
    • ⚙️Permissionless Configurable Staking Pools
      • 🎭Current Interfaces
      • ⛏️Maintainers
    • 🛡️Withdrawal Contracts
      • ⛑️Recovery Mode
      • 🕗Withdrawal Queue
    • 🌊Bound Liquidity Pools
    • 🔭Oracles
      • Telescope Ether
      • Telescope Avax
    • 👾Future of Geode
      • Better Maintainers (WIP)
      • Synthetic Liquidity (WIP)
      • Dynamic Withdrawals (WIP)
      • Further Decentralization
        • Supporting EIP-4788 (DRAFT)
        • Quadratic Weighted Senate (DRAFT)
        • Degen Operators (DRAFT)
        • Decentralized Telescope (DRAFT)
      • Chain Sync (AVAX) (draft)
  • Ethereum Guides
    • 📗Staking Pool HandBook
      • Initiating a Customizable Staking Pool
      • Managing Your Operator Set
      • Changing Your Pool's Owner
      • Manage Your Maintenance Fee
      • Private Pools and Whitelisting
      • Using a Bound Liquidity Pool
      • Using Maintainers for Your Pool
      • Securing Your Withdrawal Contract
      • Decentralizing Your Pool
    • 📕Operator Handbook
      • Get Onboarded
      • Initiating an Operator
      • Communicating with Portal
      • Creating Validators
      • Changing an Operator's Owner
      • Switching Your Fee
      • Switching Your Validator Period
      • Using Maintainers
      • Optimizing Your Revenue
      • Exiting Validators
    • 📘Liquidity Pool HandBook
  • Avalanche Guides
    • Staking Pool Handbook
    • Operator Handbook
  • Developers
    • Networks
    • Live Contracts
      • Avalanche v1
      • Ethereum v2
        • gETH.sol
        • Portal.sol
          • globals.sol
          • DataStoreUtilsLib.sol
          • GeodeUtilsLib.sol
          • DepositContractUtilsLib.sol
          • OracleUtilsLib.sol
          • StakeUtilsLib.sol
        • Swap.sol
          • AmplificationUtils.sol
          • MathUtils.sol
          • SwapUtils.sol
          • LPToken.sol
        • WithdrawalContract.sol
        • Interfaces
          • ERC20InterfaceUpgaradable.sol
          • ERC20InterfacePermitUpgradable.sol
    • Audits
    • Bug Bounties
Powered by GitBook
On this page
  • Savior of the Stakers.
  • Every Staking Pool has a unique Withdrawal Contract.
  • Withdrawal Contracts Are Smart
  • Upgrading Withdrawal Contracts
  • Recovery Mode
  • Withdrawal Queue
  1. Key Concepts

Withdrawal Contracts

Savior of the Stakers.

The Staking Library utilizes Contract Owned Staking Derivatives. The contract in question is called the Withdrawal Contract.

Withdrawal Contracts are simple contracts:

They secure the staked funds and handle the withdrawal queues.

Every Staking Pool has a unique Withdrawal Contract.

When a staking pool is created, the latest version of the Withdrawal Contract is deployed automatically.

The owner of the Withdrawal Contract is the owner of the staking pool.

Any tokens related to a validator end their journey in the Pool's Withdrawal Contract:

  • Staking Rewards

  • Block Rewards

  • MEV profits

  • Principle

  • Fees

Withdrawal Contracts Are Smart

Like Portal not trusting it's Governance, Withdrawal Contracts don't trust Portal : it uses dual governance and limited upgradability.

Changing the latest version of the Withdrawal Contracts requires the approval of the Senate.

Changing the implementation code of a specific Pool's Withdrawal Contract requires the approval of the Pool Owner.

Meaning, although they are upgradable, not even Geode Governance has access to the funds within the Withdrawal Contract.

Upgrading Withdrawal Contracts

  1. A new Withdrawal Contract is proposed by the Governance with the TYPE of WITHDRAWAL_CONTRACT_UPGRADE

  2. Geode Senate Approves the new Withdrawal Contract. From now on, Portal refers to the new implementation address

  3. Then, anyone can call fetchUpgradeProposal:

    1. fetchUpgradeProposal notifies the Portal.

    2. Portal proposes a new implementation of Withdrawal Contract with the TYPE of UPGRADE.

    3. Withdrawal Contracts pointing the old implementation enter into Recovery Mode.

    4. Owners can approve the proposal and migrate to a new implementation, exiting from Recovery Mode.

If the fetchUpgradeProposal is called by the Owner, the proposal is also automatically approved.

Recovery Mode

Withdrawal Queue

PreviousMaintainersNextRecovery Mode

Last updated 2 years ago

🛡️
⛑️Recovery Mode
🕗Withdrawal Queue