corner
BackBack
Jan 31, 2023

Introducing the AMM simulator: Turning 4 years of data into 1,000 years

  • Amm
  • DeFi
  • Crypto
  • Polygon
  • Chain link

Why would you even need an AMM simulator?

DeFi is a very young industry. In fact, it’s only four years old!

Thus, we lack historical data to measure risks and returns. Unlike the stock market, we can’t look at 40 years of data and see what kind of strategies performed better. This makes it harder to design efficient investment strategies, iterate on them and understand their risks.

Introducing the AMM simulator

In our recently released paper written in collaboration with Louis Bachelier Institute, we built a simulator able to test the behaviour of any market making strategy in thousands of different market conditions.

The market conditions are generated based a comprehensive set of parameters, including the price trajectory (drift, volatility, etc.) and the demand evolution (transaction size, demand curve, etc.).

We tested AMMs like Uniswap V2, Curve V2, Swaap V1 and a naïve oracle strategy in a variety of market configurations, for a pair with a USD/ETH profile.

This approach enables us to test each strategy with 1,000s of different market conditions, as if DeFi had existed for 1,000s of years instead of 4. 🤯

What did we learn?

Three main takeaways:

  • Oracle-based strategies outperform all known oracle-free strategies (even in the presence of arbitrageurs). This validates the choice of Swaap to use Chainlink data feeds as part of the price discovery mechanism.
  • High-frequency oracle data is crucial to conciliate good liquidity to profitability. Market making is thus much more efficient on high TPS chains like Polygon, where Swaap is deployed.
  • Swaap outperforms all kinds of existing AMMs in terms of efficiency. Uniswap v2 and Curve v2 offer negative net returns with high risk. Swaap v1 offers positive net returns with very low risk.

What this opens

The research shows that there are opportunities to design significantly more profitable onchain market making strategies with increased risk tolerance.

We will focus on developing those strategies so that more more investors with different risk appetites and financial goals can benefit from Swaap’s yields 😇

We will also continue to enhance the simulator’s precision by integrating more parameters, thus more accurately reflecting market conditions.

Further Reading

For a summary of the research paper, check out this thread by David Bouba.

You can also read the whole paper here.