Cross-Chain Swap
Last updated
Last updated
The user calls the placetrade
function which signs permission for the user's limit order on the source chain.
The market maker calls placetrade
with inverse inputs, to match the user's limit order with an equal and opposite order.
The market maker calls proposematch
and executematch
on both chains. These functions link the user's order with the market maker's inverse order, preparing both sides for finalization.
The market maker calls finalizetrade
only on the source chain. This completes the trade, transferring the tokens between the user and the market maker parties and settles the transactions.