LEEQUID
  • 👋 Welcome
  • Navigating LEEQUID
    • 🌱 Staking
      • The staking protocol
      • Matching stake to unstake requests
      • Potential wait times while staking
      • Deposited LYX lifecycle
      • Importing sLYX to your wallet
    • 🍇 Collecting rewards
      • Reward distribution in the LEEQUID protocol
      • Auto-compounding
      • Withdrawing rewards
      • Reward calculation in Proof of Stake
    • 🍂 Exiting the protocol
      • Option 1: swapping sLYX for LYX
      • Option 2: unstaking through the staking pool
      • Matching unstake to stake requests
      • Potential wait times while unstaking
    • 🍷 Claiming
      • Claim queued stake
      • Claim unstaked LYX
      • Claim rewards
    • 🔄 Swapping
      • LYX for sLYX: An instant alternative to staking
      • sLYX for LYX: an instant alternative to exiting
      • Providing liquidty
      • Providing Liquidity: a practical example
  • LEEQUID in depth
    • 🔐 Protocol security and risks
      • Security overview
      • Smart contract code correctness
      • Slashing and unexpected validator behaviour
      • sLYX token: economic balance
      • Validator key management
    • 📃 Smart contracts
      • Oracles
      • Merkle Distributor
      • Rewards
      • Pool
      • StakedLyxToken
      • FeesEscrow
    • 💧 The sLYX token
      • Acquiring sLYX
      • 1:1 ratio with LYX
      • Potential unpeg of sLYX from LYX
    • 💦 The liquidity pool (DEX)
      • Implementation
  • Incident Response
    • Contacts
    • Vulnerability Disclosure Policy
Powered by GitBook
On this page
  1. Navigating LEEQUID
  2. 🌱 Staking

Matching stake to unstake requests

Last updated 1 year ago

When a new stake request reaches the Pool contract, the list of pending unstake requests is checked for a possible match. This match can be either total or partial, meaning a fraction of the stake request might be matched while the remainder follows the regular activation route. This system reduces transaction fees, as well as potential waiting times for both onboarding and exiting users.

The ideal situation is a full match, but it might happen that the amount entering the staking pool is higher than the amount pending to exit. In this scenario, a partial match occurs: some of the staker's sLYX will come from the matching system, and the rest is minted by the protocol. The part minted by the protocol is subject to , and might only be available a few hours to a few days later. In this situation, the fraction matched will immediately show up in the user's wallet after the staking transaction, and the fraction queued for activation will have to be at a later date.

potential waiting times
claimed
Flow of the staking process inside the Pool contract. Notice that the matching mechanism kicks in right after the staking request reaches the pool.