How the Order-Book AMMs Work
After your token is launched, it is automatically initialized with an AMM according to the following steps (according to your configuration when setting up your token). Note that you don't need to know much about these steps in order to launch a token because they will happen automatically with sane defaults if you just click through the token launch flow.
Pre-Sale Auction. Before your token's AMM starts up, there is a period where people can place bids on your token before all the sell orders have gone live. All of the tokens that are about to have their amms go live can be seen on the Launchpad page on the Focus Trade Page.
Placing Initial Orders. Once your auction period is over, your AMM places its sell orders on the book, and hits whatever bids are currently there. This has the end result of executing an auction on your market to distribute the initial supply of your coin. Why do we do it like this? Well, first of all, it's extremely fun to participate in auctions like this (trust me, just try it). But, much more importantly, if this auction period didn't exist, then bots could "snipe" the beginning of your amm the minute the sell orders came on the book. This would give them cheap coins that they could then dump on everybody for a quick buck. It was a problem with BitClout, and it remains a problem with pump.fun.
When a Sell Order is Hit. When an AMM's sell order is hit it flips to a buy order using the funds that went into filling it. For example, if your AMM had an order to sell 1,000 for $0.001 and it got hit, then it would then place a bid order for very slightly less than $0.001 to buy 1,000 tokens. This behavior mimics a bonding curve, but the fact that the AMM runs on an order-book means third-party liquidity providers can also submit bids and asks alongside, or in between, the AMM's orders.
When a Buy Order is Hit. When an AMM buy order is hit, the reverse happens as a sell order. Again, the AMM simply mimics a bonding curve, but on an order-book where third-party liquidity providers can participate.
What happens to profits earned by the AMM during the pre-sale auction or via spreads collected from flipping orders? And what happens if the market moves far beyond the AMM's bids, making its liquidity no longer needed (and thus extractable). This has not been decided yet, but it has been discussed by @nader here. It can either be used to buy & burn $FOCUS, distributed to the creator, or used to buy & burn the creator's token.
Last updated
Was this helpful?