Scope of the decentralized exchange project

In our project, we'll be building an exchange that allows the user to trade gold for US dollars. Unlike the traditional model, where the central authority builds and maintains the orderbook platform, in our model the orderbook is built and managed using a smart contract. It will be available to all traders who connect to our private blockchain platform to trade, and it will be stored in all the nodes that are hosted as part of our blockchain

We'll be building and deploying the following components: 

  • Two ERC20 token smart contracts called Gold and USD. The ERC20 gold token represents our gold asset (the counter asset), and the ERC20 USD token represents the amount of US dollars (the base asset) that are used to buy or sell gold.
  • A smart contract called Orderbook. This contract will allow users to trade gold for USD. It will keep a track of all the incoming buy and sell offers, and will allow traders to view and execute a trade against an existing offer that is stored in the contract.
  • A frontend React app called Exchange. This app will serve two purposes. First, it will display the orderbook in real time to the user. Second, it will show the user their current base asset and counter asset balance. Lastly, and most importantly, when the user submits a buy or sell request, it will run a matching algorithm to verify if there are any matching trades against the user's offer. If yes, it will execute a trade against that offer by invoking the orderbook smart contract. If no, it will add the offer to the orderbook by invoking the smart contract.

Alright then, let's get started.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.14.219