Skip to content

xiaoyu1998/unified-pool

Repository files navigation

Unified Pool

Users can deposit funds into the Unified Pool to earn funding fees from perpetual contracts, leverage fees from margin trading, and cross-chain transaction fees.

Foundry Support

curl -L https://foundry.paradigm.xyz | bash

Add Foundry In Path

export PATH="$PATH:/from/path/.foundry/bin"

Download

git clone git@github.com:xiaoyu1998/up-contracts.git --recursive

Installation

npm install

Run Local Node

npx hardhat node

Deploy Contracts

npx hardhat ignition deploy ignition/modules/deployExchangeRouter.ts --network localhost

Create Pools and Supply

npx hardhat run scripts/01createUsdtUniV3.ts --network localhost
npx hardhat run scripts/01createPools.ts --network localhost
npx hardhat run scripts/02oracleKeeper.ts --network localhost
npx hardhat run scripts/03executeSupply.ts --network localhost

Long and Short

npx hardhat run scripts/11executeLong.ts --network localhost
npx hardhat run scripts/12executeShort.ts --network localhost

ClosePosition

npx hardhat run scripts/13executeClosePosition.ts --network localhost

About

Earn leverage, funding, and cross-chain fees by depositing into the Unified Pool.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors