Silver Medalist 🥈 submission in Aptos Labs Blockchain Development Hackathon conducted at InterIIT Tech Meet 12.0 | December 2023
Futures on Chain is a decentralized futures trading platform built on top of the Aptos Blockchain. It has both a DEX (Decentralized Exchange) for the underlying commodity and a Futures Trading Platform built into it. The repository consists of a Frontend Website to interact with the contract using the browser wallet, two APIs for real time market data and order placing.
These instructions will help you get a copy of the project up and running on your local machine.
Before you begin, make sure you have the following installed:
-
-
Clone the repository:
git clone https://github.com/me/your-repositry
-
Change to the project directory:
cd your-repository/frontend
-
Install the dependencies:
yarn install
-
Populate env
- If you have deployed your own smart contract then populate the corresponding env variable with your own addresses.
- If you want to use our deployed smart contracts the use the env file as is.
VITE_APP_NETWORK=devnet // it can devnet or mainnet // module address for multiple future contracts VITE_APP_MODULE_ADDRESS_24H= VITE_APP_MODULE_ADDRESS_48H= VITE_APP_MODULE_ADDRESS_72H=
-
-
Do this only if you want to make your own smart contracts.
-
Change to the project directory:
cd your-repository/move
-
Run this command
aptos move create-resource-account-and-publish-package --profile [your-own-profile] --address-name Team18 --seed [any-random-number] --named-addresses source_addr=[your-own-source-address]
-
-
You can place orders and get real time market data using the frontend GUI (Graphical User Interface) or the one deployed Link.
-
You can also use the public API provided (or host your own) for market data and use the CLI for making transactions with the exchange
- Provides real-time market data, including the current price, trading volume, and order book depth for all available futures contracts. Further details about CLI can be found here
- Facilitates all financial transactions related to the buying and selling of futures contracts, as well as margin calls and settlements through a CLI. Further details about CLI can be found here
Click here to view the full presentation!
Click here to see a working demo!
To learn more about Aptos, click here.