Giter VIP home page Giter VIP logo

cleardex's Introduction

ClearDEX orderbook

Modern DEX with orderbook implemented in Clarity. Created for Building on Bitcoin Hackathon 2023.

Instructions

⚫Run clarinet check to check smart contracts for error and warnings

⚫Run clarinet console for local Stacks environment where you can call smart contract functions

⚫Run clarinet test to execute tests for the smart contracts

About the project

Features:

⚫adding new buy order

⚫adding new sell order

⚫flat 1% fee on all transactions

⚫filling buy order

⚫filling sell order

⚫getting details for buy/sell orders

⚫canceling buy/sell order(removes liquidity from contract and send STC/custom token back to user)

This DEX orderbook will allow users to place buy and sell orders for various cryptocurrencies in a decentralized manner, without the need for a central authority. Currently for demonstration purposes it's only limited to trades between STX and custom clear token but it could be deployed with other tokens available on the Stacks.

It's important to emphasize that it uses orderbook instead of typical AMM to facilitate token swaps.

Using orderbook has many benefits over AMM-based one such as:

⚫Users can take advantage of limit orders

⚫Users benefit of lower slippage and lower trading fees

⚫User can see the specific prices points at which liquidity is most concentrated, which might benefit their trading strategy

Accomplishments

I am happy that I was able to finish my MVP within just a few days. Now this Open-Source proof of concept could become backbone of bigger project or could serve as learning material for other Clarity developers.

What's next for ClearDEX

In the future I will work on adding more features to make this project more complete. Such as filling bigger order at market price that would complete multiple buy / sell orders from different users etc.

cleardex's People

Contributors

justanotherdevv avatar

Stargazers

Cioclea Doru Octavian avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

dorucioclea

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.