Exchange

Alice wants to swap WTON for USDT in the USDT/WTON pool. Alice sends USDT to the Router, and in return, the Router sends WTON to Alice.
Alice's Wallet sends a transfer message to Alice's USDT Wallet.
The Router is the recipient, and the message contains swap details such as the pool used and minimum amount.
An
internal_transfer
message is sent from Alice's USDT Wallet to the Router's USDT Wallet.A
transfer_notification
message is sent from the Router's USDT Wallet to the Router.An
exchange
message is sent from the Router to the Pool.The Pool contract sends a
pay_to
message to the Router.This message includes the type and amount of coins that should be sent to Alice.
If Alice's WTON amount is less than the minimum, a message is generated to send USDT back to her.
The Router contract sends a
transfer
message to the Router's WTON Wallet.A
transfer
message is sent from the Router's Wallet to Alice's Wallet.Alice receives WTON.
Last updated