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
transfer
message to Alice's USDT Wallet.The recipient is the Router, and the message contains details of the liquidity provision.
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.A
provide_lp
message is sent from the Router to the Pool. This message contains details about which tokens were received, their amount, and the sender.An
add_liquidity
message 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_liquidity
message is sent from Alice's USDT/WTON LPBuilder to the Pool.The message flow ends after the first transaction.
The
cb_add_liquidity
message is sent in the last token transfer transaction.
Upon receiving the
cb_add_liquidity
message, the Pool sends aninternal_transfer
message to Alice's Pool Token Wallet and mints the Pool Token
Last updated