Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Reference: sushi/evm DEX

The DEX module contains small domain enums and DEX math errors.

ExportPurpose
FeeFee enum used by DEX logic.
PoolTypePool type enum.
TradeTypeExact input/exact output trade type.
InsufficientReservesErrorError for insufficient reserves.
InsufficientInputAmountErrorError for insufficient input amount.
import { InsufficientInputAmountError } from 'sushi/evm'
 
const error = new InsufficientInputAmountError()
 
if (error instanceof InsufficientInputAmountError) {
  console.log('Input amount is too small')
}