-
Exchanging has been part of human civilization right from when humans began trading, in the early phase, it was Barter system which was used to exchange goods between two parties, fast forward to the modern age we have blockchain to trade goods(represented by monetary units of tokens).
-
Now it's possible to trade without trusting the opposite part thanks to guarantees provided by blockchain
-
First, we have Order-Book based Dexes for transacting between multiple parties, They had their weaknesses such as :
- No fair pricing
- multiple transactions just to do a simple exchange of two tokens
- Bad UI/UX and many more
- Then we had introduction of AMM by vitalik which led to creation of bancor and uniswap
- This solved quick exchange swap for many users
- 15 sec transaction confirmation
- High gas prices which makes transacting anytime you want difficult
- Waiting for hours due to high gas prices which can affect price you get when trading(Makerdao black thursday is such a example)
- We need a place for fast exchange
-
Thankfully we have plasma sidechain binded to main etherum network which solves much problems with scalability without scarificing much decentralization.
-
We have come up with plasma exchange solution with fast exchange and less gas fees
-
Users can visit test website link and login using wallet of their choice by clicking on connect
-
They can transfer thier assets from mainet to matic network using bridge
-
If Users want to buy Land Tokens they can select NFT
-
If Users want to buy any ERC20 Token they can buy using swap page by selecting tokens from dropdown
-
They can addLiquidity for their Exchange, create an ERC20 Uniswap Exchange
-
They can swap and send tokens to another address using send page
-
They can provide their assets to be available for exchange and collect fees
- Token(ERC20)-Token(ERC20) conversion
- Dai->Cdai(Compound Dai) conversion
- Token(mana)->NFT(Land) conversion
- Login using multiple wallets(Portis,Torus,Fortmatic,walletconnect,metamask)
- ETH-Token(ERC20,ERC721) conversion
- Clone the Repo
- Do npm install/yarn install
- Now run yarn start
- Naviagte to http://localhost:3000 and start swapping:) (Note -> The Addresses used mentioned in the Contract Addresses Section below are our own so you need to replace those to run the dapp for your self, we have mentioned below in which files do you need to change address, if you face any trouble contact [email protected]/[email protected]/[email protected] as there are a few files where you need to change the addresses)
- As the NftMarket Contract has admin level permissions so you will need to set up your own.
- Refer this guide to get started. Note - You can find the Nft Test Contract mentioned in the above link for minting here
-
Go to depositerc20.js
-
Create a ropsten custom token on matic using this address 0xe2B7a0c7bC21E000B8327713513b9D4d2620A414 (TERC20)
-
Create a matic custom token on matic using this address 0xe2B7a0c7bC21E000B8327713513b9D4d2620A414 (TERC20)
-
Enter your metamask address in from field in the script
-
Enter your private key in SetWallet function
-
run node depositerc20.js in cmd
(We're facing some issues , while integrating Matic.js with Reactjs's forms without the private key, we had discussions with matic guys and they gave the go ahead for scripts)
Smart Swap NOTE - This is hosted with our own pair of addresses, please check the Contract Addresses section below and replace with your addresses
-
ETH<->MANA -> 0x003b9b872b81b0b9ad0f4745eb61c196a813a1ef7501c1a058aec5a817e9fad6
-
DAI<->ETH -> 0xb770cca7949d3a353edff6f7ade40cc32bd57a314d11b40e90cb8759089ebd7
-
DAI<->CDAI -> 0xbed4ff336ef8e2337b369702398d11f7881f5969c0eaa62af227c8e33694e3ea
-
CDAI<->DAI -> 0xe52737c9049db16ad05f21592dda422a076ec3f797273d65e480d3140f79b89c
-
ETH-LAND -> 0x75d4c19afa3a521fc0043b5889a5d122ce34743cfd4c5625cc543406cab00420
-
MANA<->LAND -> 0x645e317d67bc65daaa902d48abaa92c308a9eeb4ec693e9b03330778351d16e4
-
Adding Liquidity -> 0x16a0f0a1f32ba3eb6ca6c52f11dbee4400b5f78d05adb66187eb2c0cd70c79c6
Copy the Tx Hash and check out here
[NOTE - We Would recommend checking out the demo video first]
- Please replace with your own set of addresses at the following locations
- You can find the ERC20, NFT(LAND) and Uniswap Exchange addresses here
- All Compound Contract Addresses are here
- NFT MarketPlace Address -> 0x1b5666b40f30231879f8a5dedfc78cdda7cacf77
- In Addition to there are some specific Components of the Dapp that requires you own set of addresses
- LAND Address here
- LAND Address here
- NFT Market Address here
- CDAI Address here
- Compound protocol
- Uniswap protocol
- Kyber protocol
- NFT markerplace exchange
- Matic bridge
- Truffle
- React
- Web3react library