Giter Club home page Giter Club logo

plentyswap-v3's Introduction

Plentyswap V3

This is a segmented CFMM on Tezos inspired by Uniswap v3. The code in this repository has been taken and modified from the original implementation available at https://github.com/tezos-checker/segmented-cfmm.

A specificiation for the updated contract is available here.

Primary changes

  • A new token type has been added to the core contract to allow for the same Michelson code for all possible pairs.
  • The ctez burn feature has been removed.
  • A dev and protocol share has been added to the trading fees.
  • New entrypoints forwardFee, retrieve_dev_share and toggle_ve have been added.
  • The callback based views have been changed to native onchain views.
  • The original liquidity_mining contract has been renamed to farm and has been modified to work with the segmented CFMM's onchain views.
  • Haskell tests have been moved to Typescript to cater to a wider audience.

Folder Structure

\
|- deploy // A basic script to deploy the factory contract
.
|- src
.
|--- ligo // Segmented CFMM contracts written in Cameligo [version 0.68.0]
.
|--- michelson // LIGO contracts compiled down to Michelson
.
|- test // Jest tests written for the compiled Michelson code and run via deployment on flextesa

Contracts

All contracts are written in Cameligo version 0.68.0.

  • core: The core CFMM pool where liquidity is added and tokens can be swapped. This also natively adheres to the FA2 standard.
  • farm: A liquidity mining contract explicitly built for the segmented CFMM's non-fungible positions.
  • factory: A generator contract for core.

Testing

Install dependencies:

$ npm install

Run flextesa sandbox:

$ npm run flextesa

Run the whole test suite:

$ npm run test

To run a specific test:

$ npm run test <test-file-name>

plentyswap-v3's People

Contributors

anshujalan avatar

Watchers

bernd.tez avatar  avatar cryptonoobmaster_69 avatar  avatar

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.