Let’s talk about some use cases of multichain smart contracts.

Market Orders

A market order contract acts as a router that executes the taker’s transaction on the lowest rate execution venue. Rift currently supports trading on four chains: Bitcoin, Ethereum, Arbitrum, and Base. The design is extensible to any onchain asset, and we are actively adding support for new assets and chains. Imagine a taker wants to sell $100m of BTC for USDC on Ethereum. An example route for this swap flow is:
  1. Taker requests quote, API responds with rate and execution venue, such as Hyperliquid
  2. Taker creates order with quote response
  3. Taker sends BTC to market order contract
  4. Contract sends BTC to Unit to bridge into Hyperliquid
  5. Contract executes BTC/USDC spot trade on Hyperliquid
  6. Contract bridges USDC out to Arbitrum via native bridge, and then to the taker’s wallet on Ethereum via CCTP
Step by step swap flow This assumes Hyperliquid is the best execution venue for this swap, including all fees, such as bridge in/out fees and spot price impact. If it’s not, the contract will execute the corresponding execution and bridging steps for the underlying provider.

Limit Orders

A limit order contract executes the taker’s trade at a specified price. This works by the contract receiving taker funds, and then executing the trade when the venue meets the specified price. This can be via a native limit order, such as Hyperliquid, or a polling based market order that executes at the price for providers that do not natively support limits. We currently support BTC, ETH, and USDC for limit orders, and use Hyperliquid as the execution venue. We are actively adding support for more assets and execution venues. Step by step limit order flow

OTC

An OTC contract is settled directly with a counterparty. There are two assets and a specified exchange rate. The taker deposits into a vault after receiving a quote from the counterparty, and assets are unlocked to the counterparty once their payout transaction to the taker has been confirmed. OTC flow OTC is currently live for BTC to cbBTC on Ethereum and Base, and integrated as an execution provider for market orders on this route. It’s currently the best rate for swapping Bitcoin into the EVM ecosystem. We are actively adding new OTC routes based on volume. Rate comparison chart

Vaults

A vault contract swaps a taker’s starting asset into a vault, returning them a deposit receipt token. This enables takers to enter vaults on any chain from any starting asset. As an example, let’s say a user wants to deposit Tron.USDT into a Morpho vault on Base, and earn in USDC. Vault flow Withdrawing works the same way, by redeeming the deposit receipt for deposited funds and swapping back to the desired starting asset if needed.