Add Liquidity

Alice wants to provide liquidity to a USDT/WTON pool. When Alice sends USDT and WTON to the Router, liquidity is added and Pool Tokens are issued and delivered to Alice.
Alice Wallet sends a
transfermessage to Alice's USDT Wallet.The recipient is the Router, and the message contains details of the liquidity provision.
An
internal_transfermessage is sent from Alice's USDT Wallet to the Router's USDT Wallet.A
transfer_notificationmessage is sent from the Router's USDT Wallet to the Router.A
provide_lpmessage is sent from the Router to the Pool. This message contains details about which tokens were received, their amount, and the sender.An
add_liquiditymessage is sent from the Pool to Alice's LPBuilder.An LPBuilder is created for each Account and Pool combination.
If Alice has both USDT and WTON, a
cb_add_liquiditymessage is sent from Alice's USDT/WTON LPBuilder to the Pool.The message flow ends after the first transaction.
The
cb_add_liquiditymessage is sent in the last token transfer transaction.
Upon receiving the
cb_add_liquiditymessage, the Pool sends aninternal_transfermessage to Alice's Pool Token Wallet and mints the Pool Token
Last updated