🌸 Perennial V2 is a general-purpose synthetic derivatives primitive for decentralized finance.
- Read the protocol Documentation.
Before running any command, make sure to install dependencies
$ yarn
Compile the smart contracts for each package with Hardhat:
$ yarn workspaces run compile
This also generates the Typechain types
Perennial has 4 logic packages: perennial-v2
, perennial-v2-extensions
, perennial-v2-oracle
, and perennial-v2-vault
Run the Mocha unit tests a specific package:
$ yarn workspace @equilibria/<package-name> run test
For example, to run the tests for the core package:
$ yarn workspace @equilibria/perennial-v2 run test
To run tests against a Mainnet fork, set your MAINNET_NODE_URL
in the root .env
and run
$ yarn workspace run @equilibria/<package-name> test:integration
For example, to run the integration tests for the core package:
$ yarn workspace @equilibria/perennial-v2 run test:integration
- The perennial protocol is audited and insured by Sherlock and Zellic. Audit reports are available in audits
- Un-discovered bugs may be reported to our bug bounty program through Immunefi.
The vast majority of the Perennial V2 codebase is licensed under the Apache 2.0 license to provide developers with the maximum amount of flexibility. A minimum subset of code was chosen to place under the Business Source License 1.1 so as not to permit a full protocol redeployment.
License | License |
---|---|
Apache-2.0 |
All, unless stated otherwise. |
BUSL-1.1 |
Smart contracts: Market.sol and MarketFactory.sol in the @perennial-v2 package. |