project screenshot
project screenshot
project screenshot


BuyOnChain is a decentralised marketplace that permits people to buy and sell real-world products. It will use an escrow system and oracles to prevent frauds. Unique ERC1155 NFTs which everyone can own to give ratings and reviews about products and services.


Created At

ETHOnline 2021

Project Description

BuyOnChain is the first deccentralised marketplace that helps in connecting the buyer and seller in a secure way. Traditional online marketplace that exist in today's world are very centralised. The whole power lies within one organisation. They decide who is allowed to buy/sell and they can change the criteria any time. Moreover they charge a lot of fees from sellers which results in sellers not getting paid properly. Also the buyer has to purchase the product at a much higher price due to this.

As a decentralised marketplace, BuyOnChain doesn't act as a middle-man who charges fees for his own profits. It will be a platform that connects buyers and sellers and guarantees safety for every exchange. Each user has to stake a certain amount of our native token OnChain(BUY) that will be added to an insurance pool, which will be used by the protocol in cases where a refund will be needed. These tokens are here to prevent spam and to make sure that sellers aren't here to sell fake products to customers as well as the buyer doesn't play wrong, in case of scams this stake can be liquidated to refund buyers/sellers. These funds can be withdrawn at any time until the seller or buyer doesn't have any transaction in process. These funds will also generate yield during the staking period. To be able to sell products on the platform, sellers need to add their mail address and connect with an Ethereum wallet. The buyer also has to provide their delivery address before purchase of any products.

When the buyer purchases a product the money doesn't directly go to the seller, instead it is stored in a contract. Only after the seller has successfully delivered the product and the buyer has confirmed that he/she has received the correct product, the money stored in the contract goes to the seller. At the time of purchase, seller receive the information that someone placed an order and information for shipping. The seller can either accept the order or reject it. In case of rejection the amount that is paid by the buyer in the contract will automatically go back to him/her. An oracle (Chainlink) will provide package tracking information to the contract. This will prevent fake reclamations and fake delivery. We will be sure that the package has arrived (or not). Buyer has to confirm the delivery within a certain time period after the package being delivered. Failed to do so will cost penalty from the staking fund. In case of dispute both the parties have the right to raise a dispute. When anyone of them will raise a dispute, we as a owner of this marketplace will get access to the contract funds. We will then mediate and decide who is right (or wrong). We will then direct the fund stored in the contract to that address.

After the transaction is processed, two ERC-1155 NFT (Proof of buying/selling) gets minted. These NFTs will contain all the information regarding that transaction. One of the NFT will go to the buyer's address and the other to the seller's address.The seller's NFT "Proof of Delivered" will allow sellers to be rated, but to be allowed to rate, buyers need to have the NFT "receipt". With this system, both sellers and buyers can be rated. The rating system will provide important informations on sellers and products. To make the buyer's rate benefit for them, they will be rewarded by a cashback in our native token or a discount on their next purchase. The sellers can also rate the buyers on the basis of how fast they have processed the payment. This will allow more sellers willing to sell them. This system will be helpful for everyone, good sellers will receive good remarks and will be more attractive for buyers. In this way scammers can be prevented.

Whitepaper: YouTube:

How it's Made

We have used solidity to write our smart contracts. The smart contracts will behave as an escrow agent to store the funds. We will be using oracle of chainlink to feed the real world data of package tracking to the smart contracts. Truffle framework was used to compile and deploy our smart contracts. We have deployed our smart contract on rinkeby test network using Infura API.

We have imported OpenZeppelin library to implement the ERC20/1155 token standards.

Frontend was build with the help of moralis. We have also used Moralis cloud functions to save the user data. The frontend was integrated to the backend with the help of web3.js library. FTP servers were used to deploy our website.

background image mobile

Join the mailing list

Get the latest news and updates