@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,33 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
import "./IdleFinanceStrategy.sol";
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Adds the mainnet addresses to the PickleStrategy3Pool
|
7
|
+
*/
|
8
|
+
contract IdleStrategyDAIMainnet is IdleFinanceStrategy {
|
9
|
+
|
10
|
+
// token addresses
|
11
|
+
address constant public __dai = address(0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063);
|
12
|
+
address constant public __idleUnderlying= address(0x8a999F5A3546F8243205b2c0eCb0627cC10003ab);
|
13
|
+
address constant public __wmatic = address(0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270);
|
14
|
+
|
15
|
+
constructor(
|
16
|
+
address _storage,
|
17
|
+
address _vault
|
18
|
+
)
|
19
|
+
IdleFinanceStrategy(
|
20
|
+
_storage,
|
21
|
+
__dai,
|
22
|
+
__idleUnderlying,
|
23
|
+
_vault
|
24
|
+
)
|
25
|
+
public {
|
26
|
+
rewardTokens = [__wmatic];
|
27
|
+
reward2WETH[__wmatic] = [__wmatic, weth];
|
28
|
+
WETH2underlying = [weth, __dai];
|
29
|
+
sell[__wmatic] = true;
|
30
|
+
useQuick[__wmatic] = true;
|
31
|
+
useQuick[__dai] = false;
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
import "./IdleFinanceStrategy.sol";
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Adds the mainnet addresses to the PickleStrategy3Pool
|
7
|
+
*/
|
8
|
+
contract IdleStrategyUSDCMainnet is IdleFinanceStrategy {
|
9
|
+
|
10
|
+
// token addresses
|
11
|
+
address constant public __usdc = address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174);
|
12
|
+
address constant public __idleUnderlying= address(0x1ee6470CD75D5686d0b2b90C0305Fa46fb0C89A1);
|
13
|
+
address constant public __wmatic = address(0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270);
|
14
|
+
|
15
|
+
constructor(
|
16
|
+
address _storage,
|
17
|
+
address _vault
|
18
|
+
)
|
19
|
+
IdleFinanceStrategy(
|
20
|
+
_storage,
|
21
|
+
__usdc,
|
22
|
+
__idleUnderlying,
|
23
|
+
_vault
|
24
|
+
)
|
25
|
+
public {
|
26
|
+
rewardTokens = [__wmatic];
|
27
|
+
reward2WETH[__wmatic] = [__wmatic, weth];
|
28
|
+
WETH2underlying = [weth, __usdc];
|
29
|
+
sell[__wmatic] = true;
|
30
|
+
useQuick[__wmatic] = true;
|
31
|
+
useQuick[__usdc] = true;
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
import "./IdleFinanceStrategy.sol";
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Adds the mainnet addresses to the PickleStrategy3Pool
|
7
|
+
*/
|
8
|
+
contract IdleStrategyWETHMainnet is IdleFinanceStrategy {
|
9
|
+
|
10
|
+
// token addresses
|
11
|
+
address constant public __idleUnderlying= address(0xfdA25D931258Df948ffecb66b5518299Df6527C4);
|
12
|
+
address constant public __wmatic = address(0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270);
|
13
|
+
|
14
|
+
constructor(
|
15
|
+
address _storage,
|
16
|
+
address _vault
|
17
|
+
)
|
18
|
+
IdleFinanceStrategy(
|
19
|
+
_storage,
|
20
|
+
weth,
|
21
|
+
__idleUnderlying,
|
22
|
+
_vault
|
23
|
+
)
|
24
|
+
public {
|
25
|
+
rewardTokens = [__wmatic];
|
26
|
+
reward2WETH[__wmatic] = [__wmatic, weth];
|
27
|
+
sell[__wmatic] = true;
|
28
|
+
useQuick[__wmatic] = true;
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
/**
|
2
|
+
* @title: Idle Token interface
|
3
|
+
* @author: Idle Labs Inc., idle.finance
|
4
|
+
*/
|
5
|
+
//SPDX-License-Identifier: Unlicense
|
6
|
+
pragma solidity 0.6.12;
|
7
|
+
|
8
|
+
interface IIdleTokenV3_1 {
|
9
|
+
// view
|
10
|
+
function tokenPrice() external view returns (uint256 price);
|
11
|
+
|
12
|
+
function tokenPriceWithFee(address user) external view returns (uint256 priceWFee);
|
13
|
+
|
14
|
+
function token() external view returns (address);
|
15
|
+
|
16
|
+
function getAPRs() external view returns (address[] memory addresses, uint256[] memory aprs);
|
17
|
+
|
18
|
+
// external
|
19
|
+
// We should save the amount one has deposited to calc interests
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Used to mint IdleTokens, given an underlying amount (eg. DAI).
|
23
|
+
* This method triggers a rebalance of the pools if needed
|
24
|
+
* NOTE: User should 'approve' _amount of tokens before calling mintIdleToken
|
25
|
+
* NOTE 2: this method can be paused
|
26
|
+
*
|
27
|
+
* @param _amount : amount of underlying token to be lended
|
28
|
+
* @param _skipRebalance : flag for skipping rebalance for lower gas price
|
29
|
+
* @param _referral : referral address
|
30
|
+
* @return mintedTokens : amount of IdleTokens minted
|
31
|
+
*/
|
32
|
+
function mintIdleToken(uint256 _amount, bool _skipRebalance, address _referral) external returns (uint256 mintedTokens);
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Here we calc the pool share one can withdraw given the amount of IdleToken they want to burn
|
36
|
+
* This method triggers a rebalance of the pools if needed
|
37
|
+
* NOTE: If the contract is paused or iToken price has decreased one can still redeem but no rebalance happens.
|
38
|
+
* NOTE 2: If iToken price has decresed one should not redeem (but can do it) otherwise he would capitalize the loss.
|
39
|
+
* Ideally one should wait until the black swan event is terminated
|
40
|
+
*
|
41
|
+
* @param _amount : amount of IdleTokens to be burned
|
42
|
+
* @return redeemedTokens : amount of underlying tokens redeemed
|
43
|
+
*/
|
44
|
+
function redeemIdleToken(uint256 _amount) external returns (uint256 redeemedTokens);
|
45
|
+
/**
|
46
|
+
* Here we calc the pool share one can withdraw given the amount of IdleToken they want to burn
|
47
|
+
* and send interest-bearing tokens (eg. cDAI/iDAI) directly to the user.
|
48
|
+
* Underlying (eg. DAI) is not redeemed here.
|
49
|
+
*
|
50
|
+
* @param _amount : amount of IdleTokens to be burned
|
51
|
+
*/
|
52
|
+
function redeemInterestBearingTokens(uint256 _amount) external;
|
53
|
+
|
54
|
+
/**
|
55
|
+
* @return : whether has rebalanced or not
|
56
|
+
*/
|
57
|
+
function rebalance() external returns (bool);
|
58
|
+
}
|
@@ -0,0 +1,351 @@
|
|
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
|
+
|
8
|
+
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
|
9
|
+
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol";
|
10
|
+
|
11
|
+
import "./interface/IElysianFields.sol";
|
12
|
+
|
13
|
+
import "../../base/interface/IVault.sol";
|
14
|
+
import "../../base/interface/kyber/IDMMRouter02.sol";
|
15
|
+
import "../../base/interface/kyber/IDMMPool.sol";
|
16
|
+
import "../../base/interface/kyber/IKyberZap.sol";
|
17
|
+
|
18
|
+
import "../../base/upgradability/BaseUpgradeableStrategy.sol";
|
19
|
+
|
20
|
+
import "../../base/PotPool.sol";
|
21
|
+
|
22
|
+
contract JarvisHodlStrategyV3 is BaseUpgradeableStrategy {
|
23
|
+
|
24
|
+
using SafeMath for uint256;
|
25
|
+
using SafeERC20 for IERC20;
|
26
|
+
|
27
|
+
address public constant kyberRouter = address(0x546C79662E028B661dFB4767664d0273184E4dD1);
|
28
|
+
address public constant kyberZapper = address(0x83D4908c1B4F9Ca423BEE264163BC1d50F251c31);
|
29
|
+
address public constant msig = address(0x39cC360806b385C96969ce9ff26c23476017F652);
|
30
|
+
uint256 internal constant maxUint = uint256(~0);
|
31
|
+
|
32
|
+
// additional storage slots (on top of BaseUpgradeableStrategy ones) are defined here
|
33
|
+
bytes32 internal constant _POOLID_SLOT = 0x3fd729bfa2e28b7806b03a6e014729f59477b530f995be4d51defc9dad94810b;
|
34
|
+
bytes32 internal constant _HODLVAULT_SLOT = 0xc26d330f887c749cb38ae7c37873ff08ac4bba7aec9113c82d48a0cf6cc145f2;
|
35
|
+
bytes32 internal constant _POTPOOL_SLOT = 0x7f4b50847e7d7a4da6a6ea36bfb188c77e9f093697337eb9a876744f926dd014;
|
36
|
+
bytes32 internal constant _REWARD_LP_SLOT = 0x48141e8830aff32be47daedfc211bdc62d1652246e1c94ca6dfd96128ee259d2;
|
37
|
+
bytes32 internal constant _REWARD_LP_TOKEN1_SLOT = 0x39bbed0fce4dadfae510b0ff92e23dc8458ac86daafb72558e64503559b640ed;
|
38
|
+
|
39
|
+
constructor() public BaseUpgradeableStrategy() {
|
40
|
+
assert(_POOLID_SLOT == bytes32(uint256(keccak256("eip1967.strategyStorage.poolId")) - 1));
|
41
|
+
assert(_HODLVAULT_SLOT == bytes32(uint256(keccak256("eip1967.strategyStorage.hodlVault")) - 1));
|
42
|
+
assert(_POTPOOL_SLOT == bytes32(uint256(keccak256("eip1967.strategyStorage.potPool")) - 1));
|
43
|
+
assert(_REWARD_LP_SLOT == bytes32(uint256(keccak256("eip1967.strategyStorage.rewardLp")) - 1));
|
44
|
+
assert(_REWARD_LP_TOKEN1_SLOT == bytes32(uint256(keccak256("eip1967.strategyStorage.rewardLpToken1")) - 1));
|
45
|
+
}
|
46
|
+
|
47
|
+
function initializeBaseStrategy(
|
48
|
+
address __storage,
|
49
|
+
address _underlying,
|
50
|
+
address _vault,
|
51
|
+
address _rewardPool,
|
52
|
+
address _rewardToken,
|
53
|
+
uint256 _poolId,
|
54
|
+
address _rewardLp,
|
55
|
+
address _hodlVault,
|
56
|
+
address _potPool
|
57
|
+
) public initializer {
|
58
|
+
require(_rewardPool != address(0), "reward pool is empty");
|
59
|
+
|
60
|
+
BaseUpgradeableStrategy.initialize(
|
61
|
+
__storage,
|
62
|
+
_underlying,
|
63
|
+
_vault,
|
64
|
+
_rewardPool,
|
65
|
+
_rewardToken,
|
66
|
+
80, // profit sharing numerator
|
67
|
+
1000, // profit sharing denominator
|
68
|
+
true, // sell
|
69
|
+
1e15, // sell floor
|
70
|
+
12 hours // implementation change delay
|
71
|
+
);
|
72
|
+
|
73
|
+
address _lpt;
|
74
|
+
(_lpt,,,) = IElysianFields(_rewardPool).poolInfo(_poolId);
|
75
|
+
require(_lpt == _underlying, "Pool Info does not match underlying");
|
76
|
+
|
77
|
+
_setPoolId(_poolId);
|
78
|
+
setAddress(_HODLVAULT_SLOT, _hodlVault);
|
79
|
+
setAddress(_POTPOOL_SLOT, _potPool);
|
80
|
+
setRewardLp(_rewardLp);
|
81
|
+
}
|
82
|
+
|
83
|
+
/*///////////////////////////////////////////////////////////////
|
84
|
+
STORAGE SETTER AND GETTER
|
85
|
+
//////////////////////////////////////////////////////////////*/
|
86
|
+
|
87
|
+
function setHodlVault(address _value) public onlyGovernance {
|
88
|
+
require(hodlVault() == address(0), "Hodl vault already set");
|
89
|
+
setAddress(_HODLVAULT_SLOT, _value);
|
90
|
+
}
|
91
|
+
|
92
|
+
function hodlVault() public view returns (address) {
|
93
|
+
return getAddress(_HODLVAULT_SLOT);
|
94
|
+
}
|
95
|
+
|
96
|
+
function setPotPool(address _value) public onlyGovernance {
|
97
|
+
require(potPool() == address(0), "PotPool already set");
|
98
|
+
setAddress(_POTPOOL_SLOT, _value);
|
99
|
+
}
|
100
|
+
|
101
|
+
function potPool() public view returns (address) {
|
102
|
+
return getAddress(_POTPOOL_SLOT);
|
103
|
+
}
|
104
|
+
|
105
|
+
function setRewardLp(address _value) internal {
|
106
|
+
address token0 = IDMMPool(_value).token0();
|
107
|
+
address token1 = IDMMPool(_value).token1();
|
108
|
+
require(token0 == rewardToken() || token1 == rewardToken(), "One of the underlying DMM pool token is not equal to the rewardToken");
|
109
|
+
setAddress(_REWARD_LP_SLOT, _value);
|
110
|
+
// select the token that isn't the rewardToken, s.t.
|
111
|
+
address rewardLpToken1 = (token0 == rewardToken()) ? token1 : token0;
|
112
|
+
setAddress(_REWARD_LP_TOKEN1_SLOT, rewardLpToken1);
|
113
|
+
}
|
114
|
+
|
115
|
+
function rewardLp() public view returns (address) {
|
116
|
+
return getAddress(_REWARD_LP_SLOT);
|
117
|
+
}
|
118
|
+
|
119
|
+
function rewardLpToken1() public view returns (address) {
|
120
|
+
return getAddress(_REWARD_LP_TOKEN1_SLOT);
|
121
|
+
}
|
122
|
+
|
123
|
+
// masterchef rewards pool ID
|
124
|
+
function _setPoolId(uint256 _value) internal {
|
125
|
+
setUint256(_POOLID_SLOT, _value);
|
126
|
+
}
|
127
|
+
|
128
|
+
function poolId() public view returns (uint256) {
|
129
|
+
return getUint256(_POOLID_SLOT);
|
130
|
+
}
|
131
|
+
|
132
|
+
function updateRewardPool(
|
133
|
+
address _newRewardPool,
|
134
|
+
address _newRewardToken,
|
135
|
+
address _newRewardLP,
|
136
|
+
uint256 _newPoolId,
|
137
|
+
address _newHodlVault
|
138
|
+
) public onlyGovernance {
|
139
|
+
address _lpt;
|
140
|
+
(_lpt,,,) = IElysianFields(_newRewardPool).poolInfo(_newPoolId);
|
141
|
+
require(_lpt == underlying(), "Pool Info does not match underlying");
|
142
|
+
|
143
|
+
_exitRewardPool();
|
144
|
+
|
145
|
+
_setRewardToken(_newRewardToken);
|
146
|
+
_setRewardPool(_newRewardPool);
|
147
|
+
_setPoolId(_newPoolId);
|
148
|
+
|
149
|
+
setRewardLp(_newRewardLP);
|
150
|
+
setAddress(_HODLVAULT_SLOT, _newHodlVault);
|
151
|
+
|
152
|
+
investAllUnderlying();
|
153
|
+
}
|
154
|
+
|
155
|
+
/*///////////////////////////////////////////////////////////////
|
156
|
+
PROXY - FINALIZE UPGRADE
|
157
|
+
//////////////////////////////////////////////////////////////*/
|
158
|
+
|
159
|
+
function finalizeUpgrade() external onlyGovernance {
|
160
|
+
_finalizeUpgrade();
|
161
|
+
}
|
162
|
+
|
163
|
+
/*///////////////////////////////////////////////////////////////
|
164
|
+
INTERNAL HELPER FUNCTIONS
|
165
|
+
//////////////////////////////////////////////////////////////*/
|
166
|
+
|
167
|
+
function _rewardPoolBalance() internal view returns (uint256 bal) {
|
168
|
+
(bal,) = IElysianFields(rewardPool()).userInfo(poolId(), address(this));
|
169
|
+
}
|
170
|
+
|
171
|
+
function _exitRewardPool() internal {
|
172
|
+
uint256 bal = _rewardPoolBalance();
|
173
|
+
if (bal != 0) {
|
174
|
+
IElysianFields(rewardPool()).withdraw(poolId(), bal);
|
175
|
+
}
|
176
|
+
}
|
177
|
+
|
178
|
+
function _emergencyExitRewardPool() internal {
|
179
|
+
uint256 bal = _rewardPoolBalance();
|
180
|
+
if (bal != 0) {
|
181
|
+
IElysianFields(rewardPool()).emergencyWithdraw(poolId());
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
function _enterRewardPool() internal {
|
186
|
+
address underlying_ = underlying();
|
187
|
+
address rewardPool_ = rewardPool();
|
188
|
+
uint256 entireBalance = IERC20(underlying_).balanceOf(address(this));
|
189
|
+
|
190
|
+
IERC20(underlying_).safeApprove(rewardPool_, 0);
|
191
|
+
IERC20(underlying_).safeApprove(rewardPool_, entireBalance);
|
192
|
+
|
193
|
+
IElysianFields(rewardPool_).deposit(poolId(), entireBalance);
|
194
|
+
}
|
195
|
+
|
196
|
+
// We Hodl all the rewards
|
197
|
+
function _hodlAndNotify() internal {
|
198
|
+
address rewardToken_ = rewardToken();
|
199
|
+
uint256 rewardBalance = IERC20(rewardToken_).balanceOf(address(this));
|
200
|
+
if (rewardBalance == 0) {
|
201
|
+
return;
|
202
|
+
}
|
203
|
+
uint256 feeAmount = rewardBalance.mul(profitSharingNumerator()).div(profitSharingDenominator());
|
204
|
+
IERC20(rewardToken_).safeTransfer(msig, feeAmount);
|
205
|
+
uint256 remainingRewardBalance = IERC20(rewardToken_).balanceOf(address(this));
|
206
|
+
|
207
|
+
if (remainingRewardBalance == 0) {
|
208
|
+
return;
|
209
|
+
}
|
210
|
+
|
211
|
+
_rewardToLp();
|
212
|
+
|
213
|
+
address holdVault = hodlVault();
|
214
|
+
address rewardLp_ = rewardLp();
|
215
|
+
uint256 rewardLpBalance = IERC20(rewardLp_).balanceOf(address(this));
|
216
|
+
|
217
|
+
IERC20(rewardLp_).safeApprove(holdVault, 0);
|
218
|
+
IERC20(rewardLp_).safeApprove(holdVault, rewardLpBalance);
|
219
|
+
|
220
|
+
IVault(holdVault).deposit(rewardLpBalance);
|
221
|
+
|
222
|
+
uint256 fRewardBalance = IERC20(holdVault).balanceOf(address(this));
|
223
|
+
IERC20(holdVault).safeTransfer(potPool(), fRewardBalance);
|
224
|
+
|
225
|
+
PotPool(potPool()).notifyTargetRewardAmount(holdVault, fRewardBalance);
|
226
|
+
}
|
227
|
+
|
228
|
+
function _rewardToLp() internal {
|
229
|
+
address rewardToken_ = rewardToken();
|
230
|
+
uint256 rewardBalance = IERC20(rewardToken_).balanceOf(address(this));
|
231
|
+
|
232
|
+
IERC20(rewardToken_).safeApprove(kyberZapper, 0);
|
233
|
+
IERC20(rewardToken_).safeApprove(kyberZapper, rewardBalance);
|
234
|
+
|
235
|
+
IKyberZap(kyberZapper).zapIn({tokenIn: rewardToken_, tokenOut: rewardLpToken1(), userIn: rewardBalance, pool: rewardLp(), to: address(this), minLpQty: 1, deadline: block.timestamp});
|
236
|
+
}
|
237
|
+
|
238
|
+
/*
|
239
|
+
* Stakes everything the strategy holds into the reward pool
|
240
|
+
*/
|
241
|
+
function investAllUnderlying() internal onlyNotPausedInvesting {
|
242
|
+
// this check is needed, because most of the SNX reward pools will revert if
|
243
|
+
// you try to stake(0).
|
244
|
+
if(IERC20(underlying()).balanceOf(address(this)) > 0) {
|
245
|
+
_enterRewardPool();
|
246
|
+
}
|
247
|
+
}
|
248
|
+
|
249
|
+
/*///////////////////////////////////////////////////////////////
|
250
|
+
PUBLIC EMERGENCY FUNCTIONS
|
251
|
+
//////////////////////////////////////////////////////////////*/
|
252
|
+
|
253
|
+
/*
|
254
|
+
* In case there are some issues discovered about the pool or underlying asset
|
255
|
+
* Governance can exit the pool properly
|
256
|
+
* The function is only used for emergency to exit the pool
|
257
|
+
*/
|
258
|
+
function emergencyExit() public onlyGovernance {
|
259
|
+
_emergencyExitRewardPool();
|
260
|
+
_setPausedInvesting(true);
|
261
|
+
}
|
262
|
+
|
263
|
+
/*
|
264
|
+
* Resumes the ability to invest into the underlying reward pools
|
265
|
+
*/
|
266
|
+
function continueInvesting() public onlyGovernance {
|
267
|
+
_setPausedInvesting(false);
|
268
|
+
}
|
269
|
+
|
270
|
+
/*///////////////////////////////////////////////////////////////
|
271
|
+
ISTRATEGY FUNCTION IMPLEMENTATIONS
|
272
|
+
//////////////////////////////////////////////////////////////*/
|
273
|
+
|
274
|
+
/*
|
275
|
+
* Withdraws all the asset to the vault
|
276
|
+
*/
|
277
|
+
function withdrawAllToVault() public restricted {
|
278
|
+
_exitRewardPool();
|
279
|
+
_hodlAndNotify();
|
280
|
+
address underlying_ = underlying();
|
281
|
+
IERC20(underlying_).safeTransfer(vault(), IERC20(underlying_).balanceOf(address(this)));
|
282
|
+
}
|
283
|
+
|
284
|
+
/*
|
285
|
+
* Withdraws all the asset to the vault
|
286
|
+
*/
|
287
|
+
function withdrawToVault(uint256 _amount) public restricted {
|
288
|
+
// Typically there wouldn't be any amount here
|
289
|
+
// however, it is possible because of the emergencyExit
|
290
|
+
address underlying_ = underlying();
|
291
|
+
uint256 entireBalance = IERC20(underlying_).balanceOf(address(this));
|
292
|
+
|
293
|
+
if(_amount > entireBalance){
|
294
|
+
// While we have the check above, we still using SafeMath below
|
295
|
+
// for the peace of mind (in case something gets changed in between)
|
296
|
+
uint256 needToWithdraw = _amount.sub(entireBalance);
|
297
|
+
uint256 toWithdraw = Math.min(_rewardPoolBalance(), needToWithdraw);
|
298
|
+
IElysianFields(rewardPool()).withdraw(poolId(), toWithdraw);
|
299
|
+
}
|
300
|
+
|
301
|
+
IERC20(underlying_).safeTransfer(vault(), _amount);
|
302
|
+
}
|
303
|
+
|
304
|
+
/*
|
305
|
+
* Note that we currently do not have a mechanism here to include the
|
306
|
+
* amount of reward that is accrued.
|
307
|
+
*/
|
308
|
+
function investedUnderlyingBalance() external view returns (uint256) {
|
309
|
+
if (rewardPool() == address(0)) {
|
310
|
+
return IERC20(underlying()).balanceOf(address(this));
|
311
|
+
}
|
312
|
+
// Adding the amount locked in the reward pool and the amount that is somehow in this contract
|
313
|
+
// both are in the units of "underlying"
|
314
|
+
// The second part is needed because there is the emergency exit mechanism
|
315
|
+
// which would break the assumption that all the funds are always inside of the reward pool
|
316
|
+
return _rewardPoolBalance().add(IERC20(underlying()).balanceOf(address(this)));
|
317
|
+
}
|
318
|
+
|
319
|
+
/*
|
320
|
+
* Governance or Controller can claim coins that are somehow transferred into the contract
|
321
|
+
* Note that they cannot come in take away coins that are used and defined in the strategy itself
|
322
|
+
*/
|
323
|
+
function salvage(address _recipient, address _token, uint256 _amount) external onlyControllerOrGovernance {
|
324
|
+
// To make sure that governance cannot come in and take away the coins
|
325
|
+
require(!unsalvagableTokens(_token), "token is defined as not salvagable");
|
326
|
+
IERC20(_token).safeTransfer(_recipient, _amount);
|
327
|
+
}
|
328
|
+
|
329
|
+
function unsalvagableTokens(address _token) public view returns (bool) {
|
330
|
+
return (_token == rewardToken() || _token == underlying());
|
331
|
+
}
|
332
|
+
|
333
|
+
/*
|
334
|
+
* Get the reward, sell it in exchange for underlying, invest what you got.
|
335
|
+
* It's not much, but it's honest work.
|
336
|
+
*
|
337
|
+
* Note that although `onlyNotPausedInvesting` is not added here,
|
338
|
+
* calling `investAllUnderlying()` affectively blocks the usage of `doHardWork`
|
339
|
+
* when the investing is being paused by governance.
|
340
|
+
*/
|
341
|
+
function doHardWork() external onlyNotPausedInvesting restricted {
|
342
|
+
IElysianFields(rewardPool()).withdraw(poolId(), 0);
|
343
|
+
_hodlAndNotify();
|
344
|
+
investAllUnderlying();
|
345
|
+
}
|
346
|
+
|
347
|
+
function depositArbCheck() public pure returns(bool) {
|
348
|
+
return true;
|
349
|
+
}
|
350
|
+
|
351
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./JarvisHodlStrategyV3.sol";
|
5
|
+
|
6
|
+
contract JarvisHodlStrategyV3Mainnet_2CAD is JarvisHodlStrategyV3 {
|
7
|
+
|
8
|
+
address public cad2_unused; // just a differentiator for the bytecode
|
9
|
+
|
10
|
+
constructor() public {}
|
11
|
+
|
12
|
+
function initializeStrategy(
|
13
|
+
address __storage,
|
14
|
+
address _vault
|
15
|
+
) public initializer {
|
16
|
+
address underlying_ = address(0xA69b0D5c0C401BBA2d5162138613B5E38584F63F);
|
17
|
+
address rewardLp_ = address(0x32d8513eDDa5AEf930080F15270984A043933A95);
|
18
|
+
address rewardPool_ = address(0x16Ef7a2F8156819bAE95CFcE0CA712D01498b665);
|
19
|
+
address rewardToken_ = address(0xF65fb31ad1ccb2E7A6Ec3B34BEA4c81b68af6695);
|
20
|
+
address hodlVault_ = address(0x7f7136760ce6235b0889704B01bE23E6E8220e7B);
|
21
|
+
|
22
|
+
JarvisHodlStrategyV3.initializeBaseStrategy({
|
23
|
+
__storage: __storage,
|
24
|
+
_underlying: underlying_,
|
25
|
+
_vault: _vault,
|
26
|
+
_rewardPool: rewardPool_,
|
27
|
+
_rewardToken: rewardToken_,
|
28
|
+
_poolId: 0,
|
29
|
+
_rewardLp: rewardLp_,
|
30
|
+
_hodlVault: hodlVault_,
|
31
|
+
_potPool: address(0x0000000000000000000000000000000000000000) // manually set it later
|
32
|
+
});
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./JarvisHodlStrategyV3.sol";
|
5
|
+
|
6
|
+
contract JarvisHodlStrategyV3Mainnet_2EUR is JarvisHodlStrategyV3 {
|
7
|
+
|
8
|
+
address public eur2_unused; // just a differentiator for the bytecode
|
9
|
+
|
10
|
+
constructor() public {}
|
11
|
+
|
12
|
+
function initializeStrategy(
|
13
|
+
address __storage,
|
14
|
+
address _vault
|
15
|
+
) public initializer {
|
16
|
+
address underlying_ = address(0x2fFbCE9099cBed86984286A54e5932414aF4B717);
|
17
|
+
address rewardLp_ = address(0x7d85cCf1B7cbAAB68c580E14fA8C92E32704404f);
|
18
|
+
address rewardPool_ = address(0x834579150Cc521e0afAB15568930e3BEc67B865A);
|
19
|
+
address rewardToken_ = address(0xEEfF5d27e40A5239f6F28d4b0fbE20acf6432717);
|
20
|
+
address hodlVault_ = address(0x48795326FBa34e07076038cC8f03f88a80E71214);
|
21
|
+
|
22
|
+
JarvisHodlStrategyV3.initializeBaseStrategy({
|
23
|
+
__storage: __storage,
|
24
|
+
_underlying: underlying_,
|
25
|
+
_vault: _vault,
|
26
|
+
_rewardPool: rewardPool_,
|
27
|
+
_rewardToken: rewardToken_,
|
28
|
+
_poolId: 0,
|
29
|
+
_rewardLp: rewardLp_,
|
30
|
+
_hodlVault: hodlVault_,
|
31
|
+
_potPool: address(0x0000000000000000000000000000000000000000) // manually set it later
|
32
|
+
});
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./JarvisHodlStrategyV3.sol";
|
5
|
+
|
6
|
+
contract JarvisHodlStrategyV3Mainnet_2EUR_EURT is JarvisHodlStrategyV3 {
|
7
|
+
|
8
|
+
address public eur2_unused; // just a differentiator for the bytecode
|
9
|
+
|
10
|
+
constructor() public {}
|
11
|
+
|
12
|
+
function initializeStrategy(
|
13
|
+
address __storage,
|
14
|
+
address _vault
|
15
|
+
) public initializer {
|
16
|
+
address underlying_ = address(0x2C3cc8e698890271c8141be9F6fD6243d56B39f1);
|
17
|
+
address rewardLp_ = address(0x2623D9a6cceb732f9e86125e107A18e7832B27e5);
|
18
|
+
address rewardPool_ = address(0x2FAe83B3916e1467C970C113399ee91B31412bCD);
|
19
|
+
address rewardToken_ = address(0xcE0248f30d565555B793f42e46E58879F2cDCCa4);
|
20
|
+
address hodlVault_ = address(0x587155256938F081D6e48829d45849BD856Fd969);
|
21
|
+
|
22
|
+
JarvisHodlStrategyV3.initializeBaseStrategy({
|
23
|
+
__storage: __storage,
|
24
|
+
_underlying: underlying_,
|
25
|
+
_vault: _vault,
|
26
|
+
_rewardPool: rewardPool_,
|
27
|
+
_rewardToken: rewardToken_,
|
28
|
+
_poolId: 4,
|
29
|
+
_rewardLp: rewardLp_,
|
30
|
+
_hodlVault: hodlVault_,
|
31
|
+
_potPool: address(0x0000000000000000000000000000000000000000) // manually set it later
|
32
|
+
});
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./JarvisHodlStrategyV3.sol";
|
5
|
+
|
6
|
+
contract JarvisHodlStrategyV3Mainnet_2EUR_EURe is JarvisHodlStrategyV3 {
|
7
|
+
|
8
|
+
address public eur2_unused; // just a differentiator for the bytecode
|
9
|
+
|
10
|
+
constructor() public {}
|
11
|
+
|
12
|
+
function initializeStrategy(
|
13
|
+
address __storage,
|
14
|
+
address _vault
|
15
|
+
) public initializer {
|
16
|
+
address underlying_ = address(0x2F3E9CA3bFf85B91D9fe6a9f3e8F9B1A6a4c3cF4);
|
17
|
+
address rewardLp_ = address(0x68Fd822a2Bda3dB31fFfA68089696ea4e55A9D36);
|
18
|
+
address rewardPool_ = address(0xa0044b58b1de085845aeA7BD3256a00EAb4145a2);
|
19
|
+
address rewardToken_ = address(0x5eF12a086B8A61C0f11a72b36b5EF451FA17f1f1);
|
20
|
+
address hodlVault_ = address(0xE17e6EfbD0064992D1E4e9a4641f30e40be208a0);
|
21
|
+
|
22
|
+
JarvisHodlStrategyV3.initializeBaseStrategy({
|
23
|
+
__storage: __storage,
|
24
|
+
_underlying: underlying_,
|
25
|
+
_vault: _vault,
|
26
|
+
_rewardPool: rewardPool_,
|
27
|
+
_rewardToken: rewardToken_,
|
28
|
+
_poolId: 3,
|
29
|
+
_rewardLp: rewardLp_,
|
30
|
+
_hodlVault: hodlVault_,
|
31
|
+
_potPool: address(0x0000000000000000000000000000000000000000) // manually set it later
|
32
|
+
});
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./JarvisHodlStrategyV3.sol";
|
5
|
+
|
6
|
+
contract JarvisHodlStrategyV3Mainnet_2EUR_PAR is JarvisHodlStrategyV3 {
|
7
|
+
|
8
|
+
address public eur2_unused; // just a differentiator for the bytecode
|
9
|
+
|
10
|
+
constructor() public {}
|
11
|
+
|
12
|
+
function initializeStrategy(
|
13
|
+
address __storage,
|
14
|
+
address _vault
|
15
|
+
) public initializer {
|
16
|
+
address underlying_ = address(0x0f110c55EfE62c16D553A3d3464B77e1853d0e97);
|
17
|
+
address rewardLp_ = address(0x181650dde0A3a457F9e82B00052184AC3FEAAdF3);
|
18
|
+
address rewardPool_ = address(0x2BC39d179FAfC32B7796DDA3b936e491C87D245b);
|
19
|
+
address rewardToken_ = address(0xAFC780bb79E308990c7387AB8338160bA8071B67);
|
20
|
+
address hodlVault_ = address(0x173ce98897F7c846d7282555B52362B4233d2196);
|
21
|
+
|
22
|
+
JarvisHodlStrategyV3.initializeBaseStrategy({
|
23
|
+
__storage: __storage,
|
24
|
+
_underlying: underlying_,
|
25
|
+
_vault: _vault,
|
26
|
+
_rewardPool: rewardPool_,
|
27
|
+
_rewardToken: rewardToken_,
|
28
|
+
_poolId: 0,
|
29
|
+
_rewardLp: rewardLp_,
|
30
|
+
_hodlVault: hodlVault_,
|
31
|
+
_potPool: address(0x0000000000000000000000000000000000000000) // manually set it later
|
32
|
+
});
|
33
|
+
}
|
34
|
+
}
|