-
Notifications
You must be signed in to change notification settings - Fork 389
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
Draft
matijamarjanovic
wants to merge
145
commits into
gnolang:master
Choose a base branch
from
matijamarjanovic:feat/gnocket
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-change tokenhub to be a hub for nfts rather than a hub for fungible tokens
…okens - match registering grc721 to grc20 registration which now go by pck path (and custom slug) instead of symbol - combine the two in the token hub
…ion to grc20reg.gno but this might help with iteration in that realm as well)
-update the getbalances functions so they're easier to parse
- set up ownable - connect to tokenhub - start setting up transfer all assets from address to wallet on NewWallet
github-actions
bot
added
the
🧾 package/realm
Tag used for new Realms or Packages.
label
Jan 17, 2025
matijamarjanovic
changed the title
feat: smart contract (token) wallet
feat: gnoxchange - simple dex
Feb 4, 2025
…pool obj as an arg
…into feat/gnocket
…into feat/gnocket
- add proper godocs for nftmarketplace
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP
note : depends on tokenhub PR
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)
Contributors checklists
All feedback is welcome