Yet Another Perpetual eXchange
This is an implementation of mission #1 from Gateway (Advanced open course for auditors)
Our perpetual contract allows traders to open long or short positions on BTC with a given size and collateral, while also enabling liquidity providers to deposit and withdraw liquidity. The contract uses Chainlink's AggregatorV3Interface to fetch real-time BTC/USD price feed, ensuring accurate and reliable pricing data for the trading operations.
- Install Foundry
First run the command below to get foundryup, the Foundry toolchain installer:
curl -L https://foundry.paradigm.xyz | bash
Then, in a new terminal session or after reloading your PATH, run it to get the latest forge and cast binaries:
foundryup
- Clone This Repo and install dependencies
git clone https://github.com/Datswishty/yapex
cd yapex
forge install
forge test