Contracts for Robo Labs Perp Vault repo
Robo Labs
·
Report Bug
·
Request Feature
This repo contains the contracts for the RoboLabs Perp Vault. The strategy employed by the contract is to lend USD-pegged tokens which should be the same price as the Quote
token, and borrow the Base
token from Perpetual in order to provide concentrated and automated liquidity on the pair. The fees and rewards collected from this process are compounded. The price range for the position is updated as the price moves through rebalance
operations. This contract also supports leveraging the position up to 10X in accordance with the perpetual protocol.
To get started with this project, follow these steps:
- Clone this repository to your local machine.
- Install the necessary dependencies by running
npm install
- Configure
WETHPERP.sol
to use the parameters you desire. - Compile the contracts by running
brownie compile
. - Add optimism and fork to brownie running
brownie networks add development op-fork cmd=ganache-cli host=http://127.0.0.1/ fork=optimism-main accounts=10 mnemonic=brownie port=8545
- Test the contracts by running
brownie test tests/op/test_vault_wrapper.py --network op-fork
- Lint the code by running
npm run lint
.
Requires npm and pip. See .github/workflows for suitable versions.
npm install
pip install requirements-dev.txt
brownie compile
brownie test
npm run lint