Skip to content

lordofdegen/perennial-v2

 
 

Repository files navigation

1500x500 perennial

🌸 Perennial V2 is a general-purpose synthetic derivatives primitive for decentralized finance.

Twitter Follow

📦 Packages

Package Description Latest Version
@perennial-v2 Core perennial smart contracts. npm version
@perennial-v2-deploy Deployment scripts and artifacts. npm version
@perennial-v2-extensions Extension smart contracts. npm version
@perennial-v2-oracle Oracle provider smart contracts. npm version
@perennial-v2-vault Vault smart contracts. npm version

🔗 Resources

👨‍💻 Usage

Pre Requisites

Before running any command, make sure to install dependencies

$ yarn

Compile

Compile the smart contracts for each package with Hardhat:

$ yarn workspaces run compile

This also generates the Typechain types

Test

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

🔐 Security

📜 License

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.6%
  • Solidity 14.4%