-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: gnoxchange - simple dex #3543
Conversation
🛠 PR Checks Summary🔴 Changes to 'docs' folder must be reviewed/authored by at least one devrel and one tech-staff Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
Hey; putting this PR into draft seeing as the CI is still failing. Please put it as ready for review once the CI succeeds. Also, seeing as this is a lot of commits; please squash them when the PR is ready, as they pollute the PR conversation. |
-change tokenhub to be a hub for nfts rather than a hub for fungible tokens
3c49257
to
9242db9
Compare
Looks like I messed up pretty hard with the squash, I will be closing this PR and opening a new one where I will upload all the files in one commit... |
Desciption
GnoXchange is a simple dex providing multiple ways to swap tokens (and coins) on gno.land's chain. It offers 2 different approaches to swap assets: AMM and P2P (inspired by #2510).
The first approach allows users to create pools between 2 tokens, add and withdraw liquidty to/from them and use existing pools to swap tokens. As expected, the pools regulate their prices when swapping happens. Price regulation formula:
which is just the base CPMM formula with 0.3% fee (exactly like the one used in Uniswap V1). The liquidity providers get minted LP tokens.
Second one provides a chance for users to trade directly with other users, while atomic swap provides a secure private way for 2 parties to trade, gnoxchange p2p system allows users to create tickets that are public and preset an expiration timer. This way anyone who finds the offer suiting can accept it. The security is guaranteed as the offerer's assets are locked in the realm on ticket creation.
GnoXchange also provides an open NFT market. Since the ticketing system was already in place, anyone who wants to sell an nft (that is registered in the #3479 - gno.land/r/demo/tokenhub) he can just make a ticket and the nft will be up for sale for any amount of any asset (just like any other token/coin in the P2P part of the exhange). All other P2P functionalities apply as well, such as cancelling, preset expiration, etc.
(For more detailed, technical description please read godocs in gnoxhange.gno)
See screenshots of gnoweb
Contributors checklists
Note
There is a frontend being developed for gnoXchange, check it out: https://github.com/matijamarjanovic/gnoXchange
All feedback is welcome