Requirements
- 1 or more “steps” per quote (almost certainly not more than 2)
- each “step” requires transaction signing
- each “step” may require an allowance approval
- up to 1 network fee per hop, always payable in the native asset for the sending or receiving chain of that step (osmo swapper can pay gas on receive side)
- 0 or more protocol fees per step, payable on the sending and/or receiving side of the step
- cross account support for single-hop trades only
- wallet must support all chains for all hops, i.e prevent quotes unsupported by wallet
Out of scope
- cross account support for multi-hop trades
- support for multiple quotes per swapper e.g
[...lifiQuote, ...thorQuotes, ...]
Design nonblockers
- hover over gas
- hover over exchange rates
- slippage
Single hop
https://www.figma.com/file/OHbVrAVaV2xQWUsq0nKzGm/ShapeShift-Library?type=design&node-id=4351%3A15733&t=J4w7Fc7yMRqqWeZF-1
Anatomy of a multi-hop trade

- “steps” are a collection of 1 or more “hops”
- a “hop” is a collection of transactions where funds exit a users wallet to perform a set of transactions that result in an amount landing in a destination wallet owned by the user
- there are 2 step types of steps:
approval
- a transaction to approve interacting with a token. The data for these is lazily generated based on the user’s decision to approve infinite or an amount
trade
- a transaction to swap and bridge a token into a different one. The data for these is generated when the quote is initially requested.
- trade steps abstract away a sequence of transactions. These are only exposed to the user in the form of updates received while the transaction is executing