Valantis Documentation
Valantis Website
  • Welcome to Valantis
  • Sovereign Pool
    • The Modules
      • Pool Manager
      • Liquidity Module
      • Swap Fee Module
      • Verifier Module
      • Oracle Module
      • Sovereign Vault
        • Rebase token support
      • Gauge
    • Interacting with Pools
      • Swap Parameters
      • Swap Steps
      • Multi Token Support
      • Deposit Liquidity
      • Withdraw Liquidity
      • Flash Loans
  • Hybrid Order Type (HOT)
    • Understanding HOT: A Graphical Overview
    • HOT API
      • HTTP request parameters
      • HTTP request response
      • Reasoning for Request structure
      • Solver Integration
      • Market Maker integration
    • HOT Smart Contracts
      • Interfaces
      • State variables and roles
      • AMM
      • HOT Swap
      • AMM Swap
      • Hybrid Order Type (HOT) struct parameters
      • Alternating Nonce Bitmap
      • Deposits
      • Withdrawals
      • Deployment Assumptions
    • Liquidity Manager Docs
      • Reference Oracle
      • Deposit
      • Withdraw
      • Signature
    • Swap
      • Swap Context
      • AMM Swap
      • HOT Swap
      • HOT Quote Parameters
        • Bitmap Nonce Instructions
    • Solver Docs
      • Solver Request
      • Simple HOT Swap Example
      • Partial Fill HOT Swap Example
    • Risks and Trust Assumptions
      • Roles
        • Sovereign Pool Manager
        • HOT Manager
        • HOT Signer
        • Liquidity Provider
      • Threats
        • Deposit Sandwich
        • Malicious Price Bound
        • Malicious Signer
        • Mispriced HOT Quote
  • Validly
    • Understanding Validly
    • Swap
    • Deposits and Withdrawals
    • Deployments
  • Stake Exchange (stHYPE AMM)
    • Swap
      • Instant Withdrawals (LST -> Native Token)
      • New Stake (Native Token -> LST)
    • LP Positions
      • LP Withdrawals Instant
      • LP Withdrawal Queued
    • Ratio Fee
    • Lending of Reserves
    • Smart contracts
      • STEXAMM.sol
      • StHYPEWithdrawalModule.sol
      • StexRatioSwapFeeModule.sol
      • DepositWrapper.sol
      • AaveLendingModule.sol
    • Risks and Trust Assumptions
    • Integration examples
  • Deploy and Build
  • Resources
    • Audits
    • Links
    • Get HYPE on HyperEVM
Powered by GitBook
On this page

Was this helpful?

  1. Stake Exchange (stHYPE AMM)

Ratio Fee

PreviousLP Withdrawal QueuedNextLending of Reserves

Last updated 2 months ago

Was this helpful?

The Ratio Swap Fee Module is one of many dynamic fee mechanisms that can be used to price LST-> Native Token swaps in STEX AMM. The Ratio Fee follows similar logic to the Utilization Rate formula commonly used in Lending and Borrowing Protocols, the goal being to incentive LPs based on the amount of LST reserves they are exposed to and incentivize productive capital (Native Token deposits) when they are needed.

The Swap Fee Module applies a fee based on swap direction:

  • Native Token -> LST swaps always receive a zero fee

  • LST -> Native Token swaps receive a dynamic fee between feeMin and feeMax corresponding to how the swap affects LPs current exposure to LST reserves.

The Swap Fee Module uses four parameters to determine the swap fee

  • feeMinBips - fee applied when the current ratio is below the threshold

  • feeMaxBips- fee applied when the current threshold is above the maximum threshold

  • minThresholdBips- the critical ratio where a linear fee is applied

  • maxThresholdBips- the critical ratio where fee reaches a maximum

The LST: Native Token Ratio is measured as the current LST reserves (in the pool and queued for withdrawal) divided by the Native Token reserves (In the pool and lending module).

The resulting dynamic fee acts to incentivize liquidity providers when they take on large LST-denominated positions. This swap fee ensures APY is high to incentivize new LP deposits when the ratio is imbalanced while properly pricing the risk associated with holding a position denominated in the LST.