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. Sovereign Pool
  2. The Modules
  3. Sovereign Vault

Rebase token support

Sovereign Pool supports rebase tokens natively, such as stETH and aTokens. Rebase tokens play an important role in Defi, and Valantis aims to treat them as first-class citizens where possible without introducing additional complexity. Rebase tokens change account balances over time due to rebase mechanisms and can lead to rounding errors during transfers by accounting balances using shares.

Rebase tokens can be supported in a Sovereign Pool by setting either isToken0Rebase=True or isToken1Rebase=True. If one of the above flags is True, the following considerations are applied:

  • Transfers tolerate rounding errors of up to REBASE_TOKEN_ABS_ERROR_TOLERANCE, currently set at 10.

  • Pool reserves are measured as raw token balances, in contrast to having fixed reserves that can only change on swaps, deposits, or withdrawals.

    • This assumes that swap fees are automatically re-compounded into reserves (balances). WARNING: This opens up donation attack vectors, since token transfers into the pool would directly increase token balances (hence reserves). It is up to each Liquidity Module to be aware of said risks and have appropriate internal checks and protections.

In addition to all of the above features, Liquidity Modules that handle rebase tokens must have their internal pricing logic robust to arbitrary changes in token balances.

PreviousSovereign VaultNextGauge

Last updated 1 year ago

Was this helpful?