Skip to content

Latest commit

 

History

History
36 lines (33 loc) · 1.18 KB

README.md

File metadata and controls

36 lines (33 loc) · 1.18 KB

Defund Contracts

Non-custodial protocol, Users can deposit and withdraw assets from the vault without requiring approval from the vault manager. The vault manager will implement strategies to long and short assets, aiming to generate profits through effective vault management.

Usage

Download And Installation

git clone [email protected]:xiaoyu1998/defund-contracts.git --recursive
cd defund-contracts
npm install

Start Node

npx hardhat node

Install up-contracts And Copy Addresses From up-contracts

cp deployed_addresses.json  /to/path/df-contracts/deployments/localhost_deployed_addresses.json
cp token_addresses.json  /to/path//df-contracts/deployments/localhost_token_addresses.json

Deploy Defund And Run Scripts

npx hardhat run scripts/00deployDefund.ts --network localhost
npx hardhat run scripts/01deposit.ts --network localhost

Long And Short

npx hardhat run scripts/03long.ts --network localhost
npx hardhat run scripts/04short.ts --network localhost

ClosePosition And Close

npx hardhat run scripts/05closePosition.ts --network localhost
npx hardhat run scripts/06close.ts --network localhost