LogoLogo
WebsiteAppWiki
  • 🤙Start here
    • Overview
    • Shell Protocol Basics
    • Quickstart: Deploy a liquidity pool
    • Tutorial: Executing swap with Shell Protocol
    • Reference Library
      • Contract addresses
  • 🤿Deep dive
    • Important concepts
      • Separating accounting logic & business logic
      • Ocean Primitives
    • The Ocean
    • Primitives
      • Adapters
      • Proteus AMM Engine
      • NFT Fractionalizer
  • 📜Smart Contracts Specification
    • Ocean
      • Ocean.sol
      • IOceanPrimitive.sol
      • IOceanToken.sol
      • OceanAdapter.sol
    • Proteus
      • Proteus.sol
      • EvolvingProteus.sol
      • LiquidityPoolProxy.sol
    • Fractionalizer
      • FractionalizerFactory.sol
  • 🧠Tutorials
    • Build an AMM with Proteus
    • Build an NFT Fractionalizer
    • Build an NFT AMM
Powered by GitBook
On this page
  • What is Proteus
  • Static Proteus implementation details
  • Determining ms, _as, bs and ks values
  • Evolving Proteus
  1. Deep dive
  2. Primitives

Proteus AMM Engine

An Ocean-native AMM primitive

PreviousAdaptersNextNFT Fractionalizer

Last updated 10 months ago

This is a developer's guide to building with Proteus. For a complete introduction, check out the .

What is Proteus

Proteus is an AMM (Automated Market Maker) engine that is capable of approximating any bonding curve, enhancing Shell Protocol's market-making strategies. It is capable of extremely precise liquidity concentration across multiple price ranges, but still uses fungible LP tokens.

There are two implementations of Proteus: Static Proteus and Evolving Proteus.

Static Proteus implementation details

It turns out that in order to create any bonding curve and achieve extremely precise liquidity concentration, all you need is 4 parameters: list of slopes of the radial lines in order to create slices, list of values representing relative scale factors of each slice, a list of a values, and a list of b values representing price points of the particular slice.

Those params are labeled as lists of:

  1. ms - representing a list of slopes of the radial lines

  2. _as - list of price points of the particular slice

  3. bs - list of price points of the particular slice

  4. ks - list of values representing relative scale factors of each slice

Determining ms, _as, bs and ks values

Determining ms, _as, bs and ks values is not an easy task to do. In order to understand them better you may want to spend some time going through the files in scripts/params directory of our . You will find examples of different type of pools in that folder, like well known constant product and stablepool.

Evolving Proteus

Evolving Proteus is an advanced version of the Proteus AMM engine, with which the bonding curve can change every block (or "evolve") during a specified time frame. Evolving Proteus also differs from Static Proteus in that Evolving Proteus only has one slice. Evolving Proteus is good for liquidity bootstrapping, or any use case that requires a . It is also good for creating managed pools.

For a thorough understanding of Proteus, it is advisable to first read the initial version of the , followed by the , and finally, the . The actual implementation of the Ocean can be accessed in our public repository, located within the Proteus.sol file at the .

🤿
Dutch auction
Proteus White Paper
updated (second version) White Paper
Update 3 document
provided link
public repo
Proteus wiki page