@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,27 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./PearlHodlStrategy.sol";
|
5
|
+
|
6
|
+
contract PearlHodlStrategyMainnet_TNGBL_USDR is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x0Edc235693C20943780b76D79DD763236E94C751);
|
15
|
+
address gauge = address(0xdaeF32cA8D699015fcFB2884F6902fFCebE51c5b);
|
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_USDC_USDR is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0xD17cb0f162f133e339C0BbFc18c36c357E681D6b);
|
15
|
+
address gauge = address(0x97Bd59A8202F8263C2eC39cf6cF6B438D0B45876);
|
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_USDT_USDR is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x3f69055F203861abFd5D986dC81a2eFa7c915b0c);
|
15
|
+
address gauge = address(0x89EF6e539F2Ac4eE817202f445aA69A3769A727C);
|
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_WBTC_USDR is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0xb95E1C22dd965FafE926b2A793e9D6757b6613F4);
|
15
|
+
address gauge = address(0x39976f6328ebA2a3C860b7DE5cF2c1bB41581FB8);
|
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_wUSDR_USDR is PearlHodlStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x8711a1a52c34EDe8E61eF40496ab2618a8F6EA4B);
|
15
|
+
address gauge = address(0x03Fa7A2628D63985bDFe07B95d4026663ED96065);
|
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,400 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
|
3
|
+
pragma solidity 0.6.12;
|
4
|
+
|
5
|
+
import "@openzeppelin/contracts/math/Math.sol";
|
6
|
+
import "@openzeppelin/contracts/math/SafeMath.sol";
|
7
|
+
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
|
8
|
+
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";
|
9
|
+
import "../../base/upgradability/BaseUpgradeableStrategy.sol";
|
10
|
+
import "../../base/interface/quickswap/IMasterChef.sol";
|
11
|
+
import "../../base/interface/gamma/IHypervisor.sol";
|
12
|
+
import "../../base/interface/gamma/IUniProxy.sol";
|
13
|
+
import "../../base/interface/quickswap/IDragonLair.sol";
|
14
|
+
import "../../base/interface/gamma/IClearing.sol";
|
15
|
+
|
16
|
+
contract QuickGammaStrategy is BaseUpgradeableStrategy {
|
17
|
+
|
18
|
+
using SafeMath for uint256;
|
19
|
+
using SafeERC20 for IERC20;
|
20
|
+
|
21
|
+
address public constant quickRouter = address(0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff);
|
22
|
+
address public constant sushiRouter = address(0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506);
|
23
|
+
address public constant _uniProxy = address(0xA42d55074869491D60Ac05490376B74cF19B00e6);
|
24
|
+
address public constant WMATIC = address(0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270);
|
25
|
+
address public constant dQuick = address(0x958d208Cdf087843e9AD98d23823d32E17d723A1);
|
26
|
+
address public constant quick = address(0xB5C064F955D8e7F38fE0460C556a72987494eE17);
|
27
|
+
|
28
|
+
// additional storage slots (on top of BaseUpgradeableStrategy ones) are defined here
|
29
|
+
bytes32 internal constant _POOLID_SLOT = 0x3fd729bfa2e28b7806b03a6e014729f59477b530f995be4d51defc9dad94810b;
|
30
|
+
bytes32 internal constant _UNIPROXY_SLOT = 0x09ff9720152edb4fad4ed05a0b77258f0fce17715f9397342eb08c8d7f965234;
|
31
|
+
|
32
|
+
// this would be reset on each upgrade
|
33
|
+
mapping (address => mapping (address => address[])) public swapRoutes;
|
34
|
+
mapping (address => mapping (address => address)) public routers;
|
35
|
+
address[] public rewardTokens;
|
36
|
+
|
37
|
+
constructor() public BaseUpgradeableStrategy() {
|
38
|
+
assert(_POOLID_SLOT == bytes32(uint256(keccak256("eip1967.strategyStorage.poolId")) - 1));
|
39
|
+
assert(_UNIPROXY_SLOT == bytes32(uint256(keccak256("eip1967.strategyStorage.uniProxy")) - 1));
|
40
|
+
}
|
41
|
+
|
42
|
+
function initializeBaseStrategy(
|
43
|
+
address _storage,
|
44
|
+
address _underlying,
|
45
|
+
address _vault,
|
46
|
+
address _rewardPool,
|
47
|
+
uint256 _poolID
|
48
|
+
) public initializer {
|
49
|
+
|
50
|
+
BaseUpgradeableStrategy.initialize(
|
51
|
+
_storage,
|
52
|
+
_underlying,
|
53
|
+
_vault,
|
54
|
+
_rewardPool,
|
55
|
+
WMATIC,
|
56
|
+
80, // profit sharing numerator
|
57
|
+
1000, // profit sharing denominator
|
58
|
+
true, // sell
|
59
|
+
1e18, // sell floor
|
60
|
+
12 hours // implementation change delay
|
61
|
+
);
|
62
|
+
|
63
|
+
address _lpt = IMasterChef(rewardPool()).lpToken(_poolID);
|
64
|
+
require(_lpt == underlying(), "Pool Info does not match underlying");
|
65
|
+
_setPoolId(_poolID);
|
66
|
+
setAddress(_UNIPROXY_SLOT, _uniProxy);
|
67
|
+
}
|
68
|
+
|
69
|
+
function depositArbCheck() public pure returns(bool) {
|
70
|
+
return true;
|
71
|
+
}
|
72
|
+
|
73
|
+
function rewardPoolBalance() internal view returns (uint256 bal) {
|
74
|
+
(bal,) = IMasterChef(rewardPool()).userInfo(poolId(), address(this));
|
75
|
+
}
|
76
|
+
|
77
|
+
function exitRewardPool() internal {
|
78
|
+
uint256 bal = rewardPoolBalance();
|
79
|
+
if (bal != 0) {
|
80
|
+
IMasterChef(rewardPool()).withdraw(poolId(), bal, address(this));
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
function emergencyExitRewardPool() internal {
|
85
|
+
uint256 bal = rewardPoolBalance();
|
86
|
+
if (bal != 0) {
|
87
|
+
IMasterChef(rewardPool()).emergencyWithdraw(poolId(), address(this));
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
function unsalvagableTokens(address token) public view returns (bool) {
|
92
|
+
return (token == rewardToken() || token == underlying());
|
93
|
+
}
|
94
|
+
|
95
|
+
function enterRewardPool() internal {
|
96
|
+
address _underlying = underlying();
|
97
|
+
address _rewardPool = rewardPool();
|
98
|
+
uint256 entireBalance = IERC20(_underlying).balanceOf(address(this));
|
99
|
+
IERC20(_underlying).safeApprove(_rewardPool, 0);
|
100
|
+
IERC20(_underlying).safeApprove(_rewardPool, entireBalance);
|
101
|
+
IMasterChef(_rewardPool).deposit(poolId(), entireBalance, address(this));
|
102
|
+
}
|
103
|
+
|
104
|
+
/*
|
105
|
+
* In case there are some issues discovered about the pool or underlying asset
|
106
|
+
* Governance can exit the pool properly
|
107
|
+
* The function is only used for emergency to exit the pool
|
108
|
+
*/
|
109
|
+
function emergencyExit() public onlyGovernance {
|
110
|
+
emergencyExitRewardPool();
|
111
|
+
_setPausedInvesting(true);
|
112
|
+
}
|
113
|
+
|
114
|
+
/*
|
115
|
+
* Resumes the ability to invest into the underlying reward pools
|
116
|
+
*/
|
117
|
+
function continueInvesting() public onlyGovernance {
|
118
|
+
_setPausedInvesting(false);
|
119
|
+
}
|
120
|
+
|
121
|
+
function setDepositLiquidationPath(address [] memory _route, address _router) public onlyGovernance {
|
122
|
+
address tokenIn = _route[0];
|
123
|
+
address tokenOut = _route[_route.length-1];
|
124
|
+
require(tokenIn == WMATIC, "Path should start with WMATIC");
|
125
|
+
swapRoutes[tokenIn][tokenOut] = _route;
|
126
|
+
routers[tokenIn][tokenOut] = _router;
|
127
|
+
}
|
128
|
+
|
129
|
+
function setRewardLiquidationPath(address [] memory _route, address _router) public onlyGovernance {
|
130
|
+
address tokenIn = _route[0];
|
131
|
+
address tokenOut = _route[_route.length-1];
|
132
|
+
require(tokenOut == WMATIC, "Path should end with WMATIC");
|
133
|
+
bool isReward = false;
|
134
|
+
for(uint256 i = 0; i < rewardTokens.length; i++){
|
135
|
+
if (tokenIn == rewardTokens[i]) {
|
136
|
+
isReward = true;
|
137
|
+
}
|
138
|
+
}
|
139
|
+
require(isReward, "Path should start with a rewardToken");
|
140
|
+
swapRoutes[tokenIn][tokenOut] = _route;
|
141
|
+
routers[tokenIn][tokenOut] = _router;
|
142
|
+
}
|
143
|
+
|
144
|
+
function addRewardToken(address _token, address[] memory _path2WMATIC, address _router) public onlyGovernance {
|
145
|
+
rewardTokens.push(_token);
|
146
|
+
setRewardLiquidationPath(_path2WMATIC, _router);
|
147
|
+
}
|
148
|
+
|
149
|
+
/**
|
150
|
+
* if the pool gets dQuick as reward token it has to first be converted to QUICK
|
151
|
+
* by leaving the dragonLair
|
152
|
+
*/
|
153
|
+
function convertDQuickToQuick() internal {
|
154
|
+
uint256 dQuickBalance = IERC20(dQuick).balanceOf(address(this));
|
155
|
+
if (dQuickBalance > 0){
|
156
|
+
IDragonLair(dQuick).leave(dQuickBalance);
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
// We assume that all the tradings can be done on Uniswap
|
161
|
+
function _liquidateReward() internal {
|
162
|
+
if (!sell()) {
|
163
|
+
// Profits can be disabled for possible simplified and rapid exit
|
164
|
+
emit ProfitsNotCollected(sell(), false);
|
165
|
+
return;
|
166
|
+
}
|
167
|
+
|
168
|
+
address _rewardToken = rewardToken();
|
169
|
+
for(uint256 i = 0; i < rewardTokens.length; i++){
|
170
|
+
address token = rewardTokens[i];
|
171
|
+
if (token == quick){
|
172
|
+
convertDQuickToQuick();
|
173
|
+
}
|
174
|
+
uint256 rewardBalance = IERC20(token).balanceOf(address(this));
|
175
|
+
if (swapRoutes[token][_rewardToken].length < 2 || rewardBalance == 0) {
|
176
|
+
continue;
|
177
|
+
}
|
178
|
+
|
179
|
+
address router = routers[token][_rewardToken];
|
180
|
+
IERC20(token).safeApprove(router, 0);
|
181
|
+
IERC20(token).safeApprove(router, rewardBalance);
|
182
|
+
// we can accept 1 as the minimum because this will be called only by a trusted worker
|
183
|
+
IUniswapV2Router02(router).swapExactTokensForTokens(
|
184
|
+
rewardBalance, 1, swapRoutes[token][_rewardToken], address(this), block.timestamp
|
185
|
+
);
|
186
|
+
}
|
187
|
+
uint256 rewardBalance = IERC20(_rewardToken).balanceOf(address(this));
|
188
|
+
notifyProfitInRewardToken(rewardBalance);
|
189
|
+
uint256 remainingRewardBalance = IERC20(_rewardToken).balanceOf(address(this));
|
190
|
+
|
191
|
+
if (remainingRewardBalance < 1e15) {
|
192
|
+
return;
|
193
|
+
}
|
194
|
+
|
195
|
+
_depositToGamma();
|
196
|
+
}
|
197
|
+
|
198
|
+
function _depositToGamma() internal {
|
199
|
+
address _underlying = underlying();
|
200
|
+
address _clearing = IUniProxy(uniProxy()).clearance();
|
201
|
+
address _token0 = IHypervisor(_underlying).token0();
|
202
|
+
address _token1 = IHypervisor(_underlying).token1();
|
203
|
+
(uint256 toToken0, uint256 toToken1) = _calculateToTokenAmounts();
|
204
|
+
(uint256 amount0, uint256 amount1) = _swapToTokens(_token0, _token1, toToken0, toToken1);
|
205
|
+
(uint256 min1, uint256 max1) = IClearing(_clearing).getDepositAmount(_underlying, _token0, amount0);
|
206
|
+
if (amount1 < min1) {
|
207
|
+
(,uint256 max0) = IClearing(_clearing).getDepositAmount(_underlying, _token1, amount1);
|
208
|
+
if (amount0 > max0) {
|
209
|
+
amount0 = max0;
|
210
|
+
}
|
211
|
+
} else if (amount1 > max1) {
|
212
|
+
amount1 = max1;
|
213
|
+
}
|
214
|
+
uint256[4] memory minIn = [uint(0), uint(0), uint(0), uint(0)];
|
215
|
+
|
216
|
+
IERC20(_token0).safeApprove(_underlying, 0);
|
217
|
+
IERC20(_token0).safeApprove(_underlying, amount0);
|
218
|
+
IERC20(_token1).safeApprove(_underlying, 0);
|
219
|
+
IERC20(_token1).safeApprove(_underlying, amount1);
|
220
|
+
IUniProxy(uniProxy()).deposit(amount0, amount1, address(this), _underlying, minIn);
|
221
|
+
}
|
222
|
+
|
223
|
+
function _calculateToTokenAmounts() internal view returns(uint256, uint256){
|
224
|
+
address pool = underlying();
|
225
|
+
(uint256 poolBalance0, uint256 poolBalance1) = IHypervisor(pool).getTotalAmounts();
|
226
|
+
address clearing = IUniProxy(uniProxy()).clearance();
|
227
|
+
uint256 sqrtPrice0In1 = uint256(IClearing(clearing).getSqrtTwapX96(pool, 1));
|
228
|
+
uint256 price0In1 = sqrtPrice0In1.mul(sqrtPrice0In1).div(uint(2**(96 * 2)).div(1e18));
|
229
|
+
uint256 totalPoolBalanceIn1 = poolBalance0.mul(price0In1).div(1e18).add(poolBalance1);
|
230
|
+
uint256 poolWeight0 = poolBalance0.mul(price0In1).div(totalPoolBalanceIn1);
|
231
|
+
|
232
|
+
uint256 rewardBalance = IERC20(rewardToken()).balanceOf(address(this));
|
233
|
+
uint256 toToken0 = rewardBalance.mul(poolWeight0).div(1e18);
|
234
|
+
uint256 toToken1 = rewardBalance.sub(toToken0);
|
235
|
+
return (toToken0, toToken1);
|
236
|
+
}
|
237
|
+
|
238
|
+
function _swapToTokens(
|
239
|
+
address tokenOut0,
|
240
|
+
address tokenOut1,
|
241
|
+
uint256 toToken0,
|
242
|
+
uint256 toToken1
|
243
|
+
) internal returns(uint256, uint256){
|
244
|
+
address tokenIn = rewardToken();
|
245
|
+
uint256 token0Amount;
|
246
|
+
if (swapRoutes[tokenIn][tokenOut0].length > 1) {
|
247
|
+
address router = routers[tokenIn][tokenOut0];
|
248
|
+
// allow to sell our reward
|
249
|
+
IERC20(tokenIn).safeApprove(router, 0);
|
250
|
+
IERC20(tokenIn).safeApprove(router, toToken0);
|
251
|
+
|
252
|
+
// if we need to liquidate the token0
|
253
|
+
IUniswapV2Router02(router).swapExactTokensForTokens(
|
254
|
+
toToken0,
|
255
|
+
1,
|
256
|
+
swapRoutes[tokenIn][tokenOut0],
|
257
|
+
address(this),
|
258
|
+
block.timestamp
|
259
|
+
);
|
260
|
+
token0Amount = IERC20(tokenOut0).balanceOf(address(this));
|
261
|
+
} else {
|
262
|
+
// otherwise we assme token0 is the reward token itself
|
263
|
+
token0Amount = toToken0;
|
264
|
+
}
|
265
|
+
|
266
|
+
uint256 token1Amount;
|
267
|
+
if (swapRoutes[tokenIn][tokenOut1].length > 1) {
|
268
|
+
address router = routers[tokenIn][tokenOut1];
|
269
|
+
// allow to sell our reward
|
270
|
+
IERC20(tokenIn).safeApprove(router, 0);
|
271
|
+
IERC20(tokenIn).safeApprove(router, toToken1);
|
272
|
+
|
273
|
+
// if we need to liquidate the token0
|
274
|
+
IUniswapV2Router02(router).swapExactTokensForTokens(
|
275
|
+
toToken1,
|
276
|
+
1,
|
277
|
+
swapRoutes[tokenIn][tokenOut1],
|
278
|
+
address(this),
|
279
|
+
block.timestamp
|
280
|
+
);
|
281
|
+
token1Amount = IERC20(tokenOut1).balanceOf(address(this));
|
282
|
+
} else {
|
283
|
+
// otherwise we assme token0 is the reward token itself
|
284
|
+
token1Amount = toToken1;
|
285
|
+
}
|
286
|
+
return (token0Amount, token1Amount);
|
287
|
+
}
|
288
|
+
|
289
|
+
/*
|
290
|
+
* Stakes everything the strategy holds into the reward pool
|
291
|
+
*/
|
292
|
+
function investAllUnderlying() internal onlyNotPausedInvesting {
|
293
|
+
// this check is needed, because most of the SNX reward pools will revert if
|
294
|
+
// you try to stake(0).
|
295
|
+
if(IERC20(underlying()).balanceOf(address(this)) > 0) {
|
296
|
+
enterRewardPool();
|
297
|
+
}
|
298
|
+
}
|
299
|
+
|
300
|
+
/*
|
301
|
+
* Withdraws all the asset to the vault
|
302
|
+
*/
|
303
|
+
function withdrawAllToVault() public restricted {
|
304
|
+
address _underlying = underlying();
|
305
|
+
if (address(rewardPool()) != address(0)) {
|
306
|
+
exitRewardPool();
|
307
|
+
}
|
308
|
+
_liquidateReward();
|
309
|
+
IERC20(_underlying).safeTransfer(vault(), IERC20(_underlying).balanceOf(address(this)));
|
310
|
+
}
|
311
|
+
|
312
|
+
/*
|
313
|
+
* Withdraws all the asset to the vault
|
314
|
+
*/
|
315
|
+
function withdrawToVault(uint256 amount) public restricted {
|
316
|
+
// Typically there wouldn't be any amount here
|
317
|
+
// however, it is possible because of the emergencyExit
|
318
|
+
address _underlying = underlying();
|
319
|
+
uint256 entireBalance = IERC20(_underlying).balanceOf(address(this));
|
320
|
+
|
321
|
+
if(amount > entireBalance){
|
322
|
+
// While we have the check above, we still using SafeMath below
|
323
|
+
// for the peace of mind (in case something gets changed in between)
|
324
|
+
uint256 needToWithdraw = amount.sub(entireBalance);
|
325
|
+
uint256 toWithdraw = Math.min(rewardPoolBalance(), needToWithdraw);
|
326
|
+
IMasterChef(rewardPool()).withdraw(poolId(), toWithdraw, address(this));
|
327
|
+
}
|
328
|
+
|
329
|
+
IERC20(_underlying).safeTransfer(vault(), amount);
|
330
|
+
}
|
331
|
+
|
332
|
+
/*
|
333
|
+
* Note that we currently do not have a mechanism here to include the
|
334
|
+
* amount of reward that is accrued.
|
335
|
+
*/
|
336
|
+
function investedUnderlyingBalance() external view returns (uint256) {
|
337
|
+
address _underlying = underlying();
|
338
|
+
if (rewardPool() == address(0)) {
|
339
|
+
return IERC20(_underlying).balanceOf(address(this));
|
340
|
+
}
|
341
|
+
// Adding the amount locked in the reward pool and the amount that is somehow in this contract
|
342
|
+
// both are in the units of "underlying"
|
343
|
+
// The second part is needed because there is the emergency exit mechanism
|
344
|
+
// which would break the assumption that all the funds are always inside of the reward pool
|
345
|
+
return rewardPoolBalance().add(IERC20(_underlying).balanceOf(address(this)));
|
346
|
+
}
|
347
|
+
|
348
|
+
/*
|
349
|
+
* Governance or Controller can claim coins that are somehow transferred into the contract
|
350
|
+
* Note that they cannot come in take away coins that are used and defined in the strategy itself
|
351
|
+
*/
|
352
|
+
function salvage(address recipient, address token, uint256 amount) external onlyControllerOrGovernance {
|
353
|
+
// To make sure that governance cannot come in and take away the coins
|
354
|
+
require(!unsalvagableTokens(token), "token is defined as not salvagable");
|
355
|
+
IERC20(token).safeTransfer(recipient, amount);
|
356
|
+
}
|
357
|
+
|
358
|
+
/*
|
359
|
+
* Get the reward, sell it in exchange for underlying, invest what you got.
|
360
|
+
* It's not much, but it's honest work.
|
361
|
+
*
|
362
|
+
* Note that although `onlyNotPausedInvesting` is not added here,
|
363
|
+
* calling `investAllUnderlying()` affectively blocks the usage of `doHardWork`
|
364
|
+
* when the investing is being paused by governance.
|
365
|
+
*/
|
366
|
+
function doHardWork() external onlyNotPausedInvesting restricted {
|
367
|
+
IMasterChef(rewardPool()).withdraw(poolId(), 0, address(this));
|
368
|
+
_liquidateReward();
|
369
|
+
investAllUnderlying();
|
370
|
+
}
|
371
|
+
|
372
|
+
/**
|
373
|
+
* Can completely disable claiming rewards and selling. Good for emergency withdraw in the
|
374
|
+
* simplest possible way.
|
375
|
+
*/
|
376
|
+
function setSell(bool s) public onlyGovernance {
|
377
|
+
_setSell(s);
|
378
|
+
}
|
379
|
+
|
380
|
+
// masterchef rewards pool ID
|
381
|
+
function _setPoolId(uint256 _value) internal {
|
382
|
+
setUint256(_POOLID_SLOT, _value);
|
383
|
+
}
|
384
|
+
|
385
|
+
function poolId() public view returns (uint256) {
|
386
|
+
return getUint256(_POOLID_SLOT);
|
387
|
+
}
|
388
|
+
|
389
|
+
function _setUniProxy(address _value) public onlyGovernance {
|
390
|
+
setAddress(_UNIPROXY_SLOT, _value);
|
391
|
+
}
|
392
|
+
|
393
|
+
function uniProxy() public view returns (address) {
|
394
|
+
return getAddress(_UNIPROXY_SLOT);
|
395
|
+
}
|
396
|
+
|
397
|
+
function finalizeUpgrade() external onlyGovernance {
|
398
|
+
_finalizeUpgrade();
|
399
|
+
}
|
400
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./QuickGammaStrategy.sol";
|
5
|
+
|
6
|
+
contract QuickGammaStrategyMainnet_MATIC_ETH_narrow is QuickGammaStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x02203f2351E7aC6aB5051205172D3f772db7D814);
|
15
|
+
address quick = address(0xB5C064F955D8e7F38fE0460C556a72987494eE17);
|
16
|
+
address weth = address(0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619);
|
17
|
+
address masterChef = address(0x20ec0d06F447d550fC6edee42121bc8C1817b97D);
|
18
|
+
QuickGammaStrategy.initializeBaseStrategy(
|
19
|
+
_storage,
|
20
|
+
underlying,
|
21
|
+
_vault,
|
22
|
+
masterChef,
|
23
|
+
0
|
24
|
+
);
|
25
|
+
rewardTokens = [quick, WMATIC];
|
26
|
+
swapRoutes[quick][WMATIC] = [quick, WMATIC];
|
27
|
+
routers[quick][WMATIC] = quickRouter;
|
28
|
+
swapRoutes[WMATIC][weth] = [WMATIC, weth];
|
29
|
+
routers[WMATIC][weth] = quickRouter;
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./QuickGammaStrategy.sol";
|
5
|
+
|
6
|
+
contract QuickGammaStrategyMainnet_MATIC_ETH_wide is QuickGammaStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x81Cec323BF8C4164c66ec066F53cc053A535f03D);
|
15
|
+
address quick = address(0xB5C064F955D8e7F38fE0460C556a72987494eE17);
|
16
|
+
address weth = address(0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619);
|
17
|
+
address masterChef = address(0x20ec0d06F447d550fC6edee42121bc8C1817b97D);
|
18
|
+
QuickGammaStrategy.initializeBaseStrategy(
|
19
|
+
_storage,
|
20
|
+
underlying,
|
21
|
+
_vault,
|
22
|
+
masterChef,
|
23
|
+
1
|
24
|
+
);
|
25
|
+
rewardTokens = [quick, WMATIC];
|
26
|
+
swapRoutes[quick][WMATIC] = [quick, WMATIC];
|
27
|
+
routers[quick][WMATIC] = quickRouter;
|
28
|
+
swapRoutes[WMATIC][weth] = [WMATIC, weth];
|
29
|
+
routers[WMATIC][weth] = quickRouter;
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./QuickGammaStrategy.sol";
|
5
|
+
|
6
|
+
contract QuickGammaStrategyMainnet_MATIC_USDC_narrow is QuickGammaStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x04d521E2c414E6d898c6F2599FdD863Edf49e247);
|
15
|
+
address quick = address(0xB5C064F955D8e7F38fE0460C556a72987494eE17);
|
16
|
+
address usdc = address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174);
|
17
|
+
address masterChef = address(0x20ec0d06F447d550fC6edee42121bc8C1817b97D);
|
18
|
+
QuickGammaStrategy.initializeBaseStrategy(
|
19
|
+
_storage,
|
20
|
+
underlying,
|
21
|
+
_vault,
|
22
|
+
masterChef,
|
23
|
+
2
|
24
|
+
);
|
25
|
+
rewardTokens = [quick, WMATIC];
|
26
|
+
swapRoutes[quick][WMATIC] = [quick, WMATIC];
|
27
|
+
routers[quick][WMATIC] = quickRouter;
|
28
|
+
swapRoutes[WMATIC][usdc] = [WMATIC, usdc];
|
29
|
+
routers[WMATIC][usdc] = quickRouter;
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
//SPDX-License-Identifier: Unlicense
|
2
|
+
pragma solidity 0.6.12;
|
3
|
+
|
4
|
+
import "./QuickGammaStrategy.sol";
|
5
|
+
|
6
|
+
contract QuickGammaStrategyMainnet_MATIC_USDC_wide is QuickGammaStrategy {
|
7
|
+
|
8
|
+
constructor() public {}
|
9
|
+
|
10
|
+
function initializeStrategy(
|
11
|
+
address _storage,
|
12
|
+
address _vault
|
13
|
+
) public initializer {
|
14
|
+
address underlying = address(0x4A83253e88e77E8d518638974530d0cBbbF3b675);
|
15
|
+
address quick = address(0xB5C064F955D8e7F38fE0460C556a72987494eE17);
|
16
|
+
address usdc = address(0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174);
|
17
|
+
address masterChef = address(0x20ec0d06F447d550fC6edee42121bc8C1817b97D);
|
18
|
+
QuickGammaStrategy.initializeBaseStrategy(
|
19
|
+
_storage,
|
20
|
+
underlying,
|
21
|
+
_vault,
|
22
|
+
masterChef,
|
23
|
+
3
|
24
|
+
);
|
25
|
+
rewardTokens = [quick, WMATIC];
|
26
|
+
swapRoutes[quick][WMATIC] = [quick, WMATIC];
|
27
|
+
routers[quick][WMATIC] = quickRouter;
|
28
|
+
swapRoutes[WMATIC][usdc] = [WMATIC, usdc];
|
29
|
+
routers[WMATIC][usdc] = quickRouter;
|
30
|
+
}
|
31
|
+
}
|