All Projects β†’ madfish-solutions β†’ quipuswap-core

madfish-solutions / quipuswap-core

Licence: MIT license
πŸ§™β€β™‚οΈ Repository containing QuipuSwap liquidity protocol smart-contracts written in Ligo language

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to quipuswap-core

quipuswap-webapp
🌐 πŸ§™β€β™‚οΈ Decentralized application UI for Quipuswap protocol.
Stars: ✭ 21 (-56.25%)
Mutual labels:  smart-contracts, tezos, defi, quipuswap
awesome-waves
Curated list of awesome things for development on Waves blockchain.
Stars: ✭ 60 (+25%)
Mutual labels:  smart-contracts, dapps, defi
Smart-Contract-Security-Audits
Certified Smart Contract Audits (Ethereum, Hyperledger, xDAI, Huobi ECO Chain, Binance Smart Chain, Fantom, EOS, Tezos) by Chainsulting
Stars: ✭ 325 (+577.08%)
Mutual labels:  smart-contracts, defi
Hardhat
Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software. Get Solidity stack traces & console.log.
Stars: ✭ 727 (+1414.58%)
Mutual labels:  smart-contracts, dapps
waves-ide
IDE for waves blockchain RIDE language
Stars: ✭ 19 (-60.42%)
Mutual labels:  smart-contracts, dapps
awesome-defi
Curated list of awesome DeFi protocols, dapps, wallets and other resources
Stars: ✭ 36 (-25%)
Mutual labels:  dapps, defi
clp-contracts
AMM and Continous Liquidity Provider smart contracts on NEAR blockchain
Stars: ✭ 25 (-47.92%)
Mutual labels:  smart-contracts, defi
Flow Playground
Flow Playground front-end app πŸ€Ήβ€β™‚οΈ
Stars: ✭ 73 (+52.08%)
Mutual labels:  smart-contracts, dapps
blockhead
Crypto portfolio tracker, DeFi dashboard, NFT viewer and data explorer for the Ethereum/EVM-based blockchain ecosystem and the web 3.0-powered metaverse https://gitcoin.co/grants/2966/blockhead
Stars: ✭ 41 (-14.58%)
Mutual labels:  smart-contracts, defi
ultimate-defi-research-base
Here we collect and discuss the best DeFI & Blockchain researches and tools. Feel free to DM me on Twitter or open pool request.
Stars: ✭ 1,074 (+2137.5%)
Mutual labels:  smart-contracts, defi
Blockchain-Alpha
Alpha from various sectors in the blockchain space.
Stars: ✭ 102 (+112.5%)
Mutual labels:  smart-contracts, defi
templewallet-extension
πŸ”πŸ’°Cryptocurrency wallet for Tezos blockchain as Web extension for your Browser.
Stars: ✭ 176 (+266.67%)
Mutual labels:  tezos, defi
hardhat-abi-exporter
🧰 Export Solidity contract ABIs on compilation βš™οΈ
Stars: ✭ 29 (-39.58%)
Mutual labels:  smart-contracts, dapps
DeFi-Developer-Road-Map
DeFi Developer roadmap is a curated Web3.0 Developer handbook which includes a list of the best tools for DApps, development resources and lifehacks.
Stars: ✭ 5,658 (+11687.5%)
Mutual labels:  smart-contracts, defi
Credits
Credits(CRDS) - An Evolving Currency For An Evolving Society
Stars: ✭ 14 (-70.83%)
Mutual labels:  smart-contracts, dapps
Ethereum book
η²Ύι€šδ»₯ε€ͺ坊 οΌˆδΈ­ζ–‡η‰ˆοΌ‰
Stars: ✭ 875 (+1722.92%)
Mutual labels:  smart-contracts, dapps
core
SIREN Core Smart Contracts
Stars: ✭ 39 (-18.75%)
Mutual labels:  smart-contracts, defi
uniswap-skim
scripts to scan all of the uniswapV2πŸ¦„ contracts on ethereum and search for skim opportunities
Stars: ✭ 126 (+162.5%)
Mutual labels:  smart-contracts, defi
challenge
Solidity Engineer Challenge
Stars: ✭ 94 (+95.83%)
Mutual labels:  smart-contracts, defi
zeneth
🏡️ Let Your ETH Chill β€” Gasless Ethereum account abstraction with Flashbots
Stars: ✭ 112 (+133.33%)
Mutual labels:  smart-contracts, defi

Description

This project is intended to provide an easy and efficient way to exchange tokens and XTZ on Tezos blockchain in a wide number of directions. Using smart contracts listed in this repo users can add their tokens to exchange, provide liquidity, and potentially make a profit in a fully decentralized way.

The current implementation supports FA1.2 and FA2.

Architecture

Architecture

The solution consists of 6 types of contracts:

  1. Factory - singleton used to deploy new TokenX-XTZ exchange pair;
  2. Dex - contract for TokenX-XTZ pair exchanges;
  3. TTDex - contract for TokenX-TokenY pair exchanges;
  4. Token - FA token implementation.
  5. BakerRegistry - bakery registrar.
  6. MetadataStorage - contract to store and upgrade the shares token metadata.

Project structure

.
β”œβ”€β”€  ci/ # scripts for continues integration
β”œβ”€β”€  contracts/ # contracts
|──────── main/ # the contracts to be compiled
|──────── partial/ # the code parts imported by main contracts
β”œβ”€β”€  test/ # test cases
β”œβ”€β”€  storage/ # initial storage for contract originations
β”œβ”€β”€  scripts/ # cli for dex/factory actions
β”œβ”€β”€  test.md # cases covered by tests
β”œβ”€β”€  README.md # current file
β”œβ”€β”€  .env
β”œβ”€β”€  .gitignore
β”œβ”€β”€  package.json
└──  Architecture.png

Prerequisites

  • Installed NodeJS (tested with NodeJS v12+)

  • Installed Yarn (NPM isn't working properly with [email protected])

  • Installed Ligo:

curl https://gitlab.com/ligolang/ligo/raw/dev/scripts/installer.sh | bash -s "next"
  • Installed node modules:
cd quipuswap-core && yarn
  • Configure truffle-config.js if needed.

Quick Start

To compile and deploy contracts to Delphinet

  1. Chose configure the version - FA12 or FA2 - by setting EXCHANGE_TOKEN_STANDARD in .env and run:
yarn migrate

For other networks:

yarn migrate --network NAME

Usage

Contracts are processed in the following stages:

  1. Compilation
  2. Deployment
  3. Configuration
  4. Interactions on-chain

As the Quipuswap supports 2 token standards that vary only in the token interface implementation and the inter contract communication between Dex and external tokens, the shared codebase is used. Therefore to work with the specific standard version, you should configure it by setting EXCHANGE_TOKEN_STANDARD in .env to either FA12 or FA2.

Compilation

To compile the contracts run:

yarn compile

Artifacts are stored in the build/contracts directory.

Deployment

For deployment step the following command should be used:

yarn migrate

Addresses of deployed contracts are displayed in terminal. At this stage, new MetadataStorage, Factory are originated. Aditionaly, for testnets two new pairs are deployed.

Testing

If you'd like to run tests on the local environment, you might want to run ganache-cli for Tezos using the following command:

yarn start-sandbox

Truffle framework is used for testing. Run:

yarn test

NOTE: if you want to use a different network, configure truffle-config.js. If you need to use a different standard, configure $EXCHANGE_TOKEN_STANDARD in .env

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].