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
  • Functions
  • Security Model
  • Trust Assumptions

Was this helpful?

  1. Hybrid Order Type (HOT)
  2. Risks and Trust Assumptions
  3. Roles

Liquidity Provider

PreviousHOT SignerNextThreats

Last updated 1 year ago

Was this helpful?

Functions

  • setPriceBounds: Sets the AMM position's square-root upper and lower price bounds.

  • depositLiquidity: Sovereign LM function to deposit reserves into the pool.

  • withdrawLiquidity: Sovereign LM function to withdraw reserves from the pool.

  • Implementation of specific functions in the liquidity provider contract.

Security Model

  1. The liquidity provider contract has complete control over depositing, withdrawing, and managing user funds in the HOT. The HOT assumes that all deposited funds belong to a single liquidity provider controlled by the liquidityProvider address. Individual LPs should ensure that this contract is well-audited, and cannot maliciously drain user funds.

  2. As the Liquidity Provider is a critical role with complete control over user funds, it is set as an immutable address at the time of deployment.

  3. The Liquidity Provider is expected to have a safe rebalance function, which can manually rebalance the pool in case the reserve composition gets too skewed into one of the tokens.

  4. The Liquidity Provider can optionally have a short Timelock before calling the setPriceBounds function.

Trust Assumptions

Except for the common trust assumptions around deposits and withdrawals, the liquidity provider should ensure that:

  1. The price bounds are set appropriately so that the liquidity is concentrated to achieve the ideal balance between capital efficiency and the lowest possible inventory risk.

  2. Highly concentrated liquidity can increase the losses from AMM swaps, as described in the .

  3. Liquidity Providers should implement a Timelock before calling thesetPriceBounds function in the HOT. Without proper Timelocks, could become possible.

  4. setPriceBounds is called with the proper checks so that attacks similar to the are not possible. Simply setting the _expectedSqrtSpotPriceLowerX96 and _expectedSqrtSpotPriceUpperX96 correctly while making the call should be enough to prevent the attack.

malicious signer attack vector
malicious price-bound attacks
Deposit Sandwich Attack