@harvest-finance/harvest-strategy-polygon 0.0.1-security → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @harvest-finance/harvest-strategy-polygon might be problematic. Click here for more details.
- package/README.md +110 -5
- package/contracts/base/Controller.sol +125 -0
- package/contracts/base/ControllerV2.sol +363 -0
- package/contracts/base/FeeRewardForwarder.sol +163 -0
- package/contracts/base/PotPool.sol +360 -0
- package/contracts/base/ProfitSharingReceiver.sol +39 -0
- package/contracts/base/RewardForwarderV2.sol +109 -0
- package/contracts/base/Vault.sol +344 -0
- package/contracts/base/VaultERC4626.sol +113 -0
- package/contracts/base/VaultProxy.sol +35 -0
- package/contracts/base/VaultStorage.sol +199 -0
- package/contracts/base/VaultStorageV2.sol +196 -0
- package/contracts/base/VaultV2.sol +369 -0
- package/contracts/base/ape-base/MiniApeV2Strategy.sol +322 -0
- package/contracts/base/ape-base/interface/IMiniChefV2.sol +31 -0
- package/contracts/base/ape-base/interface/IRewarder.sol +10 -0
- package/contracts/base/factory/MegaFactory.sol +120 -0
- package/contracts/base/factory/interface/IPoolFactory.sol +6 -0
- package/contracts/base/factory/interface/IStrategyFactory.sol +6 -0
- package/contracts/base/factory/interface/IVaultFactory.sol +7 -0
- package/contracts/base/factory/pool/PotPoolFactory.sol +43 -0
- package/contracts/base/factory/strategy/UpgradableStrategyFactory.sol +19 -0
- package/contracts/base/factory/vault/RegularVaultFactory.sol +34 -0
- package/contracts/base/incentives/GlobalIncentivesHelper.sol +167 -0
- package/contracts/base/incentives/NotifyHelperGeneric.sol +61 -0
- package/contracts/base/incentives/NotifyHelperStateful.sol +290 -0
- package/contracts/base/inheritance/Controllable.sol +26 -0
- package/contracts/base/inheritance/ControllableInit.sol +31 -0
- package/contracts/base/inheritance/Governable.sol +29 -0
- package/contracts/base/inheritance/GovernableInit.sol +51 -0
- package/contracts/base/inheritance/IUpgradeSource.sol +8 -0
- package/contracts/base/inheritance/OwnableWhitelist.sol +17 -0
- package/contracts/base/inheritance/RewardTokenProfitNotifier.sol +48 -0
- package/contracts/base/inheritance/Storage.sol +36 -0
- package/contracts/base/interface/IController.sol +30 -0
- package/contracts/base/interface/IControllerV2.sol +135 -0
- package/contracts/base/interface/IERC4626.sol +263 -0
- package/contracts/base/interface/IFeeRewardForwarder.sol +9 -0
- package/contracts/base/interface/IProfitSharingReceiver.sol +10 -0
- package/contracts/base/interface/IRewardForwarder.sol +58 -0
- package/contracts/base/interface/IRewardPool.sol +34 -0
- package/contracts/base/interface/IStrategy.sol +25 -0
- package/contracts/base/interface/IUniversalLiquidator.sol +21 -0
- package/contracts/base/interface/IUniversalLiquidatorRegistry.sol +20 -0
- package/contracts/base/interface/IUpgradeSource.sol +8 -0
- package/contracts/base/interface/IVault.sol +35 -0
- package/contracts/base/interface/aave/DataTypes.sol +266 -0
- package/contracts/base/interface/aave/IAToken.sol +37 -0
- package/contracts/base/interface/aave/IPool.sol +13 -0
- package/contracts/base/interface/balancer/Gauge.sol +22 -0
- package/contracts/base/interface/balancer/IBVault.sol +557 -0
- package/contracts/base/interface/balancer/IBalancerMinter.sol +114 -0
- package/contracts/base/interface/balancer/linearPool/ILinearPool.sol +185 -0
- package/contracts/base/interface/balancer/linearPool/ILinearPoolFactory.sol +16 -0
- package/contracts/base/interface/balancer/linearPool/ILinearPoolRebalancer.sol +8 -0
- package/contracts/base/interface/balancer/linearPool/IPoolSwapStructs.sol +57 -0
- package/contracts/base/interface/caviar/ICaviarChef.sol +16 -0
- package/contracts/base/interface/compound/IComet.sol +114 -0
- package/contracts/base/interface/compound/ICometRewards.sol +17 -0
- package/contracts/base/interface/curve/Gauge.sol +25 -0
- package/contracts/base/interface/curve/ICurveDeposit_2token.sol +25 -0
- package/contracts/base/interface/curve/ICurveDeposit_2token_underlying.sol +31 -0
- package/contracts/base/interface/curve/ICurveDeposit_3token.sol +25 -0
- package/contracts/base/interface/curve/ICurveDeposit_3token_meta.sol +20 -0
- package/contracts/base/interface/curve/ICurveDeposit_3token_underlying.sol +31 -0
- package/contracts/base/interface/curve/ICurveDeposit_4token.sol +25 -0
- package/contracts/base/interface/curve/ICurveDeposit_4token_meta.sol +20 -0
- package/contracts/base/interface/curve/ICurveDeposit_4token_underlying.sol +31 -0
- package/contracts/base/interface/curve/ICurveDeposit_5token.sol +25 -0
- package/contracts/base/interface/curve/ICurveDeposit_5token_meta.sol +20 -0
- package/contracts/base/interface/curve/ICurveDeposit_5token_underlying.sol +31 -0
- package/contracts/base/interface/curve/ICurveDeposit_6token.sol +25 -0
- package/contracts/base/interface/curve/ICurveDeposit_6token_meta.sol +20 -0
- package/contracts/base/interface/gamma/IClearing.sol +8 -0
- package/contracts/base/interface/gamma/IHypervisor.sol +17 -0
- package/contracts/base/interface/gamma/IStakingRewards.sol +35 -0
- package/contracts/base/interface/gamma/IUniProxy.sol +15 -0
- package/contracts/base/interface/kyber/IDMMExchangeRouter.sol +69 -0
- package/contracts/base/interface/kyber/IDMMFactory.sol +35 -0
- package/contracts/base/interface/kyber/IDMMLiquidityRouter.sol +204 -0
- package/contracts/base/interface/kyber/IDMMPool.sol +42 -0
- package/contracts/base/interface/kyber/IDMMRouter01.sol +12 -0
- package/contracts/base/interface/kyber/IDMMRouter02.sol +55 -0
- package/contracts/base/interface/kyber/IKyberZap.sol +7 -0
- package/contracts/base/interface/merkl/IDistributor.sol +6 -0
- package/contracts/base/interface/morpho/IMetaMorpho.sol +7 -0
- package/contracts/base/interface/pearl/IGauge.sol +13 -0
- package/contracts/base/interface/pearl/IPair.sol +44 -0
- package/contracts/base/interface/pearl/IRouter.sol +305 -0
- package/contracts/base/interface/quickswap/IDragonLair.sol +25 -0
- package/contracts/base/interface/quickswap/IMasterChef.sol +13 -0
- package/contracts/base/interface/uniswap/IUniswapV2Factory.sol +15 -0
- package/contracts/base/interface/uniswap/IUniswapV2Migrator.sol +6 -0
- package/contracts/base/interface/uniswap/IUniswapV2Pair.sol +59 -0
- package/contracts/base/interface/uniswap/IUniswapV2Router01.sol +96 -0
- package/contracts/base/interface/uniswap/IUniswapV2Router02.sol +137 -0
- package/contracts/base/interface/uniswap/IUniswapV3Pool.sol +24 -0
- package/contracts/base/interface/uniswap/IUniswapV3Router.sol +64 -0
- package/contracts/base/interface/uniswap/IWETH.sol +8 -0
- package/contracts/base/interface/uniswap/pool/IUniswapV3PoolActions.sol +103 -0
- package/contracts/base/interface/uniswap/pool/IUniswapV3PoolDerivedState.sol +40 -0
- package/contracts/base/interface/uniswap/pool/IUniswapV3PoolEvents.sol +121 -0
- package/contracts/base/interface/uniswap/pool/IUniswapV3PoolImmutables.sol +35 -0
- package/contracts/base/interface/uniswap/pool/IUniswapV3PoolOwnerActions.sol +23 -0
- package/contracts/base/interface/uniswap/pool/IUniswapV3PoolState.sol +116 -0
- package/contracts/base/masterchef-base/MasterChefHodlStrategy.sol +240 -0
- package/contracts/base/masterchef-base/MasterChefStrategy.sol +364 -0
- package/contracts/base/masterchef-base/interfaces/IMasterChef.sol +12 -0
- package/contracts/base/migration/vaultMigratable_2JPYv2.sol +87 -0
- package/contracts/base/migration/vaultMigratable_bal2EUR_PAR.sol +121 -0
- package/contracts/base/migration/vaultMigratable_bal2EUR_agEUR.sol +121 -0
- package/contracts/base/migration/vaultMigratable_balMaticX.sol +153 -0
- package/contracts/base/migration/vaultMigratable_balStMatic.sol +153 -0
- package/contracts/base/noop/NoopStrategy.sol +89 -0
- package/contracts/base/noop/NoopStrategyUpgradeable.sol +92 -0
- package/contracts/base/sushi-base/MiniChefV2Strategy.sol +380 -0
- package/contracts/base/sushi-base/interface/IMiniChefV2.sol +31 -0
- package/contracts/base/sushi-base/interface/IRewarder.sol +9 -0
- package/contracts/base/sushi-base/lib/BoringERC20.sol +30 -0
- package/contracts/base/upgradability/Address.sol +33 -0
- package/contracts/base/upgradability/BaseUpgradeabilityProxy.sol +61 -0
- package/contracts/base/upgradability/BaseUpgradeableStrategy.sol +111 -0
- package/contracts/base/upgradability/BaseUpgradeableStrategyStorage.sol +176 -0
- package/contracts/base/upgradability/BaseUpgradeableStrategyStorageV2.sol +290 -0
- package/contracts/base/upgradability/BaseUpgradeableStrategyV2.sol +145 -0
- package/contracts/base/upgradability/IUpgradable.sol +7 -0
- package/contracts/base/upgradability/Proxy.sol +71 -0
- package/contracts/base/upgradability/ReentrancyGuard.sol +57 -0
- package/contracts/base/upgradability/ReentrancyGuardUpgradeable.sol +51 -0
- package/contracts/base/upgradability/StrategyProxy.sol +35 -0
- package/contracts/base/wmatic/WMATIC.sol +8 -0
- package/contracts/strategies/aave/AaveSupplyStrategy.sol +213 -0
- package/contracts/strategies/aave/AaveSupplyStrategyMainnet_DAI.sol +23 -0
- package/contracts/strategies/aave/AaveSupplyStrategyMainnet_EURS.sol +23 -0
- package/contracts/strategies/aave/AaveSupplyStrategyMainnet_USDC.sol +23 -0
- package/contracts/strategies/aave/AaveSupplyStrategyMainnet_USDCe.sol +23 -0
- package/contracts/strategies/aave/AaveSupplyStrategyMainnet_USDT.sol +23 -0
- package/contracts/strategies/ape/ApeStrategyMainnet_BANANA_MATIC.sol +36 -0
- package/contracts/strategies/ape/ApeStrategyMainnet_BNB_MATIC.sol +36 -0
- package/contracts/strategies/ape/ApeStrategyMainnet_BTC_MATIC.sol +36 -0
- package/contracts/strategies/ape/ApeStrategyMainnet_DAI_MATIC.sol +36 -0
- package/contracts/strategies/ape/ApeStrategyMainnet_DAI_USDC.sol +37 -0
- package/contracts/strategies/ape/ApeStrategyMainnet_ETH_MATIC.sol +36 -0
- package/contracts/strategies/ape/ApeStrategyMainnet_USDT_MATIC.sol +36 -0
- package/contracts/strategies/aura/AuraStrategy.sol +347 -0
- package/contracts/strategies/aura/AuraStrategyMainnet_jEUR_PAR.sol +30 -0
- package/contracts/strategies/aura/interface/IAuraBaseRewardPool.sol +25 -0
- package/contracts/strategies/aura/interface/IAuraBooster.sol +17 -0
- package/contracts/strategies/aura/interface/IAuraDepositor.sol +7 -0
- package/contracts/strategies/balancer/BalancerStrategyV3.sol +509 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_2BRL.sol +39 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_2BRLUSD.sol +38 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_2EUR_PAR.sol +34 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_2EUR_PARv2.sol +34 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_2EUR_agEUR.sol +34 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_MATIC_USDC_ETH_BAL.sol +32 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_MaticX.sol +37 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_MaticX_amMatic.sol +38 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_SPHERE_MATIC.sol +34 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_TNGBL_USDC.sol +34 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_WBTC_ETH_USDC.sol +32 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_bbamusd.sol +36 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_frxETH.sol +32 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_frxETH_amWETH.sol +35 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_stETH.sol +35 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_stMatic.sol +36 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_stMatic_amMatic.sol +39 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_tetuBal.sol +36 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_wUSDR_USDC.sol +34 -0
- package/contracts/strategies/balancer/BalancerStrategyV3Mainnet_wstETH_amWETH.sol +37 -0
- package/contracts/strategies/balancer/interface/Gauge.sol +26 -0
- package/contracts/strategies/balancer/interface/IBVault.sol +557 -0
- package/contracts/strategies/balancer/interface/IBalanceMinter.sol +114 -0
- package/contracts/strategies/complifi/ComplifiDerivStrategy.sol +381 -0
- package/contracts/strategies/complifi/ComplifiDerivStrategyMainnet_ETH5x.sol +35 -0
- package/contracts/strategies/complifi/ComplifiStrategy.sol +362 -0
- package/contracts/strategies/complifi/ComplifiStrategyMainnet_COMFI_WETH.sol +34 -0
- package/contracts/strategies/complifi/interfaces/ILiquidityMining.sol +13 -0
- package/contracts/strategies/complifi/interfaces/ILiquidityPool.sol +63 -0
- package/contracts/strategies/complifi/interfaces/IProxyActions.sol +10 -0
- package/contracts/strategies/complifi/interfaces/IUSDCVault.sol +55 -0
- package/contracts/strategies/compound/CompoundStrategy.sol +296 -0
- package/contracts/strategies/compound/CompoundStrategyMainnet_USDC.sol +28 -0
- package/contracts/strategies/compound/CompoundStrategyMainnet_USDT.sol +28 -0
- package/contracts/strategies/compound-blue/CompoundBlueStrategy.sol +292 -0
- package/contracts/strategies/compound-blue/CompoundBlueStrategyMainnet_ETH.sol +27 -0
- package/contracts/strategies/compound-blue/CompoundBlueStrategyMainnet_USDC.sol +27 -0
- package/contracts/strategies/compound-blue/CompoundBlueStrategyMainnet_USDT.sol +27 -0
- package/contracts/strategies/convex/ConvexStrategyMainnet_3CRV.sol +40 -0
- package/contracts/strategies/convex/ConvexStrategyMainnet_3CRYPTO.sol +37 -0
- package/contracts/strategies/convex/ConvexStrategyMainnet_CRV_3CRYPTO copy.sol +37 -0
- package/contracts/strategies/convex/ConvexStrategyMainnet_MATIC_3CRYPTO.sol +37 -0
- package/contracts/strategies/convex/ConvexStrategyMainnet_USDR.sol +40 -0
- package/contracts/strategies/convex/ConvexStrategyMainnet_aCRV.sol +38 -0
- package/contracts/strategies/convex/base/ConvexStrategy.sol +480 -0
- package/contracts/strategies/convex/interface/IBaseRewardPool.sol +13 -0
- package/contracts/strategies/convex/interface/IBooster.sol +10 -0
- package/contracts/strategies/gamma-merkl/GammaMerklStrategy.sol +272 -0
- package/contracts/strategies/gamma-merkl/GammaMerklStrategyMainnet_QS_ETH_USDC.sol +25 -0
- package/contracts/strategies/gamma-merkl/GammaMerklStrategyMainnet_QS_ETH_USDT.sol +25 -0
- package/contracts/strategies/gamma-merkl/GammaMerklStrategyMainnet_QS_MATIC_USDT.sol +25 -0
- package/contracts/strategies/gamma-merkl/GammaMerklStrategyMainnet_QS_TBTC_ETH.sol +25 -0
- package/contracts/strategies/gamma-merkl/GammaMerklStrategyMainnet_QS_WBTC_ETH_w.sol +25 -0
- package/contracts/strategies/genomes/NoopStrategy_GENE_ETH.sol +23 -0
- package/contracts/strategies/genomes/NoopStrategy_GNOME_ETH.sol +23 -0
- package/contracts/strategies/idle/IdleFinanceStrategy.sol +240 -0
- package/contracts/strategies/idle/IdleStrategyDAIMainnet.sol +33 -0
- package/contracts/strategies/idle/IdleStrategyUSDCMainnet.sol +33 -0
- package/contracts/strategies/idle/IdleStrategyWETHMainnet.sol +30 -0
- package/contracts/strategies/idle/interface/IdleToken.sol +58 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3.sol +351 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_2CAD.sol +34 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_2EUR.sol +34 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_2EUR_EURT.sol +34 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_2EUR_EURe.sol +34 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_2EUR_PAR.sol +34 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_2JPY.sol +34 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_2JPYv2.sol +34 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_2NZD.sol +34 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_2SGD.sol +34 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_jCHF_USDC.sol +35 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_jCHF_WETH.sol +35 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_jEUR_USDC.sol +35 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_jEUR_WETH.sol +35 -0
- package/contracts/strategies/jarvis/JarvisHodlStrategyV3Mainnet_jGBP_USDC.sol +35 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3.sol +281 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_AUR3_USDC.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_AURJUL22_WETH.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_DEN2_4EUR.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_DEN3_4EUR.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_DEN4_4EUR.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_JRTANGLENOV22_2EURagEUR.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_JRTANGLE_2EURagEUR.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_JRTJUL22_USDC.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_JRTMAY22_USDC.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_JRTMIMONOV22_2EURPAR.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_JRTMIMO_2EURPAR.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_JRTNOV22_USDC.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_JRTSEP22_USDC.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_QUI_2CAD.sol +27 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_SES_2JPY.sol +28 -0
- package/contracts/strategies/jarvis/JarvisStrategyV3Mainnet_agDEN_2EUR.sol +27 -0
- package/contracts/strategies/jarvis/interface/IElysianFields.sol +11 -0
- package/contracts/strategies/jarvis/interface/IKyberFairLaunch.sol +13 -0
- package/contracts/strategies/jarvis/interface/IKyberRewardLocker.sol +9 -0
- package/contracts/strategies/meshswap/MeshswapStrategy.sol +304 -0
- package/contracts/strategies/meshswap/MeshswapStrategyMainnet_MESH_oMOOI.sol +30 -0
- package/contracts/strategies/meshswap/MeshswapStrategyMainnet_MESH_oZEMIT.sol +30 -0
- package/contracts/strategies/meshswap/MeshswapStrategyMainnet_USDC_oUSDC.sol +31 -0
- package/contracts/strategies/meshswap/MeshswapStrategyMainnet_USDT_oUSDT.sol +31 -0
- package/contracts/strategies/meshswap/MeshswapStrategyMainnet_WMATIC_MESH.sol +27 -0
- package/contracts/strategies/meshswap/MeshswapStrategyMainnet_WMATIC_USDC.sol +28 -0
- package/contracts/strategies/meshswap/MeshswapStrategyMainnet_WMATIC_USDT.sol +28 -0
- package/contracts/strategies/meshswap/interface/IExchange.sol +9 -0
- package/contracts/strategies/meshswap/interface/IRouter.sol +68 -0
- package/contracts/strategies/pearl/CaviarStrategy.sol +244 -0
- package/contracts/strategies/pearl/CaviarStrategyMainnet_CVR.sol +26 -0
- package/contracts/strategies/pearl/PearlHodlStrategy.sol +254 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_CVR_PEARL.sol +27 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_DAI_USDR.sol +27 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_ETH_USDR.sol +27 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_MATIC_USDR.sol +27 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_PEARL_USDR.sol +27 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_STAR_USDR.sol +27 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_TNGBL_USDR.sol +27 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_USDC_USDR.sol +27 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_USDT_USDR.sol +27 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_WBTC_USDR.sol +27 -0
- package/contracts/strategies/pearl/PearlHodlStrategyMainnet_wUSDR_USDR.sol +27 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategy.sol +400 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyMainnet_MATIC_ETH_narrow.sol +31 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyMainnet_MATIC_ETH_wide.sol +31 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyMainnet_MATIC_USDC_narrow.sol +31 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyMainnet_MATIC_USDC_wide.sol +31 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyMainnet_USDC_ETH_narrow.sol +34 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyMainnet_USDC_ETH_wide.sol +34 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyV2.sol +348 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyV2Mainnet_USDC_DAI.sol +28 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyV2Mainnet_USDC_USDT.sol +29 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyV2Mainnet_WBTC_ETH_narrow.sol +28 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyV2Mainnet_WBTC_USDC_narrow.sol +28 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyV2Mainnet_cbETH_ETH.sol +28 -0
- package/contracts/strategies/quick-gamma/QuickGammaStrategyV2Mainnet_wstETH_ETH.sol +28 -0
- package/contracts/strategies/uniswap-gamma/UniswapGammaStrategy.sol +312 -0
- package/contracts/strategies/uniswap-gamma/UniswapGammaStrategyMainnet_USDC_DAI.sol +28 -0
- package/contracts/strategies/uniswap-gamma/UniswapGammaStrategyMainnet_USDC_USDT.sol +28 -0
- package/contracts/strategies/uniswap-gamma/UniswapGammaStrategyMainnet_USDC_WETH.sol +28 -0
- package/contracts/strategies/uniswap-gamma/UniswapGammaStrategyMainnet_WMATIC_USDC.sol +28 -0
- package/contracts/strategies/yel/YelStrategy.sol +350 -0
- package/contracts/strategies/yel/YelStrategyMainnet_YEL_WETH.sol +29 -0
- package/hardhat.config.js +58 -0
- package/index.js +42 -0
- package/package.json +56 -6
- package/scripts/01-deploy-vault-regular-with-upgradable-strategy.js +41 -0
- package/scripts/02-deploy-vault-regular.js +35 -0
- package/scripts/03-deploy-upgradable-strategy.js +34 -0
- package/scripts/04-deploy-new-implementation.js +24 -0
- package/scripts/README.md +55 -0
- package/scripts/utils.js +42 -0
- package/test/aave/dai.js +207 -0
- package/test/aave/eurs.js +207 -0
- package/test/aave/usdc.js +206 -0
- package/test/aave/usdce.js +206 -0
- package/test/aave/usdt.js +206 -0
- package/test/ape/banana-matic.js +157 -0
- package/test/ape/bnb-matic.js +159 -0
- package/test/ape/btc-matic.js +159 -0
- package/test/ape/dai-matic.js +159 -0
- package/test/ape/dai-usdc.js +163 -0
- package/test/ape/eth-matic.js +158 -0
- package/test/ape/usdt-matic.js +159 -0
- package/test/aura/jeur-par.js +135 -0
- package/test/balancer/2brl_v3.js +123 -0
- package/test/balancer/2brlusd_v3.js +123 -0
- package/test/balancer/2eur_ageur.js +141 -0
- package/test/balancer/2eur_par.js +141 -0
- package/test/balancer/2eur_par_v2.js +123 -0
- package/test/balancer/bbamusd_v3.js +124 -0
- package/test/balancer/btc.js +131 -0
- package/test/balancer/frxETH.js +123 -0
- package/test/balancer/frxeth_amweth.js +123 -0
- package/test/balancer/matic_usdc_eth_bal.js +123 -0
- package/test/balancer/maticx_ammatic.js +123 -0
- package/test/balancer/maticx_v2.js +120 -0
- package/test/balancer/maticx_v3.js +141 -0
- package/test/balancer/polybase.js +131 -0
- package/test/balancer/polybase_v2.js +121 -0
- package/test/balancer/polydefi.js +131 -0
- package/test/balancer/polydefi2.js +131 -0
- package/test/balancer/qipool.js +136 -0
- package/test/balancer/sphere_matic.js +123 -0
- package/test/balancer/stETH.js +123 -0
- package/test/balancer/stable.js +131 -0
- package/test/balancer/stable_v2.js +121 -0
- package/test/balancer/stmatic_ammatic.js +123 -0
- package/test/balancer/stmatic_v2.js +120 -0
- package/test/balancer/stmatic_v3.js +141 -0
- package/test/balancer/tetubal_v3.js +123 -0
- package/test/balancer/tngbl_usdc.js +123 -0
- package/test/balancer/tricrypto.js +131 -0
- package/test/balancer/tusd_stable.js +142 -0
- package/test/balancer/usdc_weth.js +136 -0
- package/test/balancer/usdc_weth_v2.js +123 -0
- package/test/balancer/wbtc_eth_usdc.js +123 -0
- package/test/balancer/wbtc_weth.js +136 -0
- package/test/balancer/wsteth_amweth.js +123 -0
- package/test/balancer/wusdr_usdc.js +123 -0
- package/test/compound/usdc.js +127 -0
- package/test/compound/usdt.js +129 -0
- package/test/compound-blue/eth.js +136 -0
- package/test/compound-blue/usdc.js +136 -0
- package/test/compound-blue/usdt.js +136 -0
- package/test/convex/3crv.js +123 -0
- package/test/convex/3crypto.js +123 -0
- package/test/convex/acrv.js +123 -0
- package/test/convex/crv_3crypto.js +123 -0
- package/test/convex/matic_3crypto.js +123 -0
- package/test/convex/usdr.js +123 -0
- package/test/core/emission-fork.js +197 -0
- package/test/core/emission.js +209 -0
- package/test/core/vault_upgrade.js +129 -0
- package/test/curve/aave.js +132 -0
- package/test/curve/atricrypto3.js +135 -0
- package/test/curve/eurtusd.js +135 -0
- package/test/gamma-merkl/qs-eth-usdc.js +212 -0
- package/test/gamma-merkl/qs-eth-usdt.js +213 -0
- package/test/gamma-merkl/qs-matic-usdt.js +213 -0
- package/test/gamma-merkl/qs-tbtc-eth.js +213 -0
- package/test/gamma-merkl/qs-wbtc-eth-w.js +213 -0
- package/test/genomes/gene-eth.js +115 -0
- package/test/genomes/gnome-eth.js +115 -0
- package/test/idle/dai.js +129 -0
- package/test/idle/usdc.js +128 -0
- package/test/idle/weth.js +128 -0
- package/test/jarvis/2cad-hodl.js +183 -0
- package/test/jarvis/2cad-update-nov22.js +182 -0
- package/test/jarvis/2cad-update.js +177 -0
- package/test/jarvis/2cad-update2.js +182 -0
- package/test/jarvis/2cad-update3.js +182 -0
- package/test/jarvis/2eur-ageur-update-nov22.js +182 -0
- package/test/jarvis/2eur-ageur-update.js +182 -0
- package/test/jarvis/2eur-eure-hodl.js +176 -0
- package/test/jarvis/2eur-eurt-hodl.js +176 -0
- package/test/jarvis/2eur-eurt-update-nov22.js +182 -0
- package/test/jarvis/2eur-hodl.js +176 -0
- package/test/jarvis/2eur-par-hodl.js +176 -0
- package/test/jarvis/2eur-par-update-nov22.js +182 -0
- package/test/jarvis/2jpy-hodl.js +244 -0
- package/test/jarvis/2jpy-update-nov22.js +182 -0
- package/test/jarvis/2jpy-update.js +177 -0
- package/test/jarvis/2jpy-update2.js +182 -0
- package/test/jarvis/2jpyv2-upgrade.js +184 -0
- package/test/jarvis/2nzd-hodl.js +176 -0
- package/test/jarvis/2nzd-update.js +182 -0
- package/test/jarvis/2sgd-hodl.js +176 -0
- package/test/jarvis/2sgd-update-nov22.js +182 -0
- package/test/jarvis/2sgd-update.js +182 -0
- package/test/jarvis/2sgd-update2.js +182 -0
- package/test/jarvis/4eur-hodl-upgrade.js +177 -0
- package/test/jarvis/4eur-hodl.js +183 -0
- package/test/jarvis/4eur-update.js +181 -0
- package/test/jarvis/4eur-update2.js +181 -0
- package/test/jarvis/agden-2eur.js +222 -0
- package/test/jarvis/aur-usdc-v2.js +115 -0
- package/test/jarvis/aur-usdc.js +127 -0
- package/test/jarvis/aur3-usdc.js +115 -0
- package/test/jarvis/aurjul22-weth.js +222 -0
- package/test/jarvis/den-4eur.js +115 -0
- package/test/jarvis/den2-4eur.js +220 -0
- package/test/jarvis/den3-4eur.js +220 -0
- package/test/jarvis/den4-4eur.js +220 -0
- package/test/jarvis/jchf-usdc-hodl-v2.js +184 -0
- package/test/jarvis/jchf-usdc-hodl-v3.js +178 -0
- package/test/jarvis/jchf-usdc-hodl.js +193 -0
- package/test/jarvis/jchf-weth-hodl.js +176 -0
- package/test/jarvis/jeur-usdc-hodl-v2.js +184 -0
- package/test/jarvis/jeur-usdc-hodl-v3.js +178 -0
- package/test/jarvis/jeur-usdc-hodl.js +193 -0
- package/test/jarvis/jeur-weth-hodl.js +176 -0
- package/test/jarvis/jgbp-usdc-hodl-v2.js +184 -0
- package/test/jarvis/jgbp-usdc-hodl-v3.js +178 -0
- package/test/jarvis/jgbp-usdc-hodl.js +193 -0
- package/test/jarvis/jrtangle-2eurageur.js +220 -0
- package/test/jarvis/jrtanglenov22-2eurageur.js +220 -0
- package/test/jarvis/jrtjul22-usdc.js +115 -0
- package/test/jarvis/jrtmay22-usdc.js +115 -0
- package/test/jarvis/jrtmimo-2eurpar.js +220 -0
- package/test/jarvis/jrtmimonov22-2eurpar.js +220 -0
- package/test/jarvis/jrtnov22-usdc.js +220 -0
- package/test/jarvis/jrtsep22-usdc.js +220 -0
- package/test/jarvis/qui-2cad.js +218 -0
- package/test/jarvis/ses-2jpy.js +222 -0
- package/test/meshswap/mesh-omooi.js +197 -0
- package/test/meshswap/mesh-ozemit.js +197 -0
- package/test/meshswap/usdc-ousdc.js +197 -0
- package/test/meshswap/usdt-ousdt.js +197 -0
- package/test/meshswap/wmatic-mesh.js +197 -0
- package/test/meshswap/wmatic-usdc.js +197 -0
- package/test/meshswap/wmatic-usdt.js +197 -0
- package/test/mstable/musd.js +123 -0
- package/test/pearl/cvr-pearl.js +198 -0
- package/test/pearl/cvr.js +133 -0
- package/test/pearl/dai-usdr.js +198 -0
- package/test/pearl/eth-usdr.js +198 -0
- package/test/pearl/matic-usdr.js +198 -0
- package/test/pearl/pearl-usdr.js +198 -0
- package/test/pearl/star-usdr.js +186 -0
- package/test/pearl/tngbl-usdr.js +198 -0
- package/test/pearl/usdc-usdr.js +198 -0
- package/test/pearl/usdt-usdr.js +198 -0
- package/test/pearl/wbtc-usdr.js +198 -0
- package/test/pearl/wusdr-usdr.js +198 -0
- package/test/popsicle/ice-weth.js +128 -0
- package/test/quick/eth-matic.js +132 -0
- package/test/quick/eth-usdt.js +140 -0
- package/test/quick/ifarm-quick.js +147 -0
- package/test/quick/matic-usdc.js +145 -0
- package/test/quick/psp-matic.js +124 -0
- package/test/quick/wbtc-eth.js +145 -0
- package/test/quick-gamma/cbeth-eth.js +207 -0
- package/test/quick-gamma/matic-eth-narrow.js +201 -0
- package/test/quick-gamma/matic-eth-wide.js +197 -0
- package/test/quick-gamma/matic-usdc-narrow.js +197 -0
- package/test/quick-gamma/matic-usdc-wide.js +197 -0
- package/test/quick-gamma/upgrade/matic-eth-narrow.js +204 -0
- package/test/quick-gamma/upgrade/matic-usdc-narrow.js +199 -0
- package/test/quick-gamma/usdc-dai.js +209 -0
- package/test/quick-gamma/usdc-eth-narrow.js +197 -0
- package/test/quick-gamma/usdc-eth-wide.js +197 -0
- package/test/quick-gamma/usdc-usdt.js +209 -0
- package/test/quick-gamma/wbtc-eth-narrow.js +207 -0
- package/test/quick-gamma/wbtc-usdc-narrow.js +209 -0
- package/test/quick-gamma/wsteth-eth.js +207 -0
- package/test/sushi/eth-usdt.js +153 -0
- package/test/sushi/matic-eth.js +138 -0
- package/test/sushi/usdc-eth.js +153 -0
- package/test/test-config.js +24 -0
- package/test/uniswap-gamma/usdc-dai.js +212 -0
- package/test/uniswap-gamma/usdc-usdt.js +212 -0
- package/test/uniswap-gamma/usdc-weth.js +212 -0
- package/test/uniswap-gamma/wmatic-usdc.js +210 -0
- package/test/utilities/Utils.js +96 -0
- package/test/utilities/hh-utils.js +242 -0
- package/test/utilities/make-vault.js +10 -0
- package/test/yel/yel-wmatic.js +129 -0
@@ -0,0 +1,244 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "@openzeppelin/contracts/math/Math.sol";
|
5
|
+
import "@openzeppelin/contracts/math/SafeMath.sol";
|
6
|
+
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
|
7
|
+
import "../../base/interface/IUniversalLiquidator.sol";
|
8
|
+
import "../../base/interface/IVault.sol";
|
9
|
+
import "../../base/upgradability/BaseUpgradeableStrategyV2.sol";
|
10
|
+
import "../../base/interface/caviar/ICaviarChef.sol";
|
11
|
+
|
12
|
+
contract CaviarStrategy is BaseUpgradeableStrategyV2 {
|
13
|
+
|
14
|
+
using SafeMath for uint256;
|
15
|
+
using SafeERC20 for IERC20;
|
16
|
+
|
17
|
+
address public constant harvestMSIG = address(0x39cC360806b385C96969ce9ff26c23476017F652);
|
18
|
+
|
19
|
+
// this would be reset on each upgrade
|
20
|
+
address[] public rewardTokens;
|
21
|
+
|
22
|
+
constructor() public BaseUpgradeableStrategyV2() {
|
23
|
+
}
|
24
|
+
|
25
|
+
function initializeBaseStrategy(
|
26
|
+
address _storage,
|
27
|
+
address _underlying,
|
28
|
+
address _vault,
|
29
|
+
address _rewardPool,
|
30
|
+
address _rewardToken
|
31
|
+
) public initializer {
|
32
|
+
|
33
|
+
BaseUpgradeableStrategyV2.initialize(
|
34
|
+
_storage,
|
35
|
+
_underlying,
|
36
|
+
_vault,
|
37
|
+
_rewardPool,
|
38
|
+
_rewardToken,
|
39
|
+
harvestMSIG
|
40
|
+
);
|
41
|
+
|
42
|
+
address _lpt = ICaviarChef(_rewardPool).underlying();
|
43
|
+
require(_lpt == _underlying, "Underlying mismatch");
|
44
|
+
}
|
45
|
+
|
46
|
+
function depositArbCheck() public pure returns(bool) {
|
47
|
+
return true;
|
48
|
+
}
|
49
|
+
|
50
|
+
function _rewardPoolBalance() internal view returns (uint256 balance) {
|
51
|
+
(balance,) = ICaviarChef(rewardPool()).userInfo(address(this));
|
52
|
+
}
|
53
|
+
|
54
|
+
function _emergencyExitRewardPool() internal {
|
55
|
+
uint256 stakedBalance = _rewardPoolBalance();
|
56
|
+
if (stakedBalance != 0) {
|
57
|
+
_withdrawUnderlyingFromPool(stakedBalance);
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
function _withdrawUnderlyingFromPool(uint256 amount) internal {
|
62
|
+
uint256 toWithdraw = Math.min(_rewardPoolBalance(), amount);
|
63
|
+
if (toWithdraw > 0) {
|
64
|
+
ICaviarChef(rewardPool()).withdraw(toWithdraw, address(this));
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
function _enterRewardPool() internal {
|
69
|
+
address underlying_ = underlying();
|
70
|
+
address rewardPool_ = rewardPool();
|
71
|
+
uint256 entireBalance = IERC20(underlying_).balanceOf(address(this));
|
72
|
+
IERC20(underlying_).safeApprove(rewardPool_, 0);
|
73
|
+
IERC20(underlying_).safeApprove(rewardPool_, entireBalance);
|
74
|
+
ICaviarChef(rewardPool_).deposit(entireBalance, address(this));
|
75
|
+
}
|
76
|
+
|
77
|
+
function _investAllUnderlying() internal onlyNotPausedInvesting {
|
78
|
+
// this check is needed, because most of the SNX reward pools will revert if
|
79
|
+
// you try to stake(0).
|
80
|
+
if(IERC20(underlying()).balanceOf(address(this)) > 0) {
|
81
|
+
_enterRewardPool();
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
/*
|
86
|
+
* In case there are some issues discovered about the pool or underlying asset
|
87
|
+
* Governance can exit the pool properly
|
88
|
+
* The function is only used for emergency to exit the pool
|
89
|
+
*/
|
90
|
+
function emergencyExit() public onlyGovernance {
|
91
|
+
_emergencyExitRewardPool();
|
92
|
+
_setPausedInvesting(true);
|
93
|
+
}
|
94
|
+
|
95
|
+
/*
|
96
|
+
* Resumes the ability to invest into the underlying reward pools
|
97
|
+
*/
|
98
|
+
function continueInvesting() public onlyGovernance {
|
99
|
+
_setPausedInvesting(false);
|
100
|
+
}
|
101
|
+
|
102
|
+
function unsalvagableTokens(address token) public view returns (bool) {
|
103
|
+
return (token == rewardToken() || token == underlying());
|
104
|
+
}
|
105
|
+
|
106
|
+
function addRewardToken(address _token) public onlyGovernance {
|
107
|
+
rewardTokens.push(_token);
|
108
|
+
}
|
109
|
+
|
110
|
+
function _claimReward() internal {
|
111
|
+
ICaviarChef(rewardPool()).harvest(address(this));
|
112
|
+
}
|
113
|
+
|
114
|
+
function _liquidateReward(uint256 amountUnderlying) internal {
|
115
|
+
if (!sell()) {
|
116
|
+
// Profits can be disabled for possible simplified and rapid exit
|
117
|
+
emit ProfitsNotCollected(sell(), false);
|
118
|
+
return;
|
119
|
+
}
|
120
|
+
address _rewardToken = rewardToken();
|
121
|
+
address _underlying = underlying();
|
122
|
+
address _universalLiquidator = universalLiquidator();
|
123
|
+
for(uint256 i = 0; i < rewardTokens.length; i++){
|
124
|
+
address token = rewardTokens[i];
|
125
|
+
uint256 rewardBalance;
|
126
|
+
if (token == _underlying) {
|
127
|
+
rewardBalance = amountUnderlying;
|
128
|
+
} else {
|
129
|
+
rewardBalance = IERC20(token).balanceOf(address(this));
|
130
|
+
}
|
131
|
+
if (rewardBalance <= 1e10) {
|
132
|
+
continue;
|
133
|
+
}
|
134
|
+
if (token != _rewardToken){
|
135
|
+
IERC20(token).safeApprove(_universalLiquidator, 0);
|
136
|
+
IERC20(token).safeApprove(_universalLiquidator, rewardBalance);
|
137
|
+
IUniversalLiquidator(_universalLiquidator).swap(token, _rewardToken, rewardBalance, 1, address(this));
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
uint256 rewardBalance = IERC20(_rewardToken).balanceOf(address(this));
|
142
|
+
_notifyProfitInRewardToken(_rewardToken, rewardBalance);
|
143
|
+
uint256 remainingRewardBalance = IERC20(_rewardToken).balanceOf(address(this));
|
144
|
+
|
145
|
+
if (remainingRewardBalance == 0) {
|
146
|
+
return;
|
147
|
+
}
|
148
|
+
|
149
|
+
if (_underlying != _rewardToken) {
|
150
|
+
IERC20(_rewardToken).safeApprove(_universalLiquidator, 0);
|
151
|
+
IERC20(_rewardToken).safeApprove(_universalLiquidator, remainingRewardBalance);
|
152
|
+
IUniversalLiquidator(_universalLiquidator).swap(_rewardToken, _underlying, remainingRewardBalance, 1, address(this));
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
156
|
+
/*
|
157
|
+
* Withdraws all the asset to the vault
|
158
|
+
*/
|
159
|
+
function withdrawAllToVault() public restricted {
|
160
|
+
address _underlying = underlying();
|
161
|
+
uint256 balanceBefore = IERC20(_underlying).balanceOf(address(this));
|
162
|
+
_claimReward();
|
163
|
+
uint256 balanceAfter = IERC20(_underlying).balanceOf(address(this));
|
164
|
+
uint256 claimedUnderlying = balanceAfter.sub(balanceBefore);
|
165
|
+
_withdrawUnderlyingFromPool(_rewardPoolBalance());
|
166
|
+
_liquidateReward(claimedUnderlying);
|
167
|
+
address underlying_ = underlying();
|
168
|
+
IERC20(underlying_).safeTransfer(vault(), IERC20(underlying_).balanceOf(address(this)));
|
169
|
+
}
|
170
|
+
|
171
|
+
/*
|
172
|
+
* Withdraws all the asset to the vault
|
173
|
+
*/
|
174
|
+
function withdrawToVault(uint256 _amount) public restricted {
|
175
|
+
// Typically there wouldn't be any amount here
|
176
|
+
// however, it is possible because of the emergencyExit
|
177
|
+
address underlying_ = underlying();
|
178
|
+
uint256 entireBalance = IERC20(underlying_).balanceOf(address(this));
|
179
|
+
|
180
|
+
if(_amount > entireBalance){
|
181
|
+
// While we have the check above, we still using SafeMath below
|
182
|
+
// for the peace of mind (in case something gets changed in between)
|
183
|
+
uint256 needToWithdraw = _amount.sub(entireBalance);
|
184
|
+
uint256 toWithdraw = Math.min(_rewardPoolBalance(), needToWithdraw);
|
185
|
+
_withdrawUnderlyingFromPool(toWithdraw);
|
186
|
+
}
|
187
|
+
IERC20(underlying_).safeTransfer(vault(), _amount);
|
188
|
+
}
|
189
|
+
|
190
|
+
/*
|
191
|
+
* Note that we currently do not have a mechanism here to include the
|
192
|
+
* amount of reward that is accrued.
|
193
|
+
*/
|
194
|
+
function investedUnderlyingBalance() external view returns (uint256) {
|
195
|
+
if (rewardPool() == address(0)) {
|
196
|
+
return IERC20(underlying()).balanceOf(address(this));
|
197
|
+
}
|
198
|
+
// Adding the amount locked in the reward pool and the amount that is somehow in this contract
|
199
|
+
// both are in the units of "underlying"
|
200
|
+
// The second part is needed because there is the emergency exit mechanism
|
201
|
+
// which would break the assumption that all the funds are always inside of the reward pool
|
202
|
+
return _rewardPoolBalance().add(IERC20(underlying()).balanceOf(address(this)));
|
203
|
+
}
|
204
|
+
|
205
|
+
/*
|
206
|
+
* Governance or Controller can claim coins that are somehow transferred into the contract
|
207
|
+
* Note that they cannot come in take away coins that are used and defined in the strategy itself
|
208
|
+
*/
|
209
|
+
function salvage(address recipient, address token, uint256 amount) external onlyControllerOrGovernance {
|
210
|
+
// To make sure that governance cannot come in and take away the coins
|
211
|
+
require(!unsalvagableTokens(token), "token is defined as not salvagable");
|
212
|
+
IERC20(token).safeTransfer(recipient, amount);
|
213
|
+
}
|
214
|
+
|
215
|
+
/*
|
216
|
+
* Get the reward, sell it in exchange for underlying, invest what you got.
|
217
|
+
* It's not much, but it's honest work.
|
218
|
+
*
|
219
|
+
* Note that although `onlyNotPausedInvesting` is not added here,
|
220
|
+
* calling `investAllUnderlying()` affectively blocks the usage of `doHardWork`
|
221
|
+
* when the investing is being paused by governance.
|
222
|
+
*/
|
223
|
+
function doHardWork() external onlyNotPausedInvesting restricted {
|
224
|
+
address _underlying = underlying();
|
225
|
+
uint256 balanceBefore = IERC20(_underlying).balanceOf(address(this));
|
226
|
+
_claimReward();
|
227
|
+
uint256 balanceAfter = IERC20(_underlying).balanceOf(address(this));
|
228
|
+
uint256 claimedUnderlying = balanceAfter.sub(balanceBefore);
|
229
|
+
_liquidateReward(claimedUnderlying);
|
230
|
+
_investAllUnderlying();
|
231
|
+
}
|
232
|
+
|
233
|
+
/**
|
234
|
+
* Can completely disable claiming UNI rewards and selling. Good for emergency withdraw in the
|
235
|
+
* simplest possible way.
|
236
|
+
*/
|
237
|
+
function setSell(bool s) public onlyGovernance {
|
238
|
+
_setSell(s);
|
239
|
+
}
|
240
|
+
|
241
|
+
function finalizeUpgrade() external onlyGovernance {
|
242
|
+
_finalizeUpgrade();
|
243
|
+
}
|
244
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./CaviarStrategy.sol";
|
5
|
+
|
6
|
+
contract CaviarStrategyMainnet_CVR is CaviarStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x6AE96Cc93331c19148541D4D2f31363684917092);
|
15
|
+
address rewards = address(0x83C5022745B2511Bd199687a42D27BEFd025A9A9);
|
16
|
+
address usdr = address(0x40379a439D4F6795B6fc9aa5687dB461677A2dBa);
|
17
|
+
CaviarStrategy.initializeBaseStrategy(
|
18
|
+
_storage,
|
19
|
+
underlying,
|
20
|
+
_vault,
|
21
|
+
rewards,
|
22
|
+
usdr
|
23
|
+
);
|
24
|
+
rewardTokens = [underlying, usdr];
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,254 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "@openzeppelin/contracts/math/Math.sol";
|
5
|
+
import "@openzeppelin/contracts/math/SafeMath.sol";
|
6
|
+
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
|
7
|
+
import "../../base/interface/IUniversalLiquidator.sol";
|
8
|
+
import "../../base/interface/IVault.sol";
|
9
|
+
import "../../base/PotPool.sol";
|
10
|
+
import "../../base/upgradability/BaseUpgradeableStrategyV2.sol";
|
11
|
+
import "../../base/interface/pearl/IGauge.sol";
|
12
|
+
|
13
|
+
contract PearlHodlStrategy is BaseUpgradeableStrategyV2 {
|
14
|
+
|
15
|
+
using SafeMath for uint256;
|
16
|
+
using SafeERC20 for IERC20;
|
17
|
+
|
18
|
+
address public constant harvestMSIG = address(0x39cC360806b385C96969ce9ff26c23476017F652);
|
19
|
+
|
20
|
+
// additional storage slots (on top of BaseUpgradeableStrategy ones) are defined here
|
21
|
+
bytes32 internal constant _HODLVAULT_SLOT = 0xc26d330f887c749cb38ae7c37873ff08ac4bba7aec9113c82d48a0cf6cc145f2;
|
22
|
+
bytes32 internal constant _POTPOOL_SLOT = 0x7f4b50847e7d7a4da6a6ea36bfb188c77e9f093697337eb9a876744f926dd014;
|
23
|
+
|
24
|
+
constructor() public BaseUpgradeableStrategyV2() {
|
25
|
+
assert(_HODLVAULT_SLOT == bytes32(uint256(keccak256("eip1967.strategyStorage.hodlVault")) - 1));
|
26
|
+
assert(_POTPOOL_SLOT == bytes32(uint256(keccak256("eip1967.strategyStorage.potPool")) - 1));
|
27
|
+
}
|
28
|
+
|
29
|
+
function initializeBaseStrategy(
|
30
|
+
address _storage,
|
31
|
+
address _underlying,
|
32
|
+
address _vault,
|
33
|
+
address _rewardPool,
|
34
|
+
address _rewardToken,
|
35
|
+
address _hodlVault,
|
36
|
+
address _potPool
|
37
|
+
) public initializer {
|
38
|
+
|
39
|
+
BaseUpgradeableStrategyV2.initialize(
|
40
|
+
_storage,
|
41
|
+
_underlying,
|
42
|
+
_vault,
|
43
|
+
_rewardPool,
|
44
|
+
_rewardToken,
|
45
|
+
harvestMSIG
|
46
|
+
);
|
47
|
+
|
48
|
+
address _lpt = IGauge(_rewardPool).TOKEN();
|
49
|
+
require(_lpt == _underlying, "Underlying mismatch");
|
50
|
+
|
51
|
+
setAddress(_HODLVAULT_SLOT, _hodlVault);
|
52
|
+
setAddress(_POTPOOL_SLOT, _potPool);
|
53
|
+
}
|
54
|
+
|
55
|
+
function depositArbCheck() public pure returns(bool) {
|
56
|
+
return true;
|
57
|
+
}
|
58
|
+
|
59
|
+
function _rewardPoolBalance() internal view returns (uint256 balance) {
|
60
|
+
balance = IGauge(rewardPool()).balanceOf(address(this));
|
61
|
+
}
|
62
|
+
|
63
|
+
function _emergencyExitRewardPool() internal {
|
64
|
+
uint256 stakedBalance = _rewardPoolBalance();
|
65
|
+
if (stakedBalance != 0) {
|
66
|
+
_withdrawUnderlyingFromPool(stakedBalance);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
function _withdrawUnderlyingFromPool(uint256 amount) internal {
|
71
|
+
uint256 toWithdraw = Math.min(_rewardPoolBalance(), amount);
|
72
|
+
if (toWithdraw > 0) {
|
73
|
+
IGauge(rewardPool()).withdraw(toWithdraw);
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
function _enterRewardPool() internal {
|
78
|
+
address underlying_ = underlying();
|
79
|
+
address rewardPool_ = rewardPool();
|
80
|
+
uint256 entireBalance = IERC20(underlying_).balanceOf(address(this));
|
81
|
+
IERC20(underlying_).safeApprove(rewardPool_, 0);
|
82
|
+
IERC20(underlying_).safeApprove(rewardPool_, entireBalance);
|
83
|
+
IGauge(rewardPool_).deposit(entireBalance);
|
84
|
+
}
|
85
|
+
|
86
|
+
function _investAllUnderlying() internal onlyNotPausedInvesting {
|
87
|
+
// this check is needed, because most of the SNX reward pools will revert if
|
88
|
+
// you try to stake(0).
|
89
|
+
if(IERC20(underlying()).balanceOf(address(this)) > 0) {
|
90
|
+
_enterRewardPool();
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
/*
|
95
|
+
* In case there are some issues discovered about the pool or underlying asset
|
96
|
+
* Governance can exit the pool properly
|
97
|
+
* The function is only used for emergency to exit the pool
|
98
|
+
*/
|
99
|
+
function emergencyExit() public onlyGovernance {
|
100
|
+
_emergencyExitRewardPool();
|
101
|
+
_setPausedInvesting(true);
|
102
|
+
}
|
103
|
+
|
104
|
+
/*
|
105
|
+
* Resumes the ability to invest into the underlying reward pools
|
106
|
+
*/
|
107
|
+
function continueInvesting() public onlyGovernance {
|
108
|
+
_setPausedInvesting(false);
|
109
|
+
}
|
110
|
+
|
111
|
+
function unsalvagableTokens(address token) public view returns (bool) {
|
112
|
+
return (token == rewardToken() || token == underlying());
|
113
|
+
}
|
114
|
+
|
115
|
+
function _claimReward() internal {
|
116
|
+
IGauge(rewardPool()).getReward();
|
117
|
+
}
|
118
|
+
|
119
|
+
function _liquidateReward() internal {
|
120
|
+
if (!sell()) {
|
121
|
+
// Profits can be disabled for possible simplified and rapid exit
|
122
|
+
emit ProfitsNotCollected(sell(), false);
|
123
|
+
return;
|
124
|
+
}
|
125
|
+
address _rewardToken = rewardToken();
|
126
|
+
|
127
|
+
uint256 rewardBalance = IERC20(_rewardToken).balanceOf(address(this));
|
128
|
+
_notifyProfitInRewardToken(_rewardToken, rewardBalance);
|
129
|
+
uint256 remainingRewardBalance = IERC20(_rewardToken).balanceOf(address(this));
|
130
|
+
|
131
|
+
if (remainingRewardBalance == 0) {
|
132
|
+
return;
|
133
|
+
}
|
134
|
+
|
135
|
+
address _hodlVault = hodlVault();
|
136
|
+
address _target = IVault(_hodlVault).underlying();
|
137
|
+
if (_target != _rewardToken) {
|
138
|
+
address _universalLiquidator = universalLiquidator();
|
139
|
+
IERC20(_rewardToken).safeApprove(_universalLiquidator, 0);
|
140
|
+
IERC20(_rewardToken).safeApprove(_universalLiquidator, remainingRewardBalance);
|
141
|
+
IUniversalLiquidator(_universalLiquidator).swap(_rewardToken, _target, remainingRewardBalance, 1, address(this));
|
142
|
+
}
|
143
|
+
|
144
|
+
uint256 targetBalance = IERC20(_target).balanceOf(address(this));
|
145
|
+
IERC20(_target).safeApprove(_hodlVault, 0);
|
146
|
+
IERC20(_target).safeApprove(_hodlVault, targetBalance);
|
147
|
+
|
148
|
+
IVault(_hodlVault).deposit(targetBalance);
|
149
|
+
|
150
|
+
uint256 fRewardBalance = IERC20(_hodlVault).balanceOf(address(this));
|
151
|
+
IERC20(_hodlVault).safeTransfer(potPool(), fRewardBalance);
|
152
|
+
|
153
|
+
PotPool(potPool()).notifyTargetRewardAmount(_hodlVault, fRewardBalance);
|
154
|
+
}
|
155
|
+
|
156
|
+
/*
|
157
|
+
* Withdraws all the asset to the vault
|
158
|
+
*/
|
159
|
+
function withdrawAllToVault() public restricted {
|
160
|
+
_withdrawUnderlyingFromPool(_rewardPoolBalance());
|
161
|
+
_claimReward();
|
162
|
+
_liquidateReward();
|
163
|
+
address underlying_ = underlying();
|
164
|
+
IERC20(underlying_).safeTransfer(vault(), IERC20(underlying_).balanceOf(address(this)));
|
165
|
+
}
|
166
|
+
|
167
|
+
/*
|
168
|
+
* Withdraws all the asset to the vault
|
169
|
+
*/
|
170
|
+
function withdrawToVault(uint256 _amount) public restricted {
|
171
|
+
// Typically there wouldn't be any amount here
|
172
|
+
// however, it is possible because of the emergencyExit
|
173
|
+
address underlying_ = underlying();
|
174
|
+
uint256 entireBalance = IERC20(underlying_).balanceOf(address(this));
|
175
|
+
|
176
|
+
if(_amount > entireBalance){
|
177
|
+
// While we have the check above, we still using SafeMath below
|
178
|
+
// for the peace of mind (in case something gets changed in between)
|
179
|
+
uint256 needToWithdraw = _amount.sub(entireBalance);
|
180
|
+
uint256 toWithdraw = Math.min(_rewardPoolBalance(), needToWithdraw);
|
181
|
+
_withdrawUnderlyingFromPool(toWithdraw);
|
182
|
+
}
|
183
|
+
IERC20(underlying_).safeTransfer(vault(), _amount);
|
184
|
+
}
|
185
|
+
|
186
|
+
/*
|
187
|
+
* Note that we currently do not have a mechanism here to include the
|
188
|
+
* amount of reward that is accrued.
|
189
|
+
*/
|
190
|
+
function investedUnderlyingBalance() external view returns (uint256) {
|
191
|
+
if (rewardPool() == address(0)) {
|
192
|
+
return IERC20(underlying()).balanceOf(address(this));
|
193
|
+
}
|
194
|
+
// Adding the amount locked in the reward pool and the amount that is somehow in this contract
|
195
|
+
// both are in the units of "underlying"
|
196
|
+
// The second part is needed because there is the emergency exit mechanism
|
197
|
+
// which would break the assumption that all the funds are always inside of the reward pool
|
198
|
+
return _rewardPoolBalance().add(IERC20(underlying()).balanceOf(address(this)));
|
199
|
+
}
|
200
|
+
|
201
|
+
/*
|
202
|
+
* Governance or Controller can claim coins that are somehow transferred into the contract
|
203
|
+
* Note that they cannot come in take away coins that are used and defined in the strategy itself
|
204
|
+
*/
|
205
|
+
function salvage(address recipient, address token, uint256 amount) external onlyControllerOrGovernance {
|
206
|
+
// To make sure that governance cannot come in and take away the coins
|
207
|
+
require(!unsalvagableTokens(token), "token is defined as not salvagable");
|
208
|
+
IERC20(token).safeTransfer(recipient, amount);
|
209
|
+
}
|
210
|
+
|
211
|
+
/*
|
212
|
+
* Get the reward, sell it in exchange for underlying, invest what you got.
|
213
|
+
* It's not much, but it's honest work.
|
214
|
+
*
|
215
|
+
* Note that although `onlyNotPausedInvesting` is not added here,
|
216
|
+
* calling `investAllUnderlying()` affectively blocks the usage of `doHardWork`
|
217
|
+
* when the investing is being paused by governance.
|
218
|
+
*/
|
219
|
+
function doHardWork() external onlyNotPausedInvesting restricted {
|
220
|
+
_claimReward();
|
221
|
+
_liquidateReward();
|
222
|
+
_investAllUnderlying();
|
223
|
+
}
|
224
|
+
|
225
|
+
/**
|
226
|
+
* Can completely disable claiming UNI rewards and selling. Good for emergency withdraw in the
|
227
|
+
* simplest possible way.
|
228
|
+
*/
|
229
|
+
function setSell(bool s) public onlyGovernance {
|
230
|
+
_setSell(s);
|
231
|
+
}
|
232
|
+
|
233
|
+
function setHodlVault(address _value) public onlyGovernance {
|
234
|
+
require(hodlVault() == address(0), "Hodl vault already set");
|
235
|
+
setAddress(_HODLVAULT_SLOT, _value);
|
236
|
+
}
|
237
|
+
|
238
|
+
function hodlVault() public view returns (address) {
|
239
|
+
return getAddress(_HODLVAULT_SLOT);
|
240
|
+
}
|
241
|
+
|
242
|
+
function setPotPool(address _value) public onlyGovernance {
|
243
|
+
require(potPool() == address(0), "PotPool already set");
|
244
|
+
setAddress(_POTPOOL_SLOT, _value);
|
245
|
+
}
|
246
|
+
|
247
|
+
function potPool() public view returns (address) {
|
248
|
+
return getAddress(_POTPOOL_SLOT);
|
249
|
+
}
|
250
|
+
|
251
|
+
function finalizeUpgrade() external onlyGovernance {
|
252
|
+
_finalizeUpgrade();
|
253
|
+
}
|
254
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./PearlHodlStrategy.sol";
|
5
|
+
|
6
|
+
contract PearlHodlStrategyMainnet_CVR_PEARL is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x700D6E1167472bDc312D9cBBdc7c58C7f4F45120);
|
15
|
+
address gauge = address(0xe4A9ABD56c4c42807e70909Df5853347d20274cE);
|
16
|
+
address pearl = address(0x7238390d5f6F64e67c3211C343A410E2A3DEc142);
|
17
|
+
PearlHodlStrategy.initializeBaseStrategy(
|
18
|
+
_storage,
|
19
|
+
underlying,
|
20
|
+
_vault,
|
21
|
+
gauge,
|
22
|
+
pearl,
|
23
|
+
address(0xCB2f2895208c36F38c9B13aB0C9e49Ad69B14e9d), //hodlVault
|
24
|
+
address(0) //potPool
|
25
|
+
);
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./PearlHodlStrategy.sol";
|
5
|
+
|
6
|
+
contract PearlHodlStrategyMainnet_DAI_USDR is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0xBD02973b441Aa83c8EecEA158b98B5984bb1036E);
|
15
|
+
address gauge = address(0x85Fa2331040933A02b154579fAbE6A6a5A765279);
|
16
|
+
address pearl = address(0x7238390d5f6F64e67c3211C343A410E2A3DEc142);
|
17
|
+
PearlHodlStrategy.initializeBaseStrategy(
|
18
|
+
_storage,
|
19
|
+
underlying,
|
20
|
+
_vault,
|
21
|
+
gauge,
|
22
|
+
pearl,
|
23
|
+
address(0xCB2f2895208c36F38c9B13aB0C9e49Ad69B14e9d), //hodlVault
|
24
|
+
address(0) //potPool
|
25
|
+
);
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./PearlHodlStrategy.sol";
|
5
|
+
|
6
|
+
contract PearlHodlStrategyMainnet_ETH_USDR is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x74c64d1976157E7Aaeeed46EF04705F4424b27eC);
|
15
|
+
address gauge = address(0x7D02A8b758791A03319102f81bF61E220F73e43D);
|
16
|
+
address pearl = address(0x7238390d5f6F64e67c3211C343A410E2A3DEc142);
|
17
|
+
PearlHodlStrategy.initializeBaseStrategy(
|
18
|
+
_storage,
|
19
|
+
underlying,
|
20
|
+
_vault,
|
21
|
+
gauge,
|
22
|
+
pearl,
|
23
|
+
address(0xCB2f2895208c36F38c9B13aB0C9e49Ad69B14e9d), //hodlVault
|
24
|
+
address(0) //potPool
|
25
|
+
);
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./PearlHodlStrategy.sol";
|
5
|
+
|
6
|
+
contract PearlHodlStrategyMainnet_MATIC_USDR is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0xB4d852b92148eAA16467295975167e640E1FE57A);
|
15
|
+
address gauge = address(0xdA0AfBeEEBef6dA2F060237D35cab759b99B13B6);
|
16
|
+
address pearl = address(0x7238390d5f6F64e67c3211C343A410E2A3DEc142);
|
17
|
+
PearlHodlStrategy.initializeBaseStrategy(
|
18
|
+
_storage,
|
19
|
+
underlying,
|
20
|
+
_vault,
|
21
|
+
gauge,
|
22
|
+
pearl,
|
23
|
+
address(0xCB2f2895208c36F38c9B13aB0C9e49Ad69B14e9d), //hodlVault
|
24
|
+
address(0) //potPool
|
25
|
+
);
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./PearlHodlStrategy.sol";
|
5
|
+
|
6
|
+
contract PearlHodlStrategyMainnet_PEARL_USDR is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0xf68c20d6C50706f6C6bd8eE184382518C93B368c);
|
15
|
+
address gauge = address(0x79d5Ae0DF5C3A31941c3Afe0021F25e2929E205d);
|
16
|
+
address pearl = address(0x7238390d5f6F64e67c3211C343A410E2A3DEc142);
|
17
|
+
PearlHodlStrategy.initializeBaseStrategy(
|
18
|
+
_storage,
|
19
|
+
underlying,
|
20
|
+
_vault,
|
21
|
+
gauge,
|
22
|
+
pearl,
|
23
|
+
address(0xCB2f2895208c36F38c9B13aB0C9e49Ad69B14e9d), //hodlVault
|
24
|
+
address(0) //potPool
|
25
|
+
);
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./PearlHodlStrategy.sol";
|
5
|
+
|
6
|
+
contract PearlHodlStrategyMainnet_STAR_USDR is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x366dc82D3BFFd482cc405E58bAb3288F2dd32C94);
|
15
|
+
address gauge = address(0xD466c643BF2df284E4E3eF08103bE9DFe3112dfE);
|
16
|
+
address pearl = address(0x7238390d5f6F64e67c3211C343A410E2A3DEc142);
|
17
|
+
PearlHodlStrategy.initializeBaseStrategy(
|
18
|
+
_storage,
|
19
|
+
underlying,
|
20
|
+
_vault,
|
21
|
+
gauge,
|
22
|
+
pearl,
|
23
|
+
address(0xCB2f2895208c36F38c9B13aB0C9e49Ad69B14e9d), //hodlVault
|
24
|
+
address(0) //potPool
|
25
|
+
);
|
26
|
+
}
|
27
|
+
}
|