DEX interface: swap variant 1: direct swap using an explicit pair
// pair_id: id of the dex pair to remove liquidity from
// direction: a_to_b | b_to_a
// amount_in: amount of token X to sell (DEX needs operator grant on token X contract)
// min_amount_out: minimum amount of token Y to buy
// receiver: recipient of token Y after sale completes
// deadline: latest block timestamp to execute this transaction
// hops: list of {direction, pair_id} hops
// amount_in: amount of token X to sell (DEX needs operator grant on token X contract)
// min_amount_out: minimum amount of token Y to buy
// receiver: recipient of token Y after sale completes
// deadline: latest block timestamp to execute this transaction
// pair_id: id of the dex pair to add liquidity to
// shares: exact amount of LP shares to mint (must pre-calc from current pool supply + added tokens)
// token_a_in: minimum amount of token A to add (user-defined, DEX needs operator grant on token A contract)
// token_b_in: minimum amount of token B to add (user-defined, DEX needs operator grant on token B contract)
// deadline: latest block timestamp to execute this transaction
// pair_id: id of the dex pair to remove liquidity from
// shares: exact amount of LP shares to burn (user-defined)
// token_a_in: minimum amount of token A to return (pre-calculate from current pool supply + LP burn)
// token_b_in: minimum amount of token B to return (pre-calculate from current pool supply + LP burn)
// deadline: latest block timestamp to execute this transaction