Core smart contracts of Pendle Protocol.
On top of yield tokenisation, Pendle Protocol has an AMM specifically designed for the trading of time-decaying assets, which aims to minimise
impermanent loss (IL) for liquidity providers.
.env, similar to .env.examplemainnet and kovan, the scripts will use the deploying key as all the multisig.scripts/deploy/deploy.ts)
yarn deploy:core --network
`
* This will save the deployed contracts to deployments/
* If we want to reset the instance, put RESET=true:
`
RESET=true yarn deploy:core --network
`
* To deploy test instances of contracts (yield contracts, markets, liquidity mining) for an expiry: (this runs scripts/manage/seed_test_contracts.ts)
`
EXPIRY= yarn deploy:seed --network
`
* This will save the new yield contracts to deployments/ as well
* To verify contracts that have been deployed in deployments/:
* First, install tenderly link
* Then, tenderly login
* Run: (which runs scripts/manage/verify_tenderly.ts)
`
yarn verify --network
`Testing:
* Create a .env file containing the following properties:
`
ALCHEMY_KEY=
`
* Run test:
`
yarn test
`
* Run test coverage:
`
yarn coverage:all
`Setup for UI development environment (forking mainnet)
* In a separate terminal:
`
yarn hardhat node
`
* Mint tokens to alice, bob, charlie and let alice tokeniseYield, add liquidity and stake:
`
yarn dev
`
* Teleport by 1 week
`
yarn teleport
`Note on naming
* In the contracts and tests, Yield Token (YT) are referred to as XYT. XYT and YT refer to the same thing.Licensing
The primary license for Pendle Core is the Business Source License 1.1 (BUSL-1.1), see LICENSE.
$3
- All files in contracts/interfaces/, contracts/governance/ and contracts/mock are licensed under MIT (as indicated in their SPDX headers)
- contracts/periphery/Timelock.sol and contracts/tokens/PENDLE.sol are also licensed under MIT (as indicated in their SPDX header)
- All files in contracts/libraries/ are licensed under GPL-2.0-or-later (as indicated in their SPDX headers), see contracts/libraries/LICENSE`