Skip to content

ishaan0x/dynametric

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynametric is a full-range constant product market maker, inspired by Uniswap v2. It has three major differences:

  1. Fees are dynamic. This benefits traders by not fragmenting liquidity and LPs by simplifying the UX, as well as enabling LPs to take higher fees during times of increased volatility. This mechanism design is inspired by Trader Joe v2's dynamic fees.
  2. Fees are asymmetric. When the AMM price differs from the true price, the fee is manipulated. Traders that push the AMM price closer to the true price pay a smaller fee; traders that push the AMM price further from the true price pay a larger fee. This mechanism design is inspired by Alex Nezlobin's proposal (https://twitter.com/0x94305/status/1674857993740111872).
  3. The contract is a singleton contract. This is mostly for simplicity's sake, as this is a Proof of Concept.

Types of Users:

  • traders
  • liquidity providers

Traders:

  • swap exact input tokens for some amount of output tokens (with slippage protections)
  • swap some input tokens for exact amount of output tokens (with slippage protections)

Liquidity providers:

  • create liquidity pools
  • add liquidity by depositing an equal amount of both tokens in a pool
  • remove liquidity by withdrawing tokens from a pool

Roadmap:

  • swapExactInputForOutput
  • createPool
  • scripting
  • testing
  • fees
  • testing
  • dynamic fees
  • testing
  • swapInputForExactOutput
  • testing
  • refactoring
  • add liquidity (+ refactoring)
  • remove liquidity (+ refactoring)
  • testing
  • refactoring

//////////////////////////////////////////// /////////// OPEN QUESTIONS /////////// ////////////////////////////////////////////

  1. Should I add the Pool to both sides of the mapping? If so, I'll need to create an array of pools, with each mapping being to a uint256

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors