Giter Club home page Giter Club logo

excel-liquidity-pool-simulator's Introduction

excel-liquidity-pool-simulator

TL;DR:

Excel spreadsheet model simulating a Uniswap AMM liquidity pool. Uses the exact calculations found in the Uniswap Core contracts. Observe changes in pricing, slippage, LP token issuance and redemption, and impermanent loss transaction-by-transaction.

Initial demo version. Yellow cells are for user data entry. This file is no longer locked, all formulas are unprotected and open for all legitimate licensed users to see, subject to the restrictions in the accompanying LICENSE file.

Background:

This is definitely of narrow appeal, but Iโ€™m happy to share this Web3 AMM Liquidity Pool Simulator project I built in Excel back when I was interested in web3 & decentralized finance. In defi, trading is often done through what's called an Automated Market Maker, a smart contract that serves the same basic purpose as market makers in the traditional stock market, with the slight difference that AMMs require funding by the general public to provide liquidity for other people to trade with, so there is the additional complexity of providing an incentive scheme for people to deposit crypto with them.

So, then, what's smarter? Trading Ethereum tokens, or depositing them in an AMM's liquidity pool? (I do have a sarcastic answer to this, which I'll forego here.)

The algorithms by which an AMM calculates prices, pool token issuance, and exchange rates can be difficult to easily understand. This Excel worksheet lifts the lid by modeling a Uniswap AMM liquidity pool, using the exact calculations from the original Uniswap Core smart contracts. You can now observe how exchange rates, slippage, LP token issuance, and impermanent losses change, transaction-by-transaction. If you're an Ethereum or ERC token trader, this is very useful to understand.

I am

Michael E. Kupietz, software engineering, consulting, & support for FileMaker Pro, Full-Stack Web, Desktop OS, & TradingView platforms
https://kupietz.com (Business info)
https://github.com/kupietools (Free software)
https://michaelkupietz.com (Personal & creative showcase)

excel-liquidity-pool-simulator's People

Contributors

kupietools avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

excel-liquidity-pool-simulator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.