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. Hybrid Order Type (HOT)
  2. HOT API

HTTP request response

Solvers specify a deadline for their requests, at which point the HTTP connection will be closed.

The HTTP connection will be held until:

  • The deadline is reached and the request expires.

  • The Solver meets all criteria for success and received a successful response.

The HTTP request will be closed with the following example of a successful response:

{
  "id": 0,
  "pool_address": "string",
  "signed_payload": "string",
  "order_id": 0,
  "liquidity_manager_id": 0,
  "volume_token_out": "string",
  "gas_price": 0,
  "gas_used_hot": 0,
  "gas_compensation": 0,
  "amount_payload_offset": 202,
  "amount_out_min_payload_offset": 266
}

id Unique identifier of the Solver which requested this HOT order.

pool_address Address of the Valantis Sovereign Pool where this HOT order should be executed. The contract that executes signed_payload against this address must have already approved it to transfer the correct input token amount.

signed_payload Bytes encoded calldata payload which should be executed against pool_address. It already contains all relevant parameters, including the ECDSA signature to be verified by the HOT smart contract, compatibility with the pricing logic, etc.

order_id Unique identifier of the HOT order.

liquidity_manager_id Unique identifier of the market-maker that has authorized the HOT order.

volume_token_out Amount of tokenOut that the user will receive if they execute the signed payload and the swap is considered discounted. Note that this amount will change if the user wants to do a partial fill.

gas_price Currently unused and returned as 0 by default.

gas_used_hot Gas units consumed by a HOT swap via the Valantis Sovereign Pool, by doing a smart contract call to pool_address with payload signed_payload.

gas_compensation The amount of extra output token added by the Liquidity Manager, to compensate for any additional gas cost incurred by the HOT swap compared to other venues. Note that gas_compensation is already included in volume_token_out.

This is calculated as: max((gas_used_hot - expected_gas_units) * (expected_gas_price * 1e9) * eth_to_token_out_conversion , 0)

Where eth_to_token_out_conversion is the exchange rate that converts ETH price to output token price.

amount_payload_offset string offset of signed_payload corresponding to the amountIn field in Sovereign Pool Swap Params. This is relevant for partially filled orders, where solvers should string replace signed_payload between indices [amount_payload_offset, amount_payload_offset + 64] with the updated hex-encoded value of amountIn

amount_out_min_payload_offset string offset of signed_payload that corresponds to the amountOutMin field in Sovereign Pool Swap Params. This is relevant for partially filled orders, where solvers should string replace signed_payload between indices [amount_out_min_payload_offset, amount_out_min_payload_offset + 64] with the updated hex-encoded value of amountOutMin

PreviousHTTP request parametersNextReasoning for Request structure

Last updated 10 months ago

Was this helpful?

See here for more information about the other API methods:

https://hot.valantis.xyz/swagger/index.html#/