Hybrid Order Type (HOT) struct parameters
The Hybrid Order Type (HOT) struct is defined in the smart contract as follows:
The HTTP response returned by Valantis API to the solver will include a pool-specific payload containing HybridOrderType
and an EIP-712 signature by the liquidity manager. Parameters are described as follows:
amountInMax
- This is the maximum amount of input token which the solver is allowed to trade against the pool. Partially fillable orders are accepted.sqrtHotPriceX96Discounted
- This is the improved price ( in sqrtX96 form ) that the solver gets if the HOT swap includes a valid AMM state update.sqrtHotPriceX192Base
- This is the fallback price ( in sqrtX96 form ) that the solver gets if its HOT swap has been successfully validated, but did not meet the criteria to update the AMM’s state variables. To simplify the price dynamics and keep it deterministic, the liquidity manager can set it equal tosqrtHotPriceX96Discounted
, thus giving the price discount to the solver whether or not it updates the AMM state.sqrtSpotPriceX96New
- The most up-to-date AMM square-root spot price, as specified by the liquidity manager. After the HOT has been successfully validated, the AMM’s spot price will be updated towards this value.authorizedSender
- Address ofmsg.sender
who is allowed to call the Valantis pool with this payload. This flag in order to prevent front-running or other kinds of unwanted accesses.authorizedRecipient
Address that must receive output token amounts after the AMM swap.signatureTimestamp
Off-chain UNIX timestamp at which the liquidity manager signed the HOT quote.expiry
Duration the HOT quote is valid. It becomes invalid onceblockTimestamp > signatureTimestamp + expiry
feeMinToken0
Minimum AMM swap fee for swaps where token0 is the input token.feeMaxToken0
Maximum AMM swap fee for swaps where token0 is the input token.feeGrowthInPipsToken0
Growth rate per second, in percentage points, to interpolate betweenfeeMinToken0
andfeeMaxToken0
.feeMinToken1
Minimum AMM swap fee for swaps where token1 is the input token.feeMaxToken1
Maximum AMM swap fee for swaps where token1 is the input token.feeGrowthInPipsToken1
Growth rate per second, in percentage points, to interpolate betweenfeeMinToken1
andfeeMaxToken1
.nonce
Nonce used for replay protection, set as a bitmap on auint56
value.expectedFlag
Expected value for bit at a certain position in a nonce bitmap. See (nonce explanation docs) for more details.isZeroToOne
Direction of the swap. True if input token is pool'stoken0
and output token is pool'stoken1
, False otherwise.
Last updated