Giter VIP home page Giter VIP logo

ks-elastic-sc's Introduction

KyberSwap Elastic v2

Main smart contract repo for KyberSwap Elastic

Deployed contracts for KyberSwap Elastic v1

Contracts are available on: Ethereum, Polygon, BNB Chain, Avalanche, Arbitrum, Optimism, Fantom, BitTorrent, Cronos, Oasis, Velas.

Main contracts:

  • Factory: 0x5F1dddbf348aC2fbe22a163e30F99F9ECE3DD50a
  • Router: 0xC1e7dFE73E1598E3910EF4C7845B68A9Ab6F4c83
  • AntiSnippingAttackPositionManager: 0x2B1c7b41f6A8F2b2bc45C3233a5d5FB3cD6dC9A8

Helpers

  • QuoterV2: 0x0D125c15D54cA1F8a813C74A81aEe34ebB508C1f
  • TickFeesReader: 0x165c68077ac06c83800d19200e6E2B08D02dE75D

Others

  • TokenPositionDescriptor (implementation): 0xDA474537cE9b687b78B236452A05631f09B6EB6A
  • TokenPositionDescriptor (proxy): 0x8abd8c92F1901cf204590c16b5EF690a35b3741E

Whitepaper

Check out audit_docs/KyberSwap_Elastic_Whitepaper_180622.pdf file for the latest KyberSwap Elastic whitepaper.

Audit report

KyberSwap Elastic โ€“ Security Audit Report by Chain Security

Technical documentation

The implementation details can be found here

Compilation

yarn c to compile contracts for all solidity versions.

Testing with Hardhat

  1. If contracts have not been compiled, run yarn c. This step can be skipped subsequently.
  2. Run yarn test

Example Commands

  • yarn test (Runs all tests)
  • yarn test test/Pool.spec.ts (Test only Pool.spec.ts)

Coverage

yarn coverage (Runs coverage for all applicable files)

Echidna

docker-compose up -d (Runs a new echidna-test container)

docker exec -it elastic-echidna bash (Accesses to the container)

  • ./echidna.sh (Runs echidna-test for all contracts)
  • echidna-test . --contract {{Contract Name}} --config echidna.config.yml --test-mode assertion (Runs echidna-test for each contract)

Deploy

npx hardhat deployTokenPositionDescriptor --input xxx --network nnn to deploy token descriptor proxy + implementation contracts.

  • Example: npx hardhat deployTokenPositionDescriptor --input mainnet.json --network mainnet

npx hardhat deployElastic --input xxx --gasprice ggg --network nnn to deploy all contracts.

  • Example: npx hardhat deployElastic --input mainnet.json --gasprice 5 --network mainnet

ks-elastic-sc's People

Contributors

manhlx3006 avatar zohar97 avatar vutt94 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.