Automated Market Maker - Certification

About this model

This diagram models a simulation of trading activities involving two types of tokens, referred to as $TOKEN and $COIN, within a liquidity pool framework. It embodies a dynamic economic system where these tokens can be sold and bought, affecting their circulation and respective values. The core of the diagram revolves around pools that represent the total circulating amounts of each token, transactions of buying and selling $TOKEN, and the calculations determining the price of $TOKEN in terms of $COIN, leveraging mathematical formulas to calculate outcomes based on trading activities.

In detail, the diagram incorporates mechanisms for selling $TOKEN to and buying $TOKEN from a liquidity pool, with specific pools dedicated to tracking the amounts of $TOKEN sold and bought. Two main source nodes facilitate the generation of $TOKEN sold and bought transactions per day, which are then processed through drains to remove these tokens from circulation daily, simulating a real-world trading environment. Furthermore, the system utilizes registers to compute the price of $TOKEN in $COIN, and to maintain a constant product formula (k) that aims to ensure liquidity and price stability within the pool. This model provides a sophisticated representation of token trading and liquidity provision, illustrating how market dynamics can influence token prices and availability.

This public Machinations diagram, “Automated Market Maker - Certification”, was shared in the Machinations Community by Nicolás Munafó.

You can open the original diagram in the Machinations app, press Play to watch how resources move through it, and change its values to see how the system responds. Machinations is a visual tool for designing, simulating and balancing game economies and other systems, where resources flow through sources, pools, drains, converters and gates. In a diagram, a source creates resources, a pool stores them, a drain removes them, a converter changes one resource into another and a gate decides where they go next.