├── .solhintignore ├── .npmignore ├── .eslintignore ├── .prettierignore ├── .gitignore ├── .solhint.json ├── .env.example ├── contracts ├── Mock │ ├── CRV.sol │ ├── CVX.sol │ └── CurveHelper.sol ├── BtrflyOhmBondingCalculator.sol ├── RedeemHelper.sol ├── OHMStake.sol ├── StakingWarmup.sol ├── StakingHelper.sol ├── thecosomata │ └── ThecosomataETH.sol ├── BondingCalculator27.sol ├── StandardBondingCalculator.sol ├── PBTRFLY.sol ├── ReserveIOUERC20.sol ├── StakingDistributor.sol ├── Staking.sol └── Treasury.sol ├── tsconfig.json ├── .eslintrc.js ├── test ├── constants.ts ├── Bonds.ts ├── utils.ts ├── LiveLPBondsOEOB.ts ├── LiveLPBondsLEOB.ts ├── ProtocolDeployment.ts ├── LiveLPBondsLELB.ts └── ThecosomataETH.ts ├── scripts └── deploy.ts ├── package.json ├── hardhat.config.ts └── README.md /.solhintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | hardhat.config.ts 2 | scripts 3 | test 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | artifacts 3 | cache 4 | coverage 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | artifacts 3 | cache 4 | coverage* 5 | gasReporterOutput.json 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | coverage 4 | coverage.json 5 | typechain 6 | 7 | #Hardhat files 8 | cache 9 | artifacts 10 | .DS_Store 11 | -------------------------------------------------------------------------------- /.solhint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "solhint:recommended", 3 | "rules": { 4 | "compiler-version": ["error", "^0.8.0"], 5 | "func-visibility": ["warn", { "ignoreConstructors": true }] 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1 2 | ROPSTEN_URL=https://eth-ropsten.alchemyapi.io/v2/ 3 | PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 4 | -------------------------------------------------------------------------------- /contracts/Mock/CRV.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.0; 3 | import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; 4 | 5 | contract CRV is ERC20 { 6 | constructor() ERC20('DAI Stablecoin', 'DAI') {} 7 | 8 | function mint(address to) public { 9 | _mint(to, 100000 ether); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /contracts/Mock/CVX.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.0; 3 | import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; 4 | 5 | contract CVX is ERC20 { 6 | constructor() ERC20('DAI Stablecoin', 'DAI') {} 7 | 8 | function mint(address to) public { 9 | _mint(to, 100000 ether); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "commonjs", 5 | "strict": true, 6 | "esModuleInterop": true, 7 | "outDir": "dist", 8 | "declaration": true, 9 | "resolveJsonModule": true 10 | }, 11 | "include": ["./scripts", "./test", "./typechain"], 12 | "files": ["./hardhat.config.ts"] 13 | } 14 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: false, 4 | es2021: true, 5 | mocha: true, 6 | node: true, 7 | }, 8 | plugins: ["@typescript-eslint"], 9 | extends: [ 10 | "standard", 11 | "plugin:prettier/recommended", 12 | "plugin:node/recommended", 13 | ], 14 | parser: "@typescript-eslint/parser", 15 | parserOptions: { 16 | ecmaVersion: 12, 17 | }, 18 | rules: { 19 | "node/no-unsupported-features/es-syntax": [ 20 | "error", 21 | { ignores: ["modules"] }, 22 | ], 23 | }, 24 | }; 25 | -------------------------------------------------------------------------------- /test/constants.ts: -------------------------------------------------------------------------------- 1 | export const CVX_BOND_DEPO_ADDRESS = '0x98e45ef7ead7e85d3cd8f07d3e7f02405a10b96d' 2 | export const CRV_BOND_DEPO_ADDRESS = '0xAe601DeF4406A0e5747654E9A356A38b0Cae5dDC' 3 | export const OHMV2_ADDRESS = '0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5' 4 | export const LP_BOND_DEPO_ADDRESS = '' 5 | export const LP_TOKEN_ADDRESS = '0xe9AB8038Ee6Dd4fCC7612997FE28d4e22019C4B4' 6 | export const TREASURY_ADDRESS = '0x086C98855dF3C78C6b481b6e1D47BeF42E9aC36B' 7 | export const STAKING_ADDRESS = '0xBdE4Dfb0dbb0Dd8833eFb6C5BD0Ce048C852C487' 8 | export const STAKING_HELPER_ADDRESS = '0xC0840Ec5527d3e70d66AE6575642916F3Fd18aDf' 9 | export const WARMUP_ADDRESS = '0x7521C8c7ba7e1F650c1109c40876C5Dd52f5614c' 10 | export const STAKING_DISTRIBUTOR_ADDRESS = '0xB2120AE79d838d6703Cf6d2ac5cC68b5DB10683F' 11 | export const BTRFLY_ADDRESS = '0xc0d4ceb216b3ba9c3701b291766fdcba977cec3a' 12 | export const PBTRFLY_ADDRESS = '0x57503824e256e878db8136fde66f155c49e362df' 13 | export const BONDING_CALCULATOR = '0xCA1d53E40eab232DEff03Dc824410100BcCCF2bC' 14 | export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000' 15 | -------------------------------------------------------------------------------- /scripts/deploy.ts: -------------------------------------------------------------------------------- 1 | // We require the Hardhat Runtime Environment explicitly here. This is optional 2 | // but useful for running the script in a standalone fashion through `node