From d50571f8237f6058b497fd2300931104c41ce555 Mon Sep 17 00:00:00 2001 From: MirthFutures Date: Wed, 20 Sep 2023 10:09:37 -0400 Subject: [PATCH] Clean up repo --- ...eefyRewardPool.sol => BeefyRewardPool.txt} | 0 .../BIFI/infra/BeefyStrategyMulticall.sol | 2 +- contracts/BIFI/infra/BeefyTreasury.sol | 8 +- .../BIFI/interfaces/beamswap/IBeamChef.sol | 2 +- contracts/BIFI/interfaces/beefy/IStrategy.sol | 2 +- .../interfaces/beefy/IStrategyComplete.sol | 4 +- contracts/BIFI/interfaces/beefy/IVault.sol | 2 +- .../BIFI/interfaces/common/IComptroller.sol | 2 +- .../BIFI/interfaces/common/IERC20Extended.sol | 2 +- .../common/IUniswapRouterV3WithDeadline.sol | 4 +- contracts/BIFI/interfaces/common/IVToken.sol | 4 +- contracts/BIFI/interfaces/common/IxWant.sol | 2 +- .../BIFI/interfaces/kyber/IDMMRouter.sol | 2 +- contracts/BIFI/interfaces/mai/IFarm.sol | 2 +- .../BIFI/interfaces/pancake/IMasterChef.sol | 2 +- .../BIFI/interfaces/pancake/ISmartChef.sol | 2 +- .../BIFI/interfaces/pancake/IVeCakeStaker.sol | 2 +- .../BIFI/interfaces/spooky/ISpookyChefV2.sol | 2 +- .../interfaces/spooky/ISpookyRewarder.sol | 2 +- contracts/BIFI/interfaces/spooky/IXChef.sol | 2 +- contracts/BIFI/interfaces/spooky/IXPool.sol | 2 +- .../traderjoe/IStableJoeStaking.sol | 2 +- .../interfaces/traderjoe/IVeJoeStaker.sol | 2 +- contracts/BIFI/mocks/TestToken.sol | 6 +- .../BIFI/strategies/Aave/StrategyAave.sol | 435 ------------------ .../Aave/StrategyAaveSupplyOnly.sol | 258 ----------- .../BIFI/strategies/Ellipsis/IEpsSwap.sol | 2 +- .../{BIFI => archive}/infra/BeFTMClaimer.sol | 0 .../{BIFI => archive}/infra/BeefyFeeBatch.sol | 0 .../infra/BeefyFeeBatchV2.sol | 0 .../infra/BeefyLaunchpool.sol | 0 .../infra/BeefyVeRewardPool.sol | 0 .../interfaces/DFYN/IStakingRewards.sol | 0 .../interfaces/alpaca/IAlpacaVault.sol | 0 .../interfaces/alpaca/IFairLaunch.sol | 0 .../interfaces/beefy/IBurningStrategy.sol | 0 .../interfaces/beefy/ISeededVault.sol | 0 .../interfaces/beefy/IUpgradeableStrategy.sol | 0 .../interfaces/beefy/IVenusStrategy.sol | 0 .../interfaces/beefy/IVenusStrategyBNB.sol | 0 .../interfaces/belt/IBeltLP.sol | 0 .../interfaces/belt/IBeltToken.sol | 0 .../interfaces/belt/IMasterBelt.sol | 0 .../interfaces/binance/IRewardRegister.sol | 0 .../interfaces/biswap/IBiswapChef.sol | 0 .../interfaces/biswap/IBiswapPair.sol | 0 .../interfaces/biswap/IBiswapRouter.sol | 0 .../interfaces/common/IBar.sol | 0 .../interfaces/common/ICommonRewarder.sol | 0 .../interfaces/common/IFarm.sol | 0 .../interfaces/common}/IMasterChef.sol | 0 .../interfaces/common/IMasterChefReferrer.sol | 0 .../common/IMultiFeeDistribution.sol | 0 .../interfaces/common/IMultiRewardPool.sol | 0 .../interfaces/common/IMultiRewards.sol | 0 .../interfaces/common/IStakingDualRewards.sol | 0 .../interfaces/common/IUniswapRouter.sol | 0 .../interfaces/common/IUniswapRouterAVAX.sol | 0 .../interfaces/common/IUniswapRouterBNB.sol | 0 .../interfaces/common/IUniswapRouterMATIC.sol | 0 .../interfaces/common/IWBNB.sol | 0 .../interfaces/common/IWMATIC.sol | 0 .../interfaces/dfx/IDfxRouter.sol | 0 .../interfaces/finn/IFinnBar.sol | 0 .../geist/IIncentivesController.sol | 0 .../interfaces/geist/IMultiFeeDistributer.sol | 0 .../interfaces/hector/IStakingRewards.sol | 0 .../interfaces/kyber/IRewardsLocker.sol | 0 .../interfaces/mdex/IMasterChef.sol | 0 .../interfaces/mdex/IMdexRouter.sol | 0 .../interfaces/mdex/ISwapMining.sol | 0 .../interfaces/pangolin/IPangolinMiniChef.sol | 0 .../interfaces/pangolin/IPangolinRewarder.sol | 0 .../interfaces/pangolin/IStakingRewards.sol | 0 .../interfaces/quick/IDragonsLair.sol | 0 .../interfaces/quick/IQuickConverter.sol | 0 .../interfaces/quick/IQuickDualRewards.sol | 0 .../interfaces/quick/IRewardPool.sol | 0 .../interfaces/scream/ISteakHouse.sol | 0 .../interfaces/scream/IXPool.sol | 0 .../interfaces/solace/ISolaceRewards.sol | 0 .../interfaces/solace/IxLocker.sol | 0 .../interfaces/solar/ISolarRouter.sol | 0 .../interfaces/solar/ISolarStableRouter.sol | 0 .../interfaces/solar/IUniswapRouterSolar.sol | 0 .../interfaces/spirit/IMasterChef.sol | 0 .../interfaces/tomb/IMasonry.sol | 0 .../interfaces/tri/ITriChef.sol | 0 .../interfaces/tri/ITriRewarder.sol | 0 .../interfaces/valleyswap/IValleySwapFarm.sol | 0 .../valleyswap/IValleySwapLibrary.sol | 0 .../valleyswap/IValleySwapRouter.sol | 0 .../interfaces/vvs/ICraftsmanV2.sol | 0 .../interfaces/vvs/IVVSRewarder.sol | 0 .../interfaces/yuzu/IYuzuMasterChef.sol | 0 .../interfaces/yuzu/IYuzuSwapMining.sol | 0 .../archive/strategies/Aave/StrategyAave.sol | 213 ++++++--- .../strategies/Aave/StrategyAaveNative.sol | 0 .../Aave/StrategyAaveSupplyOnly.sol | 148 ++++-- .../strategies/Alpaca/StrategyAlpacaVault.sol | 0 .../strategies/Ape/StrategyJungleChefLP.sol | 0 .../Aurora/StrategyAuroraChefLP.sol | 0 .../strategies/Aurora/StrategyRoseLP.sol | 0 .../strategies/Aurora/StrategyRoseUSTLP.sol | 0 .../Aurora/StrategyTriMiniChefDualLP.sol | 0 .../Aurora/StrategyTriMiniChefDualStable.sol | 0 .../Aurora/StrategyTriMiniChefLP.sol | 0 .../strategies/BIFI/StrategyBifiMaxi.sol | 0 .../BIFI/StrategyBifiMaxiLowGas.sol | 0 .../strategies/BIFI/StrategyBifiMaxiV2.sol | 0 .../strategies/BIFI/StrategyBifiMaxiV3.sol | 0 .../strategies/BIFI/StrategyBifiMaxiV4.sol | 0 .../Beamswap/StrategyBeamswapStable.sol | 0 .../Beethovenx/MaiStrategyBeethovenx.sol | 0 .../Beethovenx/StrategyBeethovenx.sol | 0 .../Beethovenx/StrategyBeethovenxDual.sol | 0 .../StrategyBeethovenxDualTwoStep.sol | 0 .../StrategyBeethovenxSpiritRouter.sol | 0 .../Beethovenx/StrategyBeethovenxUST.sol | 0 .../Beethovenx/StrategyBeethovenxfBeets.sol | 0 .../strategies/Belt/Strategy4Belt.sol | 0 .../strategies/Belt/StrategyBeltCakeLP.sol | 0 .../strategies/Belt/StrategyBeltToken.sol | 0 .../strategies/Belt/StrategyBeltVenusBLP.sol | 0 .../strategies/Biswap/StrategyBiswap.sol | 0 .../strategies/Blizz/IBlizz.sol | 0 .../strategies/Blizz/StrategyBlizz.sol | 0 .../strategies/Blizz/StrategyBlizzChefLP.sol | 0 .../strategies/Blizz/StrategyBlizzNative.sol | 0 .../Blizz/StrategyRadiantChefLP.sol | 0 .../strategies/Blizz/StrategyValas.sol | 0 .../strategies/Blizz/StrategyValasChefLP.sol | 0 .../strategies/Cake/FeeManagerCake.sol | 0 .../strategies/Cake/ICakeChefV2.sol | 0 .../strategies/Cake/IVeCakeStaker.sol | 0 .../strategies/Cake/StratManagerCake.sol | 0 .../strategies/Cake/StrategyCakeBoostedLP.sol | 0 .../strategies/Cake/StrategyCakeV2.sol | 0 .../Cometh/StrategyMultiRewardsPolygonLP.sol | 0 .../Cometh/StrategyRewardPoolPolygonLP.sol | 0 .../strategies/Common/BeefyLP.sol | 0 .../strategies/Common/FeeManager.sol | 0 .../strategies/Common/StratManager.sol | 0 .../Common/StrategyCommonChefLPKeeper.txt | 0 .../Common/StrategyCommonChefLPTax.sol | 0 .../Common/StrategyCommonChefLPVoter.txt | 0 .../Common/StrategyCommonChefReferrerLP.sol | 0 .../StrategyCommonChefReferrerLPBsc.sol | 0 .../StrategyCommonChefReferrerSingle.sol | 0 .../Common/StrategyCommonChefStaking.sol | 0 .../StrategyCommonMultiRewardPoolLP.sol | 0 .../Common/StrategyCommonRewardPool.sol | 0 .../strategies/Common/StrategyMiniChefLP.sol | 0 .../Common/StrategyRewardPoolBsc.sol | 0 .../strategies/Common/StrategyVaultSeeder.txt | 0 .../strategies/Common/StrategyYieldLP.sol | 0 .../Common/StrategybeTokenRewardPool.sol | 0 .../strategies/Common/YieldBalancer.sol | 0 .../Curve/StrategyCurveHectorLP.sol | 0 .../Curve/StrategyCurveLPUniV3Router_sol6.txt | 0 .../DCA/BeefyDCAStrategyUnirouter.sol | 0 .../strategies/DCA/BeefyDCAVaultBase.sol | 0 .../strategies/DCA/BeefyERC721Enumerable.sol | 0 .../strategies/DCA/IDCAStrategy.sol | 0 .../strategies/DCA/IDCAVault.sol | 0 .../strategies/DCA/IMooStrategy.sol | 0 .../strategies/DCA/IMooVault.sol | 0 .../DFYN/StrategyDFYNDualFarmRewardPoolLP.sol | 0 .../DFYN/StrategyDFYNRewardPoolLP.sol | 0 .../Ellipsis/StrategyDotDotEllipsisFlat.txt | 0 .../strategies/Geist/StrategyGeist.sol | 0 .../strategies/Geist/StrategyGeistChefLP.sol | 0 .../strategies/Geist/StrategyGeistNative.sol | 0 .../strategies/Huckleberry/StrategyFinn.sol | 0 .../strategies/Mdex/StrategyMdexBscLP.sol | 0 .../strategies/Mdex/StrategyMdexChefLP.sol | 0 .../Mdex/StrategyMdexChefSingle.sol | 0 .../strategies/Mdex/StrategyMdexLP.sol | 0 .../Moonbeam/StrategyBeamChefLP.sol | 0 .../strategies/Moonbeam/StrategyStella.sol | 0 .../strategies/Netswap/INetswapChef.sol | 0 .../Netswap/StrategyNetswapDualLP.sol | 0 .../strategies/Scream/StrategyOXDxSCREAM.sol | 0 .../strategies/Scream/StrategyScream.sol | 0 .../strategies/Scream/StrategyScreamFTM.sol | 0 .../Scream/StrategyScreamSupplyOnly.sol | 0 .../Scream/StrategyScreamSupplyOnlyFrax.sol | 0 .../Scream/StrategySteakHouseLP.sol | 0 .../Solace/StrategySolaceRewardPool.sol | 0 .../Solace/StrategySolaceV2RewardPool.txt | 0 .../Solarbeam/StrategySolarbeam.sol | 0 .../strategies/Solidly/SolidyStaker.sol | 0 .../Spirit/StrategySpiritChefLP.sol | 0 .../Stargate/StrategyStargateStaking.sol | 0 .../Sushi/StrategyArbSushiDualLP.sol | 0 .../strategies/Sushi/StrategyMrSushiLP.sol | 0 .../Sushi/StrategyPolygonSushiLP.sol | 0 .../Sushi/StrategyPolygonSushiOhmLP.sol | 0 .../strategies/Sushi/StrategySushiLP.sol | 0 .../Sushi/StrategySushiNativeDualLP.sol | 0 .../strategies/Tomb/StrategyTombTSHARE.sol | 0 .../StrategyTraderJoeBoostedLP.sol | 0 .../Trader Joe}/StrategyTraderJoeDualLP.sol | 0 ...StrategyTraderJoeDualRouterNonNativeLP.sol | 0 .../StrategyTraderJoeSingleStake.sol | 0 .../strategies/VVS/StrategyVVSDualRewards.sol | 0 .../ValleySwap/StrategyValleySwapLP.sol | 0 .../Voltage/StrategyFuseRewardPoolLP.sol | 0 .../Voltage/StrategyVoltageStable.sol | 0 ...rategyYuzuChefMultiRewardsSwapMiningLP.sol | 0 .../Yuzu/StrategyYuzuChefSwapMiningLP.sol | 0 .../strategies}/beFTMRewardPool.sol | 0 .../strategies/degens/LaunchpoolProxy.sol | 0 .../degens/LaunchpoolReferralBsc.sol | 0 .../degens/LaunchpoolReferralFantom.sol | 0 .../degens/LaunchpoolReferralPolygon.sol | 0 .../strategies/degens/StrategyAnnex.sol | 0 .../strategies/degens/StrategyBanana.sol | 0 .../strategies/degens/StrategyBetu.sol | 0 .../strategies/degens/StrategyBison.sol | 0 .../strategies/degens/StrategyChargeLP.sol | 0 .../strategies/degens/StrategyDinoSwapLP.sol | 0 .../degens/StrategyDinoSwapSushiLP.sol | 0 .../degens/StrategyJetswapBusdLP.sol | 0 .../strategies/degens/StrategyJetswapLP.sol | 0 .../degens/StrategyJetswapWings.sol | 0 .../strategies/degens/StrategyLiquidus.sol | 0 .../degens/StrategyMasterChefApeLP.sol | 0 .../degens}/StrategyMasterChefLP.sol | 0 .../degens/StrategyMasterChefPolygonLP.sol | 0 .../degens/StrategyMoonpotRewardPool.sol | 0 .../strategies/degens/StrategyNfty.sol | 0 .../strategies/degens}/StrategyOXDxBOO.sol | 0 .../strategies/degens}/StrategyPangolinLP.sol | 0 .../degens}/StrategyPangolinMiniChefLP.sol | 0 .../StrategyPangolinMultiRewardsLP.sol | 0 .../degens}/StrategyPolygonQuickLP.sol | 0 .../degens}/StrategyQuickDragonsLair.sol | 0 .../degens}/StrategyQuickDualRewardLP.sol | 0 .../StrategyRewardPoolPolygonETHLP.sol | 0 .../degens}/StrategySolarbeamStable.sol | 0 .../strategies/degens}/StrategySpookyV2LP.sol | 0 .../StrategyStellaswapDualRewardLP.sol | 0 .../degens}/StrategyStellaswapStable.sol | 0 .../strategies/veJOE/ChefManager.sol | 0 .../strategies/veJOE/IJoeChef.sol | 0 .../strategies/veJOE/IJoeStrategy.sol | 0 .../strategies/veJOE/IVeJoe.sol | 0 .../strategies/veJOE/JoeBatch.sol | 0 .../veJOE/StrategyBeJoeRewardPool.sol | 0 .../strategies/veJOE/VeJoeStaker.sol | 0 .../{BIFI => archive}/utils/BeefyRefund.sol | 0 .../{BIFI => archive}/utils/BeefyRegistry.txt | 0 .../{BIFI => archive}/utils/GasPrice.sol | 0 .../{BIFI => archive}/utils/GasThrottler.sol | 0 .../utils/LPTokenWrapper.sol | 0 contracts/{BIFI => archive}/utils/Rescuer.sol | 0 .../{BIFI => archive}/utils/RescuerFrax.sol | 0 .../{BIFI => archive}/utils/RewardRecover.sol | 0 .../utils/StrategistBuyback.sol | 0 .../{BIFI => archive}/vaults/BeefyVaultV6.sol | 0 .../vaults/BeefyVaultV6Native.sol | 0 .../vaults/BeefyVaultv6Moonpot.sol | 0 .../zaps/BeefyPairFeeDataSource.sol | 0 .../zaps/BeefyUniV2ZapSolidly.sol | 0 .../{BIFI => archive}/zaps/BeefyZapMdex.sol | 0 .../zaps/BeefyZapSolidlyDyst.sol | 0 .../zaps/BeefyZapUniswapV2.txt | 0 .../zaps}/IBeefyDataSource.sol | 0 .../zaps/ZapBeFtmOneInch.sol | 0 .../{BIFI => archive}/zaps/ZapBeVelo.sol | 0 hardhat.config.ts | 29 +- package.json | 1 - yarn.lock | 5 - 274 files changed, 295 insertions(+), 858 deletions(-) rename contracts/BIFI/infra/{BeefyRewardPool.sol => BeefyRewardPool.txt} (100%) delete mode 100644 contracts/BIFI/strategies/Aave/StrategyAave.sol delete mode 100644 contracts/BIFI/strategies/Aave/StrategyAaveSupplyOnly.sol rename contracts/{BIFI => archive}/infra/BeFTMClaimer.sol (100%) rename contracts/{BIFI => archive}/infra/BeefyFeeBatch.sol (100%) rename contracts/{BIFI => archive}/infra/BeefyFeeBatchV2.sol (100%) rename contracts/{BIFI => archive}/infra/BeefyLaunchpool.sol (100%) rename contracts/{BIFI => archive}/infra/BeefyVeRewardPool.sol (100%) rename contracts/{BIFI => archive}/interfaces/DFYN/IStakingRewards.sol (100%) rename contracts/{BIFI => archive}/interfaces/alpaca/IAlpacaVault.sol (100%) rename contracts/{BIFI => archive}/interfaces/alpaca/IFairLaunch.sol (100%) rename contracts/{BIFI => archive}/interfaces/beefy/IBurningStrategy.sol (100%) rename contracts/{BIFI => archive}/interfaces/beefy/ISeededVault.sol (100%) rename contracts/{BIFI => archive}/interfaces/beefy/IUpgradeableStrategy.sol (100%) rename contracts/{BIFI => archive}/interfaces/beefy/IVenusStrategy.sol (100%) rename contracts/{BIFI => archive}/interfaces/beefy/IVenusStrategyBNB.sol (100%) rename contracts/{BIFI => archive}/interfaces/belt/IBeltLP.sol (100%) rename contracts/{BIFI => archive}/interfaces/belt/IBeltToken.sol (100%) rename contracts/{BIFI => archive}/interfaces/belt/IMasterBelt.sol (100%) rename contracts/{BIFI => archive}/interfaces/binance/IRewardRegister.sol (100%) rename contracts/{BIFI => archive}/interfaces/biswap/IBiswapChef.sol (100%) rename contracts/{BIFI => archive}/interfaces/biswap/IBiswapPair.sol (100%) rename contracts/{BIFI => archive}/interfaces/biswap/IBiswapRouter.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IBar.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/ICommonRewarder.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IFarm.sol (100%) rename contracts/{BIFI/interfaces/stellaswap => archive/interfaces/common}/IMasterChef.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IMasterChefReferrer.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IMultiFeeDistribution.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IMultiRewardPool.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IMultiRewards.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IStakingDualRewards.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IUniswapRouter.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IUniswapRouterAVAX.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IUniswapRouterBNB.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IUniswapRouterMATIC.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IWBNB.sol (100%) rename contracts/{BIFI => archive}/interfaces/common/IWMATIC.sol (100%) rename contracts/{BIFI => archive}/interfaces/dfx/IDfxRouter.sol (100%) rename contracts/{BIFI => archive}/interfaces/finn/IFinnBar.sol (100%) rename contracts/{BIFI => archive}/interfaces/geist/IIncentivesController.sol (100%) rename contracts/{BIFI => archive}/interfaces/geist/IMultiFeeDistributer.sol (100%) rename contracts/{BIFI => archive}/interfaces/hector/IStakingRewards.sol (100%) rename contracts/{BIFI => archive}/interfaces/kyber/IRewardsLocker.sol (100%) rename contracts/{BIFI => archive}/interfaces/mdex/IMasterChef.sol (100%) rename contracts/{BIFI => archive}/interfaces/mdex/IMdexRouter.sol (100%) rename contracts/{BIFI => archive}/interfaces/mdex/ISwapMining.sol (100%) rename contracts/{BIFI => archive}/interfaces/pangolin/IPangolinMiniChef.sol (100%) rename contracts/{BIFI => archive}/interfaces/pangolin/IPangolinRewarder.sol (100%) rename contracts/{BIFI => archive}/interfaces/pangolin/IStakingRewards.sol (100%) rename contracts/{BIFI => archive}/interfaces/quick/IDragonsLair.sol (100%) rename contracts/{BIFI => archive}/interfaces/quick/IQuickConverter.sol (100%) rename contracts/{BIFI => archive}/interfaces/quick/IQuickDualRewards.sol (100%) rename contracts/{BIFI => archive}/interfaces/quick/IRewardPool.sol (100%) rename contracts/{BIFI => archive}/interfaces/scream/ISteakHouse.sol (100%) rename contracts/{BIFI => archive}/interfaces/scream/IXPool.sol (100%) rename contracts/{BIFI => archive}/interfaces/solace/ISolaceRewards.sol (100%) rename contracts/{BIFI => archive}/interfaces/solace/IxLocker.sol (100%) rename contracts/{BIFI => archive}/interfaces/solar/ISolarRouter.sol (100%) rename contracts/{BIFI => archive}/interfaces/solar/ISolarStableRouter.sol (100%) rename contracts/{BIFI => archive}/interfaces/solar/IUniswapRouterSolar.sol (100%) rename contracts/{BIFI => archive}/interfaces/spirit/IMasterChef.sol (100%) rename contracts/{BIFI => archive}/interfaces/tomb/IMasonry.sol (100%) rename contracts/{BIFI => archive}/interfaces/tri/ITriChef.sol (100%) rename contracts/{BIFI => archive}/interfaces/tri/ITriRewarder.sol (100%) rename contracts/{BIFI => archive}/interfaces/valleyswap/IValleySwapFarm.sol (100%) rename contracts/{BIFI => archive}/interfaces/valleyswap/IValleySwapLibrary.sol (100%) rename contracts/{BIFI => archive}/interfaces/valleyswap/IValleySwapRouter.sol (100%) rename contracts/{BIFI => archive}/interfaces/vvs/ICraftsmanV2.sol (100%) rename contracts/{BIFI => archive}/interfaces/vvs/IVVSRewarder.sol (100%) rename contracts/{BIFI => archive}/interfaces/yuzu/IYuzuMasterChef.sol (100%) rename contracts/{BIFI => archive}/interfaces/yuzu/IYuzuSwapMining.sol (100%) rename contracts/{BIFI => archive}/strategies/Aave/StrategyAaveNative.sol (100%) rename contracts/{BIFI => archive}/strategies/Alpaca/StrategyAlpacaVault.sol (100%) rename contracts/{BIFI => archive}/strategies/Ape/StrategyJungleChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Aurora/StrategyAuroraChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Aurora/StrategyRoseLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Aurora/StrategyRoseUSTLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Aurora/StrategyTriMiniChefDualLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Aurora/StrategyTriMiniChefDualStable.sol (100%) rename contracts/{BIFI => archive}/strategies/Aurora/StrategyTriMiniChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/BIFI/StrategyBifiMaxi.sol (100%) rename contracts/{BIFI => archive}/strategies/BIFI/StrategyBifiMaxiLowGas.sol (100%) rename contracts/{BIFI => archive}/strategies/BIFI/StrategyBifiMaxiV2.sol (100%) rename contracts/{BIFI => archive}/strategies/BIFI/StrategyBifiMaxiV3.sol (100%) rename contracts/{BIFI => archive}/strategies/BIFI/StrategyBifiMaxiV4.sol (100%) rename contracts/{BIFI => archive}/strategies/Beamswap/StrategyBeamswapStable.sol (100%) rename contracts/{BIFI => archive}/strategies/Beethovenx/MaiStrategyBeethovenx.sol (100%) rename contracts/{BIFI => archive}/strategies/Beethovenx/StrategyBeethovenx.sol (100%) rename contracts/{BIFI => archive}/strategies/Beethovenx/StrategyBeethovenxDual.sol (100%) rename contracts/{BIFI => archive}/strategies/Beethovenx/StrategyBeethovenxDualTwoStep.sol (100%) rename contracts/{BIFI => archive}/strategies/Beethovenx/StrategyBeethovenxSpiritRouter.sol (100%) rename contracts/{BIFI => archive}/strategies/Beethovenx/StrategyBeethovenxUST.sol (100%) rename contracts/{BIFI => archive}/strategies/Beethovenx/StrategyBeethovenxfBeets.sol (100%) rename contracts/{BIFI => archive}/strategies/Belt/Strategy4Belt.sol (100%) rename contracts/{BIFI => archive}/strategies/Belt/StrategyBeltCakeLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Belt/StrategyBeltToken.sol (100%) rename contracts/{BIFI => archive}/strategies/Belt/StrategyBeltVenusBLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Biswap/StrategyBiswap.sol (100%) rename contracts/{BIFI => archive}/strategies/Blizz/IBlizz.sol (100%) rename contracts/{BIFI => archive}/strategies/Blizz/StrategyBlizz.sol (100%) rename contracts/{BIFI => archive}/strategies/Blizz/StrategyBlizzChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Blizz/StrategyBlizzNative.sol (100%) rename contracts/{BIFI => archive}/strategies/Blizz/StrategyRadiantChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Blizz/StrategyValas.sol (100%) rename contracts/{BIFI => archive}/strategies/Blizz/StrategyValasChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Cake/FeeManagerCake.sol (100%) rename contracts/{BIFI => archive}/strategies/Cake/ICakeChefV2.sol (100%) rename contracts/{BIFI => archive}/strategies/Cake/IVeCakeStaker.sol (100%) rename contracts/{BIFI => archive}/strategies/Cake/StratManagerCake.sol (100%) rename contracts/{BIFI => archive}/strategies/Cake/StrategyCakeBoostedLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Cake/StrategyCakeV2.sol (100%) rename contracts/{BIFI => archive}/strategies/Cometh/StrategyMultiRewardsPolygonLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Cometh/StrategyRewardPoolPolygonLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/BeefyLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/FeeManager.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StratManager.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyCommonChefLPKeeper.txt (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyCommonChefLPTax.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyCommonChefLPVoter.txt (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyCommonChefReferrerLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyCommonChefReferrerLPBsc.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyCommonChefReferrerSingle.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyCommonChefStaking.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyCommonMultiRewardPoolLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyCommonRewardPool.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyMiniChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyRewardPoolBsc.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyVaultSeeder.txt (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategyYieldLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/StrategybeTokenRewardPool.sol (100%) rename contracts/{BIFI => archive}/strategies/Common/YieldBalancer.sol (100%) rename contracts/{BIFI => archive}/strategies/Curve/StrategyCurveHectorLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Curve/StrategyCurveLPUniV3Router_sol6.txt (100%) rename contracts/{BIFI => archive}/strategies/DCA/BeefyDCAStrategyUnirouter.sol (100%) rename contracts/{BIFI => archive}/strategies/DCA/BeefyDCAVaultBase.sol (100%) rename contracts/{BIFI => archive}/strategies/DCA/BeefyERC721Enumerable.sol (100%) rename contracts/{BIFI => archive}/strategies/DCA/IDCAStrategy.sol (100%) rename contracts/{BIFI => archive}/strategies/DCA/IDCAVault.sol (100%) rename contracts/{BIFI => archive}/strategies/DCA/IMooStrategy.sol (100%) rename contracts/{BIFI => archive}/strategies/DCA/IMooVault.sol (100%) rename contracts/{BIFI => archive}/strategies/DFYN/StrategyDFYNDualFarmRewardPoolLP.sol (100%) rename contracts/{BIFI => archive}/strategies/DFYN/StrategyDFYNRewardPoolLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Ellipsis/StrategyDotDotEllipsisFlat.txt (100%) rename contracts/{BIFI => archive}/strategies/Geist/StrategyGeist.sol (100%) rename contracts/{BIFI => archive}/strategies/Geist/StrategyGeistChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Geist/StrategyGeistNative.sol (100%) rename contracts/{BIFI => archive}/strategies/Huckleberry/StrategyFinn.sol (100%) rename contracts/{BIFI => archive}/strategies/Mdex/StrategyMdexBscLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Mdex/StrategyMdexChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Mdex/StrategyMdexChefSingle.sol (100%) rename contracts/{BIFI => archive}/strategies/Mdex/StrategyMdexLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Moonbeam/StrategyBeamChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Moonbeam/StrategyStella.sol (100%) rename contracts/{BIFI => archive}/strategies/Netswap/INetswapChef.sol (100%) rename contracts/{BIFI => archive}/strategies/Netswap/StrategyNetswapDualLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Scream/StrategyOXDxSCREAM.sol (100%) rename contracts/{BIFI => archive}/strategies/Scream/StrategyScream.sol (100%) rename contracts/{BIFI => archive}/strategies/Scream/StrategyScreamFTM.sol (100%) rename contracts/{BIFI => archive}/strategies/Scream/StrategyScreamSupplyOnly.sol (100%) rename contracts/{BIFI => archive}/strategies/Scream/StrategyScreamSupplyOnlyFrax.sol (100%) rename contracts/{BIFI => archive}/strategies/Scream/StrategySteakHouseLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Solace/StrategySolaceRewardPool.sol (100%) rename contracts/{BIFI => archive}/strategies/Solace/StrategySolaceV2RewardPool.txt (100%) rename contracts/{BIFI => archive}/strategies/Solarbeam/StrategySolarbeam.sol (100%) rename contracts/{BIFI => archive}/strategies/Solidly/SolidyStaker.sol (100%) rename contracts/{BIFI => archive}/strategies/Spirit/StrategySpiritChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Stargate/StrategyStargateStaking.sol (100%) rename contracts/{BIFI => archive}/strategies/Sushi/StrategyArbSushiDualLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Sushi/StrategyMrSushiLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Sushi/StrategyPolygonSushiLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Sushi/StrategyPolygonSushiOhmLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Sushi/StrategySushiLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Sushi/StrategySushiNativeDualLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Tomb/StrategyTombTSHARE.sol (100%) rename contracts/{BIFI/strategies/TraderJoe => archive/strategies/Trader Joe}/StrategyTraderJoeBoostedLP.sol (100%) rename contracts/{BIFI/strategies/TraderJoe => archive/strategies/Trader Joe}/StrategyTraderJoeDualLP.sol (100%) rename contracts/{BIFI/strategies/TraderJoe => archive/strategies/Trader Joe}/StrategyTraderJoeDualRouterNonNativeLP.sol (100%) rename contracts/{BIFI/strategies/TraderJoe => archive/strategies/Trader Joe}/StrategyTraderJoeSingleStake.sol (100%) rename contracts/{BIFI => archive}/strategies/VVS/StrategyVVSDualRewards.sol (100%) rename contracts/{BIFI => archive}/strategies/ValleySwap/StrategyValleySwapLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Voltage/StrategyFuseRewardPoolLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Voltage/StrategyVoltageStable.sol (100%) rename contracts/{BIFI => archive}/strategies/Yuzu/StrategyYuzuChefMultiRewardsSwapMiningLP.sol (100%) rename contracts/{BIFI => archive}/strategies/Yuzu/StrategyYuzuChefSwapMiningLP.sol (100%) rename contracts/{BIFI/strategies/Locked => archive/strategies}/beFTMRewardPool.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/LaunchpoolProxy.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/LaunchpoolReferralBsc.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/LaunchpoolReferralFantom.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/LaunchpoolReferralPolygon.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyAnnex.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyBanana.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyBetu.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyBison.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyChargeLP.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyDinoSwapLP.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyDinoSwapSushiLP.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyJetswapBusdLP.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyJetswapLP.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyJetswapWings.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyLiquidus.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyMasterChefApeLP.sol (100%) rename contracts/{BIFI/strategies/Spooky => archive/strategies/degens}/StrategyMasterChefLP.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyMasterChefPolygonLP.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyMoonpotRewardPool.sol (100%) rename contracts/{BIFI => archive}/strategies/degens/StrategyNfty.sol (100%) rename contracts/{BIFI/strategies/Spooky => archive/strategies/degens}/StrategyOXDxBOO.sol (100%) rename contracts/{BIFI/strategies/Pangolin => archive/strategies/degens}/StrategyPangolinLP.sol (100%) rename contracts/{BIFI/strategies/Pangolin => archive/strategies/degens}/StrategyPangolinMiniChefLP.sol (100%) rename contracts/{BIFI/strategies/Pangolin => archive/strategies/degens}/StrategyPangolinMultiRewardsLP.sol (100%) rename contracts/{BIFI/strategies/QuickSwap => archive/strategies/degens}/StrategyPolygonQuickLP.sol (100%) rename contracts/{BIFI/strategies/QuickSwap => archive/strategies/degens}/StrategyQuickDragonsLair.sol (100%) rename contracts/{BIFI/strategies/QuickSwap => archive/strategies/degens}/StrategyQuickDualRewardLP.sol (100%) rename contracts/{BIFI/strategies/QuickSwap => archive/strategies/degens}/StrategyRewardPoolPolygonETHLP.sol (100%) rename contracts/{BIFI/strategies/Solarbeam => archive/strategies/degens}/StrategySolarbeamStable.sol (100%) rename contracts/{BIFI/strategies/Spooky => archive/strategies/degens}/StrategySpookyV2LP.sol (100%) rename contracts/{BIFI/strategies/Stellaswap => archive/strategies/degens}/StrategyStellaswapDualRewardLP.sol (100%) rename contracts/{BIFI/strategies/Stellaswap => archive/strategies/degens}/StrategyStellaswapStable.sol (100%) rename contracts/{BIFI => archive}/strategies/veJOE/ChefManager.sol (100%) rename contracts/{BIFI => archive}/strategies/veJOE/IJoeChef.sol (100%) rename contracts/{BIFI => archive}/strategies/veJOE/IJoeStrategy.sol (100%) rename contracts/{BIFI => archive}/strategies/veJOE/IVeJoe.sol (100%) rename contracts/{BIFI => archive}/strategies/veJOE/JoeBatch.sol (100%) rename contracts/{BIFI => archive}/strategies/veJOE/StrategyBeJoeRewardPool.sol (100%) rename contracts/{BIFI => archive}/strategies/veJOE/VeJoeStaker.sol (100%) rename contracts/{BIFI => archive}/utils/BeefyRefund.sol (100%) rename contracts/{BIFI => archive}/utils/BeefyRegistry.txt (100%) rename contracts/{BIFI => archive}/utils/GasPrice.sol (100%) rename contracts/{BIFI => archive}/utils/GasThrottler.sol (100%) rename contracts/{BIFI => archive}/utils/LPTokenWrapper.sol (100%) rename contracts/{BIFI => archive}/utils/Rescuer.sol (100%) rename contracts/{BIFI => archive}/utils/RescuerFrax.sol (100%) rename contracts/{BIFI => archive}/utils/RewardRecover.sol (100%) rename contracts/{BIFI => archive}/utils/StrategistBuyback.sol (100%) rename contracts/{BIFI => archive}/vaults/BeefyVaultV6.sol (100%) rename contracts/{BIFI => archive}/vaults/BeefyVaultV6Native.sol (100%) rename contracts/{BIFI => archive}/vaults/BeefyVaultv6Moonpot.sol (100%) rename contracts/{BIFI => archive}/zaps/BeefyPairFeeDataSource.sol (100%) rename contracts/{BIFI => archive}/zaps/BeefyUniV2ZapSolidly.sol (100%) rename contracts/{BIFI => archive}/zaps/BeefyZapMdex.sol (100%) rename contracts/{BIFI => archive}/zaps/BeefyZapSolidlyDyst.sol (100%) rename contracts/{BIFI => archive}/zaps/BeefyZapUniswapV2.txt (100%) rename contracts/{BIFI/zaps/zapInterfaces => archive/zaps}/IBeefyDataSource.sol (100%) rename contracts/{BIFI => archive}/zaps/ZapBeFtmOneInch.sol (100%) rename contracts/{BIFI => archive}/zaps/ZapBeVelo.sol (100%) diff --git a/contracts/BIFI/infra/BeefyRewardPool.sol b/contracts/BIFI/infra/BeefyRewardPool.txt similarity index 100% rename from contracts/BIFI/infra/BeefyRewardPool.sol rename to contracts/BIFI/infra/BeefyRewardPool.txt diff --git a/contracts/BIFI/infra/BeefyStrategyMulticall.sol b/contracts/BIFI/infra/BeefyStrategyMulticall.sol index cde168ed..65ef306a 100644 --- a/contracts/BIFI/infra/BeefyStrategyMulticall.sol +++ b/contracts/BIFI/infra/BeefyStrategyMulticall.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.12; +pragma solidity ^0.8.0; import "../interfaces/beefy/IVault.sol"; diff --git a/contracts/BIFI/infra/BeefyTreasury.sol b/contracts/BIFI/infra/BeefyTreasury.sol index 68442625..3cfb5b91 100644 --- a/contracts/BIFI/infra/BeefyTreasury.sol +++ b/contracts/BIFI/infra/BeefyTreasury.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.12; +pragma solidity ^0.8.0; -import "@openzeppelin/contracts/access/Ownable.sol"; -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; +import "@openzeppelin-4/contracts/access/Ownable.sol"; +import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin-4/contracts/token/ERC20/utils/SafeERC20.sol"; contract BeefyTreasury is Ownable { using SafeERC20 for IERC20; diff --git a/contracts/BIFI/interfaces/beamswap/IBeamChef.sol b/contracts/BIFI/interfaces/beamswap/IBeamChef.sol index fb695196..33f13e0e 100644 --- a/contracts/BIFI/interfaces/beamswap/IBeamChef.sol +++ b/contracts/BIFI/interfaces/beamswap/IBeamChef.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; interface IBeamChef { function deposit(uint256 _pid, uint256 _amount) external; diff --git a/contracts/BIFI/interfaces/beefy/IStrategy.sol b/contracts/BIFI/interfaces/beefy/IStrategy.sol index c5d6e9f3..a7f2c1e9 100644 --- a/contracts/BIFI/interfaces/beefy/IStrategy.sol +++ b/contracts/BIFI/interfaces/beefy/IStrategy.sol @@ -2,7 +2,7 @@ pragma solidity >=0.6.0 <0.9.0; -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin-4/contracts/token/ERC20/IERC20.sol"; interface IStrategy { function vault() external view returns (address); diff --git a/contracts/BIFI/interfaces/beefy/IStrategyComplete.sol b/contracts/BIFI/interfaces/beefy/IStrategyComplete.sol index e0236998..e5e7671e 100644 --- a/contracts/BIFI/interfaces/beefy/IStrategyComplete.sol +++ b/contracts/BIFI/interfaces/beefy/IStrategyComplete.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin-4/contracts/token/ERC20/IERC20.sol"; interface IStrategyComplete { function vault() external view returns (address); diff --git a/contracts/BIFI/interfaces/beefy/IVault.sol b/contracts/BIFI/interfaces/beefy/IVault.sol index 1acddbf2..403a42b1 100644 --- a/contracts/BIFI/interfaces/beefy/IVault.sol +++ b/contracts/BIFI/interfaces/beefy/IVault.sol @@ -2,7 +2,7 @@ pragma solidity >=0.6.0 <0.9.0; -import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin-4/contracts/token/ERC20/IERC20.sol"; import "./IStrategy.sol"; interface IVault is IERC20 { diff --git a/contracts/BIFI/interfaces/common/IComptroller.sol b/contracts/BIFI/interfaces/common/IComptroller.sol index 1a5bc292..81b083a4 100644 --- a/contracts/BIFI/interfaces/common/IComptroller.sol +++ b/contracts/BIFI/interfaces/common/IComptroller.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; interface IComptroller { function claimComp(address holder, address[] calldata _iTokens) external; diff --git a/contracts/BIFI/interfaces/common/IERC20Extended.sol b/contracts/BIFI/interfaces/common/IERC20Extended.sol index 43c3ae11..d0442443 100644 --- a/contracts/BIFI/interfaces/common/IERC20Extended.sol +++ b/contracts/BIFI/interfaces/common/IERC20Extended.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.6.0 <0.9.0; +pragma solidity ^0.8.0; interface IERC20Extended { function symbol() external view returns (string memory); diff --git a/contracts/BIFI/interfaces/common/IUniswapRouterV3WithDeadline.sol b/contracts/BIFI/interfaces/common/IUniswapRouterV3WithDeadline.sol index cf3133b3..3d64b393 100644 --- a/contracts/BIFI/interfaces/common/IUniswapRouterV3WithDeadline.sol +++ b/contracts/BIFI/interfaces/common/IUniswapRouterV3WithDeadline.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.6.0; -pragma experimental ABIEncoderV2; +pragma solidity ^0.8.0; + interface IUniswapRouterV3WithDeadline { struct ExactInputSingleParams { diff --git a/contracts/BIFI/interfaces/common/IVToken.sol b/contracts/BIFI/interfaces/common/IVToken.sol index 8fd05aec..c0ba0447 100644 --- a/contracts/BIFI/interfaces/common/IVToken.sol +++ b/contracts/BIFI/interfaces/common/IVToken.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol"; interface IVToken is IERC20 { function underlying() external returns (address); diff --git a/contracts/BIFI/interfaces/common/IxWant.sol b/contracts/BIFI/interfaces/common/IxWant.sol index e03ef7c8..63d70e22 100644 --- a/contracts/BIFI/interfaces/common/IxWant.sol +++ b/contracts/BIFI/interfaces/common/IxWant.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.12; +pragma solidity ^0.8.0; interface IxWant { function enter(uint256 _amount) external; diff --git a/contracts/BIFI/interfaces/kyber/IDMMRouter.sol b/contracts/BIFI/interfaces/kyber/IDMMRouter.sol index 5fa8f436..a823af80 100644 --- a/contracts/BIFI/interfaces/kyber/IDMMRouter.sol +++ b/contracts/BIFI/interfaces/kyber/IDMMRouter.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >0.6.0; +pragma solidity >0.8.0; import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol"; diff --git a/contracts/BIFI/interfaces/mai/IFarm.sol b/contracts/BIFI/interfaces/mai/IFarm.sol index 667e2ced..7f1d3ca8 100644 --- a/contracts/BIFI/interfaces/mai/IFarm.sol +++ b/contracts/BIFI/interfaces/mai/IFarm.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; interface IFarm { function deposit(uint256 _pid, uint256 _amount) external; diff --git a/contracts/BIFI/interfaces/pancake/IMasterChef.sol b/contracts/BIFI/interfaces/pancake/IMasterChef.sol index debf0639..154634b6 100644 --- a/contracts/BIFI/interfaces/pancake/IMasterChef.sol +++ b/contracts/BIFI/interfaces/pancake/IMasterChef.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; interface IMasterChef { function deposit(uint256 _pid, uint256 _amount) external; diff --git a/contracts/BIFI/interfaces/pancake/ISmartChef.sol b/contracts/BIFI/interfaces/pancake/ISmartChef.sol index 6865bbc7..9610b8f2 100644 --- a/contracts/BIFI/interfaces/pancake/ISmartChef.sol +++ b/contracts/BIFI/interfaces/pancake/ISmartChef.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; interface ISmartChef { function deposit(uint256 _amount) external; diff --git a/contracts/BIFI/interfaces/pancake/IVeCakeStaker.sol b/contracts/BIFI/interfaces/pancake/IVeCakeStaker.sol index 4b92fe00..86802538 100644 --- a/contracts/BIFI/interfaces/pancake/IVeCakeStaker.sol +++ b/contracts/BIFI/interfaces/pancake/IVeCakeStaker.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; interface IVeCakeStaker { function deposit(address _chef, uint256 _pid, uint256 _amount) external; diff --git a/contracts/BIFI/interfaces/spooky/ISpookyChefV2.sol b/contracts/BIFI/interfaces/spooky/ISpookyChefV2.sol index 4b73674b..54d74278 100644 --- a/contracts/BIFI/interfaces/spooky/ISpookyChefV2.sol +++ b/contracts/BIFI/interfaces/spooky/ISpookyChefV2.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; interface ISpookyChefV2 { function deposit(uint256 _pid, uint256 _amount) external; diff --git a/contracts/BIFI/interfaces/spooky/ISpookyRewarder.sol b/contracts/BIFI/interfaces/spooky/ISpookyRewarder.sol index 1c3f6e16..05ad03ab 100644 --- a/contracts/BIFI/interfaces/spooky/ISpookyRewarder.sol +++ b/contracts/BIFI/interfaces/spooky/ISpookyRewarder.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; interface ISpookyRewarder { function pendingToken(uint _pid, address _user) external view returns (uint pending); diff --git a/contracts/BIFI/interfaces/spooky/IXChef.sol b/contracts/BIFI/interfaces/spooky/IXChef.sol index 9213c815..ecc3ef11 100644 --- a/contracts/BIFI/interfaces/spooky/IXChef.sol +++ b/contracts/BIFI/interfaces/spooky/IXChef.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.6.0; +pragma solidity >=0.8.0; interface IXChef { function deposit(uint256 pid, uint256 amount) external; diff --git a/contracts/BIFI/interfaces/spooky/IXPool.sol b/contracts/BIFI/interfaces/spooky/IXPool.sol index 30d07d6d..ddd1f3b7 100644 --- a/contracts/BIFI/interfaces/spooky/IXPool.sol +++ b/contracts/BIFI/interfaces/spooky/IXPool.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.6.0; +pragma solidity >=0.8.0; interface IXPool { function enter(uint256 amount) external; diff --git a/contracts/BIFI/interfaces/traderjoe/IStableJoeStaking.sol b/contracts/BIFI/interfaces/traderjoe/IStableJoeStaking.sol index 9af32283..6d362c6d 100644 --- a/contracts/BIFI/interfaces/traderjoe/IStableJoeStaking.sol +++ b/contracts/BIFI/interfaces/traderjoe/IStableJoeStaking.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; interface IStableJoeStaking { function deposit(uint256 _amount) external; diff --git a/contracts/BIFI/interfaces/traderjoe/IVeJoeStaker.sol b/contracts/BIFI/interfaces/traderjoe/IVeJoeStaker.sol index 71b7b4e8..dfe02eba 100644 --- a/contracts/BIFI/interfaces/traderjoe/IVeJoeStaker.sol +++ b/contracts/BIFI/interfaces/traderjoe/IVeJoeStaker.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; interface IVeJoeStaker { function deposit(address _chef, uint256 _pid, uint256 _amount) external; diff --git a/contracts/BIFI/mocks/TestToken.sol b/contracts/BIFI/mocks/TestToken.sol index 0367d51d..18f7342f 100644 --- a/contracts/BIFI/mocks/TestToken.sol +++ b/contracts/BIFI/mocks/TestToken.sol @@ -1,14 +1,14 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.6.0; +pragma solidity ^0.8.0; -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol"; contract TestToken is ERC20 { constructor( uint256 _initialSupply, string memory _name, string memory _symbol - ) public ERC20(_name, _symbol) { + ) ERC20(_name, _symbol) { _mint(msg.sender, _initialSupply); } } \ No newline at end of file diff --git a/contracts/BIFI/strategies/Aave/StrategyAave.sol b/contracts/BIFI/strategies/Aave/StrategyAave.sol deleted file mode 100644 index 7fe2b1d8..00000000 --- a/contracts/BIFI/strategies/Aave/StrategyAave.sol +++ /dev/null @@ -1,435 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.6.12; - -import "@openzeppelin/contracts/access/Ownable.sol"; -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; -import "@openzeppelin/contracts/math/SafeMath.sol"; -import "@openzeppelin/contracts/utils/Pausable.sol"; - -import "../../interfaces/aave/IDataProvider.sol"; -import "../../interfaces/aave/IAaveV3Incentives.sol"; -import "../../interfaces/aave/ILendingPool.sol"; -import "../../interfaces/common/IUniswapRouterETH.sol"; -import "../Common/FeeManager.sol"; -import "../Common/StratManager.sol"; - -contract StrategyAave is StratManager, FeeManager { - using SafeERC20 for IERC20; - using SafeMath for uint256; - - // Tokens used - address public native; - address public want; - address public aToken; - address public varDebtToken; - - // Third party contracts - address public dataProvider; - address public lendingPool; - address public incentivesController; - - // Routes - address[] public nativeToWantRoute; - - bool public harvestOnDeposit; - uint256 public lastHarvest; - - /** - * @dev Variables that can be changed to config profitability and risk: - * {borrowRate} - What % of our collateral do we borrow per leverage level. - * {borrowRateMax} - A limit on how much we can push borrow risk. - * {borrowDepth} - How many levels of leverage do we take. - * {minLeverage} - The minimum amount of collateral required to leverage. - * {BORROW_DEPTH_MAX} - A limit on how many steps we can leverage. - * {INTEREST_RATE_MODE} - The type of borrow debt. Stable: 1, Variable: 2. - */ - uint256 public borrowRate; - uint256 public borrowRateMax; - uint256 public borrowDepth; - uint256 public minLeverage; - uint256 constant public BORROW_DEPTH_MAX = 10; - uint256 constant public INTEREST_RATE_MODE = 2; - - /** - * @dev Helps to differentiate borrowed funds that shouldn't be used in functions like 'deposit()' - * as they're required to deleverage correctly. - */ - uint256 public reserves = 0; - - /** - * @dev Events that the contract emits - */ - event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl); - event Deposit(uint256 tvl); - event Withdraw(uint256 tvl); - event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees); - event StratRebalance(uint256 _borrowRate, uint256 _borrowDepth); - event SetEMode(uint8 eMode, uint256 borrowRateMax, uint256 borrowRate, uint256 borrowDepth); - - constructor( - address _want, - address _native, - uint256 _borrowRate, - uint256 _borrowRateMax, - uint256 _borrowDepth, - uint256 _minLeverage, - uint8 _eMode, - address _dataProvider, - address _lendingPool, - address _incentivesController, - address _vault, - address _unirouter, - address _keeper, - address _strategist, - address _beefyFeeRecipient - ) StratManager(_keeper, _strategist, _unirouter, _vault, _beefyFeeRecipient) public { - want = _want; - native = _native; - - borrowRate = _borrowRate; - borrowRateMax = _borrowRateMax; - borrowDepth = _borrowDepth; - minLeverage = _minLeverage; - dataProvider = _dataProvider; - lendingPool = _lendingPool; - incentivesController = _incentivesController; - - (aToken,,varDebtToken) = IDataProvider(dataProvider).getReserveTokensAddresses(want); - - if (_eMode != 0) { - ILendingPool(lendingPool).setUserEMode(_eMode); - } - - nativeToWantRoute = [native, want]; - - _giveAllowances(); - } - - // puts the funds to work - function deposit() public whenNotPaused { - uint256 wantBal = availableWant(); - - if (wantBal > 0) { - _leverage(wantBal); - emit Deposit(balanceOf()); - } - } - - /** - * @dev Repeatedly supplies and borrows {want} following the configured {borrowRate} and {borrowDepth} - * @param _amount amount of {want} to leverage - */ - function _leverage(uint256 _amount) internal { - if (_amount < minLeverage) { return; } - - for (uint i = 0; i < borrowDepth; i++) { - ILendingPool(lendingPool).deposit(want, _amount, address(this), 0); - _amount = _amount.mul(borrowRate).div(100); - if (_amount > 0) { - ILendingPool(lendingPool).borrow(want, _amount, INTEREST_RATE_MODE, 0, address(this)); - } - } - - reserves = reserves.add(_amount); - } - - /** - * @dev Incrementally alternates between paying part of the debt and withdrawing part of the supplied - * collateral. Continues to do this until it repays the entire debt and withdraws all the supplied {want} - * from the system - */ - function _deleverage() internal { - uint256 wantBal = balanceOfWant(); - (uint256 supplyBal, uint256 borrowBal) = userReserves(); - - while (wantBal < borrowBal) { - ILendingPool(lendingPool).repay(want, wantBal, INTEREST_RATE_MODE, address(this)); - - (supplyBal, borrowBal) = userReserves(); - uint256 targetSupply = borrowBal.mul(100).div(borrowRate); - - ILendingPool(lendingPool).withdraw(want, supplyBal.sub(targetSupply), address(this)); - wantBal = balanceOfWant(); - } - - if (borrowBal > 0) { - ILendingPool(lendingPool).repay(want, uint256(-1), INTEREST_RATE_MODE, address(this)); - } - if (supplyBal > 0) { - ILendingPool(lendingPool).withdraw(want, type(uint).max, address(this)); - } - - reserves = 0; - } - - /** - * @dev Extra safety measure that allows us to manually unwind one level. In case we somehow get into - * as state where the cost of unwinding freezes the system. We can manually unwind a few levels - * with this function and then 'rebalance()' with new {borrowRate} and {borrowConfig} values. - * @param _borrowRate configurable borrow rate in case it's required to unwind successfully - */ - function deleverageOnce(uint _borrowRate) external onlyManager { - require(_borrowRate <= borrowRateMax, "!safe"); - - uint256 wantBal = balanceOfWant(); - if (wantBal > 0) { - ILendingPool(lendingPool).repay(want, wantBal, INTEREST_RATE_MODE, address(this)); - } - - (uint256 supplyBal, uint256 borrowBal) = userReserves(); - uint256 targetSupply = borrowBal.mul(100).div(_borrowRate); - - if (supplyBal.sub(targetSupply) > 0) { - ILendingPool(lendingPool).withdraw(want, supplyBal.sub(targetSupply), address(this)); - } - - reserves = balanceOfWant(); - } - - /** - * @dev Updates the risk profile and rebalances the vault funds accordingly. - * @param _borrowRate percent to borrow on each leverage level. - * @param _borrowDepth how many levels to leverage the funds. - */ - function rebalance(uint256 _borrowRate, uint256 _borrowDepth) external onlyManager { - require(_borrowRate <= borrowRateMax, "!rate"); - require(_borrowDepth <= BORROW_DEPTH_MAX, "!depth"); - - _deleverage(); - borrowRate = _borrowRate; - borrowDepth = _borrowDepth; - - uint256 wantBal = balanceOfWant(); - _leverage(wantBal); - - emit StratRebalance(_borrowRate, _borrowDepth); - } - - function beforeDeposit() external override { - if (harvestOnDeposit) { - require(msg.sender == vault, "!vault"); - _harvest(tx.origin); - } - } - - function harvest() external virtual { - _harvest(tx.origin); - } - - function harvest(address callFeeRecipient) external virtual { - _harvest(callFeeRecipient); - } - - function managerHarvest() external onlyManager { - _harvest(tx.origin); - } - - // compounds earnings and charges performance fee - function _harvest(address callFeeRecipient) internal whenNotPaused { - address[] memory assets = new address[](2); - assets[0] = aToken; - assets[1] = varDebtToken; - IAaveV3Incentives(incentivesController).claimRewards(assets, type(uint).max, address(this), native); - - uint256 nativeBal = IERC20(native).balanceOf(address(this)); - if (nativeBal > 0) { - chargeFees(callFeeRecipient); - swapRewards(); - uint256 wantHarvested = availableWant(); - deposit(); - - lastHarvest = block.timestamp; - emit StratHarvest(msg.sender, wantHarvested, balanceOf()); - } - } - - // performance fees - function chargeFees(address callFeeRecipient) internal { - uint256 nativeFeeBal = IERC20(native).balanceOf(address(this)).mul(45).div(1000); - - uint256 callFeeAmount = nativeFeeBal.mul(callFee).div(MAX_FEE); - IERC20(native).safeTransfer(callFeeRecipient, callFeeAmount); - - uint256 beefyFeeAmount = nativeFeeBal.mul(beefyFee).div(MAX_FEE); - IERC20(native).safeTransfer(beefyFeeRecipient, beefyFeeAmount); - - uint256 strategistFeeAmount = nativeFeeBal.mul(STRATEGIST_FEE).div(MAX_FEE); - IERC20(native).safeTransfer(strategist, strategistFeeAmount); - - emit ChargedFees(callFeeAmount, beefyFeeAmount, strategistFeeAmount); - } - - // swap rewards to {want} - function swapRewards() internal { - uint256 nativeBal = IERC20(native).balanceOf(address(this)); - IUniswapRouterETH(unirouter).swapExactTokensForTokens(nativeBal, 0, nativeToWantRoute, address(this), now); - } - - /** - * @dev Withdraws funds and sends them back to the vault. It deleverages from venus first, - * and then deposits again after the withdraw to make sure it mantains the desired ratio. - * @param _amount How much {want} to withdraw. - */ - function withdraw(uint256 _amount) external { - require(msg.sender == vault, "!vault"); - - uint256 wantBal = availableWant(); - if (wantBal < _amount) { - _deleverage(); - wantBal = balanceOfWant(); - } - - if (wantBal > _amount) { - wantBal = _amount; - } - - if (tx.origin != owner() && !paused()) { - uint256 withdrawalFeeAmount = wantBal.mul(withdrawalFee).div(WITHDRAWAL_MAX); - wantBal = wantBal.sub(withdrawalFeeAmount); - } - - IERC20(want).safeTransfer(vault, wantBal); - emit Withdraw(balanceOf()); - - if (!paused()) { - _leverage(availableWant()); - } - } - - /** - * @dev Required for various functions that need to deduct {reserves} from total {want}. - * @return how much {want} the contract holds without reserves - */ - function availableWant() public view returns (uint256) { - return balanceOfWant().sub(reserves); - } - - // return supply and borrow balance - function userReserves() public view returns (uint256, uint256) { - (uint256 supplyBal,,uint256 borrowBal,,,,,,) = IDataProvider(dataProvider).getUserReserveData(want, address(this)); - return (supplyBal, borrowBal); - } - - // returns the user account data across all the reserves - function userAccountData() public view returns ( - uint256 totalCollateralETH, - uint256 totalDebtETH, - uint256 availableBorrowsETH, - uint256 currentLiquidationThreshold, - uint256 ltv, - uint256 healthFactor - ) { - return ILendingPool(lendingPool).getUserAccountData(address(this)); - } - - // calculate the total underlaying 'want' held by the strat. - function balanceOf() public view returns (uint256) { - return balanceOfWant().add(balanceOfPool()); - } - - // it calculates how much 'want' this contract holds. - function balanceOfWant() public view returns (uint256) { - return IERC20(want).balanceOf(address(this)); - } - - // it calculates how much 'want' the strategy has working in the farm. - function balanceOfPool() public view returns (uint256) { - (uint256 supplyBal, uint256 borrowBal) = userReserves(); - return supplyBal.sub(borrowBal); - } - - function nativeToWant() public view returns (address[] memory) { - return nativeToWantRoute; - } - - // returns rewards unharvested - function rewardsAvailable() public view returns (uint256) { - address[] memory assets = new address[](2); - assets[0] = aToken; - assets[1] = varDebtToken; - return IAaveV3Incentives(incentivesController).getUserRewards(assets, address(this), native); - } - - // native reward amount for calling harvest - function callReward() public view returns (uint256) { - return rewardsAvailable().mul(45).div(1000).mul(callFee).div(MAX_FEE); - } - - // returns strategy's eMode - function eMode() external view returns (uint256) { - return ILendingPool(lendingPool).getUserEMode(address(this)); - } - - // set strategy to a new eMode and set borrowRateMax to the loan-to-value of the new eMode category - function setEMode(uint8 _eMode, uint256 _borrowRateMax, uint256 _borrowRate, uint256 _borrowDepth) external onlyManager { - _deleverage(); - ILendingPool(lendingPool).setUserEMode(_eMode); - - if (_eMode != 0) { - (uint16 ltv,,,,) = ILendingPool(lendingPool).getEModeCategoryData(_eMode); - borrowRateMax = uint256(ltv).div(100); - } else { - borrowRateMax = _borrowRateMax; - } - - require(_borrowRate <= borrowRateMax, "!rate"); - require(_borrowDepth <= BORROW_DEPTH_MAX, "!depth"); - borrowRate = _borrowRate; - borrowDepth = _borrowDepth; - - _leverage(balanceOfWant()); - - emit SetEMode(_eMode, borrowRateMax, borrowRate, borrowDepth); - } - - function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager { - harvestOnDeposit = _harvestOnDeposit; - if (harvestOnDeposit) { - setWithdrawalFee(0); - } else { - setWithdrawalFee(10); - } - } - - // called as part of strat migration. Sends all the available funds back to the vault. - function retireStrat() external { - require(msg.sender == vault, "!vault"); - - _deleverage(); - - uint256 wantBal = balanceOfWant(); - IERC20(want).transfer(vault, wantBal); - } - - // pauses deposits and withdraws all funds from third party systems. - function panic() public onlyManager { - _deleverage(); - pause(); - } - - function pause() public onlyManager { - _pause(); - - _removeAllowances(); - } - - function unpause() external onlyManager { - _unpause(); - - _giveAllowances(); - - deposit(); - } - - function _giveAllowances() internal { - IERC20(want).safeApprove(lendingPool, uint256(-1)); - IERC20(native).safeApprove(unirouter, uint256(-1)); - } - - function _removeAllowances() internal { - IERC20(want).safeApprove(lendingPool, 0); - IERC20(native).safeApprove(unirouter, 0); - } -} \ No newline at end of file diff --git a/contracts/BIFI/strategies/Aave/StrategyAaveSupplyOnly.sol b/contracts/BIFI/strategies/Aave/StrategyAaveSupplyOnly.sol deleted file mode 100644 index b88fec91..00000000 --- a/contracts/BIFI/strategies/Aave/StrategyAaveSupplyOnly.sol +++ /dev/null @@ -1,258 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.6.12; - -import "@openzeppelin/contracts/access/Ownable.sol"; -import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; -import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; -import "@openzeppelin/contracts/math/SafeMath.sol"; -import "@openzeppelin/contracts/utils/Pausable.sol"; - -import "../../interfaces/aave/IDataProvider.sol"; -import "../../interfaces/aave/IAaveV3Incentives.sol"; -import "../../interfaces/aave/ILendingPool.sol"; -import "../../interfaces/common/IUniswapRouterETH.sol"; -import "../Common/FeeManager.sol"; -import "../Common/StratManager.sol"; - -contract StrategyAaveSupplyOnly is StratManager, FeeManager { - using SafeERC20 for IERC20; - using SafeMath for uint256; - - // Tokens used - address public native; - address public want; - address public aToken; - - // Third party contracts - address public dataProvider; - address public lendingPool; - address public incentivesController; - - // Routes - address[] public nativeToWantRoute; - - bool public harvestOnDeposit; - uint256 public lastHarvest; - - event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl); - event Deposit(uint256 tvl); - event Withdraw(uint256 tvl); - event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees); - - constructor( - address _want, - address _native, - address _dataProvider, - address _lendingPool, - address _incentivesController, - address _vault, - address _unirouter, - address _keeper, - address _strategist, - address _beefyFeeRecipient - ) StratManager(_keeper, _strategist, _unirouter, _vault, _beefyFeeRecipient) public { - want = _want; - native = _native; - - dataProvider = _dataProvider; - lendingPool = _lendingPool; - incentivesController = _incentivesController; - - (aToken,,) = IDataProvider(dataProvider).getReserveTokensAddresses(want); - - nativeToWantRoute = [native, want]; - - _giveAllowances(); - } - - // puts the funds to work - function deposit() public whenNotPaused { - uint256 wantBal = balanceOfWant(); - - if (wantBal > 0) { - ILendingPool(lendingPool).deposit(want, wantBal, address(this), 0); - emit Deposit(balanceOf()); - } - } - - function withdraw(uint256 _amount) external { - require(msg.sender == vault, "!vault"); - - uint256 wantBal = balanceOfWant(); - if (wantBal < _amount) { - ILendingPool(lendingPool).withdraw(want, _amount.sub(wantBal), address(this)); - wantBal = balanceOfWant(); - } - - if (wantBal > _amount) { - wantBal = _amount; - } - - if (tx.origin != owner() && !paused()) { - uint256 withdrawalFeeAmount = wantBal.mul(withdrawalFee).div(WITHDRAWAL_MAX); - wantBal = wantBal.sub(withdrawalFeeAmount); - } - - IERC20(want).safeTransfer(vault, wantBal); - emit Withdraw(balanceOf()); - } - - function beforeDeposit() external override { - if (harvestOnDeposit) { - require(msg.sender == vault, "!vault"); - _harvest(tx.origin); - } - } - - function harvest() external virtual { - _harvest(tx.origin); - } - - function harvest(address callFeeRecipient) external virtual { - _harvest(callFeeRecipient); - } - - function managerHarvest() external onlyManager { - _harvest(tx.origin); - } - - // compounds earnings and charges performance fee - function _harvest(address callFeeRecipient) internal whenNotPaused { - address[] memory assets = new address[](1); - assets[0] = aToken; - IAaveV3Incentives(incentivesController).claimRewards(assets, type(uint).max, address(this), native); - - uint256 nativeBal = IERC20(native).balanceOf(address(this)); - if (nativeBal > 0) { - chargeFees(callFeeRecipient); - swapRewards(); - uint256 wantHarvested = balanceOfWant(); - deposit(); - - lastHarvest = block.timestamp; - emit StratHarvest(msg.sender, wantHarvested, balanceOf()); - } - } - - // performance fees - function chargeFees(address callFeeRecipient) internal { - uint256 nativeFeeBal = IERC20(native).balanceOf(address(this)).mul(45).div(1000); - - uint256 callFeeAmount = nativeFeeBal.mul(callFee).div(MAX_FEE); - IERC20(native).safeTransfer(callFeeRecipient, callFeeAmount); - - uint256 beefyFeeAmount = nativeFeeBal.mul(beefyFee).div(MAX_FEE); - IERC20(native).safeTransfer(beefyFeeRecipient, beefyFeeAmount); - - uint256 strategistFeeAmount = nativeFeeBal.mul(STRATEGIST_FEE).div(MAX_FEE); - IERC20(native).safeTransfer(strategist, strategistFeeAmount); - - emit ChargedFees(callFeeAmount, beefyFeeAmount, strategistFeeAmount); - } - - // swap rewards to {want} - function swapRewards() internal { - uint256 nativeBal = IERC20(native).balanceOf(address(this)); - IUniswapRouterETH(unirouter).swapExactTokensForTokens(nativeBal, 0, nativeToWantRoute, address(this), now); - } - - // return supply and borrow balance - function userReserves() public view returns (uint256, uint256) { - (uint256 supplyBal,,uint256 borrowBal,,,,,,) = IDataProvider(dataProvider).getUserReserveData(want, address(this)); - return (supplyBal, borrowBal); - } - - // returns the user account data across all the reserves - function userAccountData() public view returns ( - uint256 totalCollateralETH, - uint256 totalDebtETH, - uint256 availableBorrowsETH, - uint256 currentLiquidationThreshold, - uint256 ltv, - uint256 healthFactor - ) { - return ILendingPool(lendingPool).getUserAccountData(address(this)); - } - - // calculate the total underlaying 'want' held by the strat. - function balanceOf() public view returns (uint256) { - return balanceOfWant().add(balanceOfPool()); - } - - // it calculates how much 'want' this contract holds. - function balanceOfWant() public view returns (uint256) { - return IERC20(want).balanceOf(address(this)); - } - - // it calculates how much 'want' the strategy has working in the farm. - function balanceOfPool() public view returns (uint256) { - (uint256 supplyBal, uint256 borrowBal) = userReserves(); - return supplyBal.sub(borrowBal); - } - - function nativeToWant() public view returns (address[] memory) { - return nativeToWantRoute; - } - - // returns rewards unharvested - function rewardsAvailable() public view returns (uint256) { - address[] memory assets = new address[](1); - assets[0] = aToken; - return IAaveV3Incentives(incentivesController).getUserRewards(assets, address(this), native); - } - - // native reward amount for calling harvest - function callReward() public view returns (uint256) { - return rewardsAvailable().mul(45).div(1000).mul(callFee).div(MAX_FEE); - } - - function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager { - harvestOnDeposit = _harvestOnDeposit; - if (harvestOnDeposit) { - setWithdrawalFee(0); - } else { - setWithdrawalFee(10); - } - } - - // called as part of strat migration. Sends all the available funds back to the vault. - function retireStrat() external { - require(msg.sender == vault, "!vault"); - - ILendingPool(lendingPool).withdraw(want, type(uint).max, address(this)); - - uint256 wantBal = balanceOfWant(); - IERC20(want).transfer(vault, wantBal); - } - - // pauses deposits and withdraws all funds from third party systems. - function panic() public onlyManager { - ILendingPool(lendingPool).withdraw(want, type(uint).max, address(this)); - pause(); - } - - function pause() public onlyManager { - _pause(); - - _removeAllowances(); - } - - function unpause() external onlyManager { - _unpause(); - - _giveAllowances(); - - deposit(); - } - - function _giveAllowances() internal { - IERC20(want).safeApprove(lendingPool, uint256(-1)); - IERC20(native).safeApprove(unirouter, uint256(-1)); - } - - function _removeAllowances() internal { - IERC20(want).safeApprove(lendingPool, 0); - IERC20(native).safeApprove(unirouter, 0); - } -} \ No newline at end of file diff --git a/contracts/BIFI/strategies/Ellipsis/IEpsSwap.sol b/contracts/BIFI/strategies/Ellipsis/IEpsSwap.sol index d88338fc..d9fdf416 100644 --- a/contracts/BIFI/strategies/Ellipsis/IEpsSwap.sol +++ b/contracts/BIFI/strategies/Ellipsis/IEpsSwap.sol @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.6.0; +pragma solidity ^0.8.0; interface IEpsSwap { function get_dy(int128 i, int128 j, uint256 dx) external view returns (uint256); diff --git a/contracts/BIFI/infra/BeFTMClaimer.sol b/contracts/archive/infra/BeFTMClaimer.sol similarity index 100% rename from contracts/BIFI/infra/BeFTMClaimer.sol rename to contracts/archive/infra/BeFTMClaimer.sol diff --git a/contracts/BIFI/infra/BeefyFeeBatch.sol b/contracts/archive/infra/BeefyFeeBatch.sol similarity index 100% rename from contracts/BIFI/infra/BeefyFeeBatch.sol rename to contracts/archive/infra/BeefyFeeBatch.sol diff --git a/contracts/BIFI/infra/BeefyFeeBatchV2.sol b/contracts/archive/infra/BeefyFeeBatchV2.sol similarity index 100% rename from contracts/BIFI/infra/BeefyFeeBatchV2.sol rename to contracts/archive/infra/BeefyFeeBatchV2.sol diff --git a/contracts/BIFI/infra/BeefyLaunchpool.sol b/contracts/archive/infra/BeefyLaunchpool.sol similarity index 100% rename from contracts/BIFI/infra/BeefyLaunchpool.sol rename to contracts/archive/infra/BeefyLaunchpool.sol diff --git a/contracts/BIFI/infra/BeefyVeRewardPool.sol b/contracts/archive/infra/BeefyVeRewardPool.sol similarity index 100% rename from contracts/BIFI/infra/BeefyVeRewardPool.sol rename to contracts/archive/infra/BeefyVeRewardPool.sol diff --git a/contracts/BIFI/interfaces/DFYN/IStakingRewards.sol b/contracts/archive/interfaces/DFYN/IStakingRewards.sol similarity index 100% rename from contracts/BIFI/interfaces/DFYN/IStakingRewards.sol rename to contracts/archive/interfaces/DFYN/IStakingRewards.sol diff --git a/contracts/BIFI/interfaces/alpaca/IAlpacaVault.sol b/contracts/archive/interfaces/alpaca/IAlpacaVault.sol similarity index 100% rename from contracts/BIFI/interfaces/alpaca/IAlpacaVault.sol rename to contracts/archive/interfaces/alpaca/IAlpacaVault.sol diff --git a/contracts/BIFI/interfaces/alpaca/IFairLaunch.sol b/contracts/archive/interfaces/alpaca/IFairLaunch.sol similarity index 100% rename from contracts/BIFI/interfaces/alpaca/IFairLaunch.sol rename to contracts/archive/interfaces/alpaca/IFairLaunch.sol diff --git a/contracts/BIFI/interfaces/beefy/IBurningStrategy.sol b/contracts/archive/interfaces/beefy/IBurningStrategy.sol similarity index 100% rename from contracts/BIFI/interfaces/beefy/IBurningStrategy.sol rename to contracts/archive/interfaces/beefy/IBurningStrategy.sol diff --git a/contracts/BIFI/interfaces/beefy/ISeededVault.sol b/contracts/archive/interfaces/beefy/ISeededVault.sol similarity index 100% rename from contracts/BIFI/interfaces/beefy/ISeededVault.sol rename to contracts/archive/interfaces/beefy/ISeededVault.sol diff --git a/contracts/BIFI/interfaces/beefy/IUpgradeableStrategy.sol b/contracts/archive/interfaces/beefy/IUpgradeableStrategy.sol similarity index 100% rename from contracts/BIFI/interfaces/beefy/IUpgradeableStrategy.sol rename to contracts/archive/interfaces/beefy/IUpgradeableStrategy.sol diff --git a/contracts/BIFI/interfaces/beefy/IVenusStrategy.sol b/contracts/archive/interfaces/beefy/IVenusStrategy.sol similarity index 100% rename from contracts/BIFI/interfaces/beefy/IVenusStrategy.sol rename to contracts/archive/interfaces/beefy/IVenusStrategy.sol diff --git a/contracts/BIFI/interfaces/beefy/IVenusStrategyBNB.sol b/contracts/archive/interfaces/beefy/IVenusStrategyBNB.sol similarity index 100% rename from contracts/BIFI/interfaces/beefy/IVenusStrategyBNB.sol rename to contracts/archive/interfaces/beefy/IVenusStrategyBNB.sol diff --git a/contracts/BIFI/interfaces/belt/IBeltLP.sol b/contracts/archive/interfaces/belt/IBeltLP.sol similarity index 100% rename from contracts/BIFI/interfaces/belt/IBeltLP.sol rename to contracts/archive/interfaces/belt/IBeltLP.sol diff --git a/contracts/BIFI/interfaces/belt/IBeltToken.sol b/contracts/archive/interfaces/belt/IBeltToken.sol similarity index 100% rename from contracts/BIFI/interfaces/belt/IBeltToken.sol rename to contracts/archive/interfaces/belt/IBeltToken.sol diff --git a/contracts/BIFI/interfaces/belt/IMasterBelt.sol b/contracts/archive/interfaces/belt/IMasterBelt.sol similarity index 100% rename from contracts/BIFI/interfaces/belt/IMasterBelt.sol rename to contracts/archive/interfaces/belt/IMasterBelt.sol diff --git a/contracts/BIFI/interfaces/binance/IRewardRegister.sol b/contracts/archive/interfaces/binance/IRewardRegister.sol similarity index 100% rename from contracts/BIFI/interfaces/binance/IRewardRegister.sol rename to contracts/archive/interfaces/binance/IRewardRegister.sol diff --git a/contracts/BIFI/interfaces/biswap/IBiswapChef.sol b/contracts/archive/interfaces/biswap/IBiswapChef.sol similarity index 100% rename from contracts/BIFI/interfaces/biswap/IBiswapChef.sol rename to contracts/archive/interfaces/biswap/IBiswapChef.sol diff --git a/contracts/BIFI/interfaces/biswap/IBiswapPair.sol b/contracts/archive/interfaces/biswap/IBiswapPair.sol similarity index 100% rename from contracts/BIFI/interfaces/biswap/IBiswapPair.sol rename to contracts/archive/interfaces/biswap/IBiswapPair.sol diff --git a/contracts/BIFI/interfaces/biswap/IBiswapRouter.sol b/contracts/archive/interfaces/biswap/IBiswapRouter.sol similarity index 100% rename from contracts/BIFI/interfaces/biswap/IBiswapRouter.sol rename to contracts/archive/interfaces/biswap/IBiswapRouter.sol diff --git a/contracts/BIFI/interfaces/common/IBar.sol b/contracts/archive/interfaces/common/IBar.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IBar.sol rename to contracts/archive/interfaces/common/IBar.sol diff --git a/contracts/BIFI/interfaces/common/ICommonRewarder.sol b/contracts/archive/interfaces/common/ICommonRewarder.sol similarity index 100% rename from contracts/BIFI/interfaces/common/ICommonRewarder.sol rename to contracts/archive/interfaces/common/ICommonRewarder.sol diff --git a/contracts/BIFI/interfaces/common/IFarm.sol b/contracts/archive/interfaces/common/IFarm.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IFarm.sol rename to contracts/archive/interfaces/common/IFarm.sol diff --git a/contracts/BIFI/interfaces/stellaswap/IMasterChef.sol b/contracts/archive/interfaces/common/IMasterChef.sol similarity index 100% rename from contracts/BIFI/interfaces/stellaswap/IMasterChef.sol rename to contracts/archive/interfaces/common/IMasterChef.sol diff --git a/contracts/BIFI/interfaces/common/IMasterChefReferrer.sol b/contracts/archive/interfaces/common/IMasterChefReferrer.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IMasterChefReferrer.sol rename to contracts/archive/interfaces/common/IMasterChefReferrer.sol diff --git a/contracts/BIFI/interfaces/common/IMultiFeeDistribution.sol b/contracts/archive/interfaces/common/IMultiFeeDistribution.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IMultiFeeDistribution.sol rename to contracts/archive/interfaces/common/IMultiFeeDistribution.sol diff --git a/contracts/BIFI/interfaces/common/IMultiRewardPool.sol b/contracts/archive/interfaces/common/IMultiRewardPool.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IMultiRewardPool.sol rename to contracts/archive/interfaces/common/IMultiRewardPool.sol diff --git a/contracts/BIFI/interfaces/common/IMultiRewards.sol b/contracts/archive/interfaces/common/IMultiRewards.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IMultiRewards.sol rename to contracts/archive/interfaces/common/IMultiRewards.sol diff --git a/contracts/BIFI/interfaces/common/IStakingDualRewards.sol b/contracts/archive/interfaces/common/IStakingDualRewards.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IStakingDualRewards.sol rename to contracts/archive/interfaces/common/IStakingDualRewards.sol diff --git a/contracts/BIFI/interfaces/common/IUniswapRouter.sol b/contracts/archive/interfaces/common/IUniswapRouter.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IUniswapRouter.sol rename to contracts/archive/interfaces/common/IUniswapRouter.sol diff --git a/contracts/BIFI/interfaces/common/IUniswapRouterAVAX.sol b/contracts/archive/interfaces/common/IUniswapRouterAVAX.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IUniswapRouterAVAX.sol rename to contracts/archive/interfaces/common/IUniswapRouterAVAX.sol diff --git a/contracts/BIFI/interfaces/common/IUniswapRouterBNB.sol b/contracts/archive/interfaces/common/IUniswapRouterBNB.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IUniswapRouterBNB.sol rename to contracts/archive/interfaces/common/IUniswapRouterBNB.sol diff --git a/contracts/BIFI/interfaces/common/IUniswapRouterMATIC.sol b/contracts/archive/interfaces/common/IUniswapRouterMATIC.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IUniswapRouterMATIC.sol rename to contracts/archive/interfaces/common/IUniswapRouterMATIC.sol diff --git a/contracts/BIFI/interfaces/common/IWBNB.sol b/contracts/archive/interfaces/common/IWBNB.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IWBNB.sol rename to contracts/archive/interfaces/common/IWBNB.sol diff --git a/contracts/BIFI/interfaces/common/IWMATIC.sol b/contracts/archive/interfaces/common/IWMATIC.sol similarity index 100% rename from contracts/BIFI/interfaces/common/IWMATIC.sol rename to contracts/archive/interfaces/common/IWMATIC.sol diff --git a/contracts/BIFI/interfaces/dfx/IDfxRouter.sol b/contracts/archive/interfaces/dfx/IDfxRouter.sol similarity index 100% rename from contracts/BIFI/interfaces/dfx/IDfxRouter.sol rename to contracts/archive/interfaces/dfx/IDfxRouter.sol diff --git a/contracts/BIFI/interfaces/finn/IFinnBar.sol b/contracts/archive/interfaces/finn/IFinnBar.sol similarity index 100% rename from contracts/BIFI/interfaces/finn/IFinnBar.sol rename to contracts/archive/interfaces/finn/IFinnBar.sol diff --git a/contracts/BIFI/interfaces/geist/IIncentivesController.sol b/contracts/archive/interfaces/geist/IIncentivesController.sol similarity index 100% rename from contracts/BIFI/interfaces/geist/IIncentivesController.sol rename to contracts/archive/interfaces/geist/IIncentivesController.sol diff --git a/contracts/BIFI/interfaces/geist/IMultiFeeDistributer.sol b/contracts/archive/interfaces/geist/IMultiFeeDistributer.sol similarity index 100% rename from contracts/BIFI/interfaces/geist/IMultiFeeDistributer.sol rename to contracts/archive/interfaces/geist/IMultiFeeDistributer.sol diff --git a/contracts/BIFI/interfaces/hector/IStakingRewards.sol b/contracts/archive/interfaces/hector/IStakingRewards.sol similarity index 100% rename from contracts/BIFI/interfaces/hector/IStakingRewards.sol rename to contracts/archive/interfaces/hector/IStakingRewards.sol diff --git a/contracts/BIFI/interfaces/kyber/IRewardsLocker.sol b/contracts/archive/interfaces/kyber/IRewardsLocker.sol similarity index 100% rename from contracts/BIFI/interfaces/kyber/IRewardsLocker.sol rename to contracts/archive/interfaces/kyber/IRewardsLocker.sol diff --git a/contracts/BIFI/interfaces/mdex/IMasterChef.sol b/contracts/archive/interfaces/mdex/IMasterChef.sol similarity index 100% rename from contracts/BIFI/interfaces/mdex/IMasterChef.sol rename to contracts/archive/interfaces/mdex/IMasterChef.sol diff --git a/contracts/BIFI/interfaces/mdex/IMdexRouter.sol b/contracts/archive/interfaces/mdex/IMdexRouter.sol similarity index 100% rename from contracts/BIFI/interfaces/mdex/IMdexRouter.sol rename to contracts/archive/interfaces/mdex/IMdexRouter.sol diff --git a/contracts/BIFI/interfaces/mdex/ISwapMining.sol b/contracts/archive/interfaces/mdex/ISwapMining.sol similarity index 100% rename from contracts/BIFI/interfaces/mdex/ISwapMining.sol rename to contracts/archive/interfaces/mdex/ISwapMining.sol diff --git a/contracts/BIFI/interfaces/pangolin/IPangolinMiniChef.sol b/contracts/archive/interfaces/pangolin/IPangolinMiniChef.sol similarity index 100% rename from contracts/BIFI/interfaces/pangolin/IPangolinMiniChef.sol rename to contracts/archive/interfaces/pangolin/IPangolinMiniChef.sol diff --git a/contracts/BIFI/interfaces/pangolin/IPangolinRewarder.sol b/contracts/archive/interfaces/pangolin/IPangolinRewarder.sol similarity index 100% rename from contracts/BIFI/interfaces/pangolin/IPangolinRewarder.sol rename to contracts/archive/interfaces/pangolin/IPangolinRewarder.sol diff --git a/contracts/BIFI/interfaces/pangolin/IStakingRewards.sol b/contracts/archive/interfaces/pangolin/IStakingRewards.sol similarity index 100% rename from contracts/BIFI/interfaces/pangolin/IStakingRewards.sol rename to contracts/archive/interfaces/pangolin/IStakingRewards.sol diff --git a/contracts/BIFI/interfaces/quick/IDragonsLair.sol b/contracts/archive/interfaces/quick/IDragonsLair.sol similarity index 100% rename from contracts/BIFI/interfaces/quick/IDragonsLair.sol rename to contracts/archive/interfaces/quick/IDragonsLair.sol diff --git a/contracts/BIFI/interfaces/quick/IQuickConverter.sol b/contracts/archive/interfaces/quick/IQuickConverter.sol similarity index 100% rename from contracts/BIFI/interfaces/quick/IQuickConverter.sol rename to contracts/archive/interfaces/quick/IQuickConverter.sol diff --git a/contracts/BIFI/interfaces/quick/IQuickDualRewards.sol b/contracts/archive/interfaces/quick/IQuickDualRewards.sol similarity index 100% rename from contracts/BIFI/interfaces/quick/IQuickDualRewards.sol rename to contracts/archive/interfaces/quick/IQuickDualRewards.sol diff --git a/contracts/BIFI/interfaces/quick/IRewardPool.sol b/contracts/archive/interfaces/quick/IRewardPool.sol similarity index 100% rename from contracts/BIFI/interfaces/quick/IRewardPool.sol rename to contracts/archive/interfaces/quick/IRewardPool.sol diff --git a/contracts/BIFI/interfaces/scream/ISteakHouse.sol b/contracts/archive/interfaces/scream/ISteakHouse.sol similarity index 100% rename from contracts/BIFI/interfaces/scream/ISteakHouse.sol rename to contracts/archive/interfaces/scream/ISteakHouse.sol diff --git a/contracts/BIFI/interfaces/scream/IXPool.sol b/contracts/archive/interfaces/scream/IXPool.sol similarity index 100% rename from contracts/BIFI/interfaces/scream/IXPool.sol rename to contracts/archive/interfaces/scream/IXPool.sol diff --git a/contracts/BIFI/interfaces/solace/ISolaceRewards.sol b/contracts/archive/interfaces/solace/ISolaceRewards.sol similarity index 100% rename from contracts/BIFI/interfaces/solace/ISolaceRewards.sol rename to contracts/archive/interfaces/solace/ISolaceRewards.sol diff --git a/contracts/BIFI/interfaces/solace/IxLocker.sol b/contracts/archive/interfaces/solace/IxLocker.sol similarity index 100% rename from contracts/BIFI/interfaces/solace/IxLocker.sol rename to contracts/archive/interfaces/solace/IxLocker.sol diff --git a/contracts/BIFI/interfaces/solar/ISolarRouter.sol b/contracts/archive/interfaces/solar/ISolarRouter.sol similarity index 100% rename from contracts/BIFI/interfaces/solar/ISolarRouter.sol rename to contracts/archive/interfaces/solar/ISolarRouter.sol diff --git a/contracts/BIFI/interfaces/solar/ISolarStableRouter.sol b/contracts/archive/interfaces/solar/ISolarStableRouter.sol similarity index 100% rename from contracts/BIFI/interfaces/solar/ISolarStableRouter.sol rename to contracts/archive/interfaces/solar/ISolarStableRouter.sol diff --git a/contracts/BIFI/interfaces/solar/IUniswapRouterSolar.sol b/contracts/archive/interfaces/solar/IUniswapRouterSolar.sol similarity index 100% rename from contracts/BIFI/interfaces/solar/IUniswapRouterSolar.sol rename to contracts/archive/interfaces/solar/IUniswapRouterSolar.sol diff --git a/contracts/BIFI/interfaces/spirit/IMasterChef.sol b/contracts/archive/interfaces/spirit/IMasterChef.sol similarity index 100% rename from contracts/BIFI/interfaces/spirit/IMasterChef.sol rename to contracts/archive/interfaces/spirit/IMasterChef.sol diff --git a/contracts/BIFI/interfaces/tomb/IMasonry.sol b/contracts/archive/interfaces/tomb/IMasonry.sol similarity index 100% rename from contracts/BIFI/interfaces/tomb/IMasonry.sol rename to contracts/archive/interfaces/tomb/IMasonry.sol diff --git a/contracts/BIFI/interfaces/tri/ITriChef.sol b/contracts/archive/interfaces/tri/ITriChef.sol similarity index 100% rename from contracts/BIFI/interfaces/tri/ITriChef.sol rename to contracts/archive/interfaces/tri/ITriChef.sol diff --git a/contracts/BIFI/interfaces/tri/ITriRewarder.sol b/contracts/archive/interfaces/tri/ITriRewarder.sol similarity index 100% rename from contracts/BIFI/interfaces/tri/ITriRewarder.sol rename to contracts/archive/interfaces/tri/ITriRewarder.sol diff --git a/contracts/BIFI/interfaces/valleyswap/IValleySwapFarm.sol b/contracts/archive/interfaces/valleyswap/IValleySwapFarm.sol similarity index 100% rename from contracts/BIFI/interfaces/valleyswap/IValleySwapFarm.sol rename to contracts/archive/interfaces/valleyswap/IValleySwapFarm.sol diff --git a/contracts/BIFI/interfaces/valleyswap/IValleySwapLibrary.sol b/contracts/archive/interfaces/valleyswap/IValleySwapLibrary.sol similarity index 100% rename from contracts/BIFI/interfaces/valleyswap/IValleySwapLibrary.sol rename to contracts/archive/interfaces/valleyswap/IValleySwapLibrary.sol diff --git a/contracts/BIFI/interfaces/valleyswap/IValleySwapRouter.sol b/contracts/archive/interfaces/valleyswap/IValleySwapRouter.sol similarity index 100% rename from contracts/BIFI/interfaces/valleyswap/IValleySwapRouter.sol rename to contracts/archive/interfaces/valleyswap/IValleySwapRouter.sol diff --git a/contracts/BIFI/interfaces/vvs/ICraftsmanV2.sol b/contracts/archive/interfaces/vvs/ICraftsmanV2.sol similarity index 100% rename from contracts/BIFI/interfaces/vvs/ICraftsmanV2.sol rename to contracts/archive/interfaces/vvs/ICraftsmanV2.sol diff --git a/contracts/BIFI/interfaces/vvs/IVVSRewarder.sol b/contracts/archive/interfaces/vvs/IVVSRewarder.sol similarity index 100% rename from contracts/BIFI/interfaces/vvs/IVVSRewarder.sol rename to contracts/archive/interfaces/vvs/IVVSRewarder.sol diff --git a/contracts/BIFI/interfaces/yuzu/IYuzuMasterChef.sol b/contracts/archive/interfaces/yuzu/IYuzuMasterChef.sol similarity index 100% rename from contracts/BIFI/interfaces/yuzu/IYuzuMasterChef.sol rename to contracts/archive/interfaces/yuzu/IYuzuMasterChef.sol diff --git a/contracts/BIFI/interfaces/yuzu/IYuzuSwapMining.sol b/contracts/archive/interfaces/yuzu/IYuzuSwapMining.sol similarity index 100% rename from contracts/BIFI/interfaces/yuzu/IYuzuSwapMining.sol rename to contracts/archive/interfaces/yuzu/IYuzuSwapMining.sol diff --git a/contracts/archive/strategies/Aave/StrategyAave.sol b/contracts/archive/strategies/Aave/StrategyAave.sol index 9f9136f3..7fe2b1d8 100644 --- a/contracts/archive/strategies/Aave/StrategyAave.sol +++ b/contracts/archive/strategies/Aave/StrategyAave.sol @@ -9,7 +9,7 @@ import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; import "../../interfaces/aave/IDataProvider.sol"; -import "../../interfaces/aave/IIncentivesController.sol"; +import "../../interfaces/aave/IAaveV3Incentives.sol"; import "../../interfaces/aave/ILendingPool.sol"; import "../../interfaces/common/IUniswapRouterETH.sol"; import "../Common/FeeManager.sol"; @@ -20,19 +20,21 @@ contract StrategyAave is StratManager, FeeManager { using SafeMath for uint256; // Tokens used - address constant public wmatic = address(0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270); - address constant public eth = address(0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619); + address public native; address public want; address public aToken; address public varDebtToken; // Third party contracts - address constant public dataProvider = address(0x7551b5D2763519d4e37e8B81929D336De671d46d); - address constant public lendingPool = address(0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf); - address constant public incentivesController = address(0x357D51124f59836DeD84c8a1730D72B749d8BC23); + address public dataProvider; + address public lendingPool; + address public incentivesController; // Routes - address[] public wmaticToWantRoute; + address[] public nativeToWantRoute; + + bool public harvestOnDeposit; + uint256 public lastHarvest; /** * @dev Variables that can be changed to config profitability and risk: @@ -52,22 +54,31 @@ contract StrategyAave is StratManager, FeeManager { /** * @dev Helps to differentiate borrowed funds that shouldn't be used in functions like 'deposit()' - * as they're required to deleverage correctly. + * as they're required to deleverage correctly. */ uint256 public reserves = 0; /** * @dev Events that the contract emits */ - event StratHarvest(address indexed harvester); + event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl); + event Deposit(uint256 tvl); + event Withdraw(uint256 tvl); + event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees); event StratRebalance(uint256 _borrowRate, uint256 _borrowDepth); + event SetEMode(uint8 eMode, uint256 borrowRateMax, uint256 borrowRate, uint256 borrowDepth); constructor( address _want, + address _native, uint256 _borrowRate, uint256 _borrowRateMax, uint256 _borrowDepth, uint256 _minLeverage, + uint8 _eMode, + address _dataProvider, + address _lendingPool, + address _incentivesController, address _vault, address _unirouter, address _keeper, @@ -75,19 +86,24 @@ contract StrategyAave is StratManager, FeeManager { address _beefyFeeRecipient ) StratManager(_keeper, _strategist, _unirouter, _vault, _beefyFeeRecipient) public { want = _want; - (aToken,,varDebtToken) = IDataProvider(dataProvider).getReserveTokensAddresses(want); + native = _native; borrowRate = _borrowRate; borrowRateMax = _borrowRateMax; borrowDepth = _borrowDepth; minLeverage = _minLeverage; + dataProvider = _dataProvider; + lendingPool = _lendingPool; + incentivesController = _incentivesController; + + (aToken,,varDebtToken) = IDataProvider(dataProvider).getReserveTokensAddresses(want); - if (want == eth) { - wmaticToWantRoute = [wmatic, eth]; - } else if (want != wmatic) { - wmaticToWantRoute = [wmatic, eth, want]; + if (_eMode != 0) { + ILendingPool(lendingPool).setUserEMode(_eMode); } + nativeToWantRoute = [native, want]; + _giveAllowances(); } @@ -97,6 +113,7 @@ contract StrategyAave is StratManager, FeeManager { if (wantBal > 0) { _leverage(wantBal); + emit Deposit(balanceOf()); } } @@ -110,20 +127,21 @@ contract StrategyAave is StratManager, FeeManager { for (uint i = 0; i < borrowDepth; i++) { ILendingPool(lendingPool).deposit(want, _amount, address(this), 0); _amount = _amount.mul(borrowRate).div(100); - ILendingPool(lendingPool).borrow(want, _amount, INTEREST_RATE_MODE, 0, address(this)); + if (_amount > 0) { + ILendingPool(lendingPool).borrow(want, _amount, INTEREST_RATE_MODE, 0, address(this)); + } } reserves = reserves.add(_amount); } - /** * @dev Incrementally alternates between paying part of the debt and withdrawing part of the supplied * collateral. Continues to do this until it repays the entire debt and withdraws all the supplied {want} * from the system */ function _deleverage() internal { - uint256 wantBal = IERC20(want).balanceOf(address(this)); + uint256 wantBal = balanceOfWant(); (uint256 supplyBal, uint256 borrowBal) = userReserves(); while (wantBal < borrowBal) { @@ -133,11 +151,15 @@ contract StrategyAave is StratManager, FeeManager { uint256 targetSupply = borrowBal.mul(100).div(borrowRate); ILendingPool(lendingPool).withdraw(want, supplyBal.sub(targetSupply), address(this)); - wantBal = IERC20(want).balanceOf(address(this)); + wantBal = balanceOfWant(); } - ILendingPool(lendingPool).repay(want, uint256(-1), INTEREST_RATE_MODE, address(this)); - ILendingPool(lendingPool).withdraw(want, type(uint).max, address(this)); + if (borrowBal > 0) { + ILendingPool(lendingPool).repay(want, uint256(-1), INTEREST_RATE_MODE, address(this)); + } + if (supplyBal > 0) { + ILendingPool(lendingPool).withdraw(want, type(uint).max, address(this)); + } reserves = 0; } @@ -151,16 +173,19 @@ contract StrategyAave is StratManager, FeeManager { function deleverageOnce(uint _borrowRate) external onlyManager { require(_borrowRate <= borrowRateMax, "!safe"); - uint256 wantBal = IERC20(want).balanceOf(address(this)); - ILendingPool(lendingPool).repay(want, wantBal, INTEREST_RATE_MODE, address(this)); + uint256 wantBal = balanceOfWant(); + if (wantBal > 0) { + ILendingPool(lendingPool).repay(want, wantBal, INTEREST_RATE_MODE, address(this)); + } (uint256 supplyBal, uint256 borrowBal) = userReserves(); uint256 targetSupply = borrowBal.mul(100).div(_borrowRate); - ILendingPool(lendingPool).withdraw(want, supplyBal.sub(targetSupply), address(this)); + if (supplyBal.sub(targetSupply) > 0) { + ILendingPool(lendingPool).withdraw(want, supplyBal.sub(targetSupply), address(this)); + } - wantBal = IERC20(want).balanceOf(address(this)); - reserves = wantBal; + reserves = balanceOfWant(); } /** @@ -176,44 +201,70 @@ contract StrategyAave is StratManager, FeeManager { borrowRate = _borrowRate; borrowDepth = _borrowDepth; - uint256 wantBal = IERC20(want).balanceOf(address(this)); + uint256 wantBal = balanceOfWant(); _leverage(wantBal); - StratRebalance(_borrowRate, _borrowDepth); + emit StratRebalance(_borrowRate, _borrowDepth); + } + + function beforeDeposit() external override { + if (harvestOnDeposit) { + require(msg.sender == vault, "!vault"); + _harvest(tx.origin); + } + } + + function harvest() external virtual { + _harvest(tx.origin); + } + + function harvest(address callFeeRecipient) external virtual { + _harvest(callFeeRecipient); + } + + function managerHarvest() external onlyManager { + _harvest(tx.origin); } // compounds earnings and charges performance fee - function harvest() external whenNotPaused { + function _harvest(address callFeeRecipient) internal whenNotPaused { address[] memory assets = new address[](2); assets[0] = aToken; assets[1] = varDebtToken; - IIncentivesController(incentivesController).claimRewards(assets, type(uint).max, address(this)); + IAaveV3Incentives(incentivesController).claimRewards(assets, type(uint).max, address(this), native); - chargeFees(); - swapRewards(); - deposit(); + uint256 nativeBal = IERC20(native).balanceOf(address(this)); + if (nativeBal > 0) { + chargeFees(callFeeRecipient); + swapRewards(); + uint256 wantHarvested = availableWant(); + deposit(); - emit StratHarvest(msg.sender); + lastHarvest = block.timestamp; + emit StratHarvest(msg.sender, wantHarvested, balanceOf()); + } } // performance fees - function chargeFees() internal { - uint256 wmaticFeeBal = IERC20(wmatic).balanceOf(address(this)).mul(45).div(1000); + function chargeFees(address callFeeRecipient) internal { + uint256 nativeFeeBal = IERC20(native).balanceOf(address(this)).mul(45).div(1000); + + uint256 callFeeAmount = nativeFeeBal.mul(callFee).div(MAX_FEE); + IERC20(native).safeTransfer(callFeeRecipient, callFeeAmount); - uint256 callFeeAmount = wmaticFeeBal.mul(callFee).div(MAX_FEE); - IERC20(wmatic).safeTransfer(tx.origin, callFeeAmount); + uint256 beefyFeeAmount = nativeFeeBal.mul(beefyFee).div(MAX_FEE); + IERC20(native).safeTransfer(beefyFeeRecipient, beefyFeeAmount); - uint256 beefyFeeAmount = wmaticFeeBal.mul(beefyFee).div(MAX_FEE); - IERC20(wmatic).safeTransfer(beefyFeeRecipient, beefyFeeAmount); + uint256 strategistFeeAmount = nativeFeeBal.mul(STRATEGIST_FEE).div(MAX_FEE); + IERC20(native).safeTransfer(strategist, strategistFeeAmount); - uint256 strategistFee = wmaticFeeBal.mul(STRATEGIST_FEE).div(MAX_FEE); - IERC20(wmatic).safeTransfer(strategist, strategistFee); + emit ChargedFees(callFeeAmount, beefyFeeAmount, strategistFeeAmount); } // swap rewards to {want} function swapRewards() internal { - uint256 wmaticBal = IERC20(wmatic).balanceOf(address(this)); - IUniswapRouterETH(unirouter).swapExactTokensForTokens(wmaticBal, 0, wmaticToWantRoute, address(this), now); + uint256 nativeBal = IERC20(native).balanceOf(address(this)); + IUniswapRouterETH(unirouter).swapExactTokensForTokens(nativeBal, 0, nativeToWantRoute, address(this), now); } /** @@ -225,23 +276,23 @@ contract StrategyAave is StratManager, FeeManager { require(msg.sender == vault, "!vault"); uint256 wantBal = availableWant(); - if (wantBal < _amount) { _deleverage(); - wantBal = IERC20(want).balanceOf(address(this)); + wantBal = balanceOfWant(); } if (wantBal > _amount) { wantBal = _amount; } - if (tx.origin == owner() || paused()) { - IERC20(want).safeTransfer(vault, wantBal); - } else { + if (tx.origin != owner() && !paused()) { uint256 withdrawalFeeAmount = wantBal.mul(withdrawalFee).div(WITHDRAWAL_MAX); - IERC20(want).safeTransfer(vault, wantBal.sub(withdrawalFeeAmount)); + wantBal = wantBal.sub(withdrawalFeeAmount); } + IERC20(want).safeTransfer(vault, wantBal); + emit Withdraw(balanceOf()); + if (!paused()) { _leverage(availableWant()); } @@ -252,8 +303,7 @@ contract StrategyAave is StratManager, FeeManager { * @return how much {want} the contract holds without reserves */ function availableWant() public view returns (uint256) { - uint256 wantBal = IERC20(want).balanceOf(address(this)); - return wantBal.sub(reserves); + return balanceOfWant().sub(reserves); } // return supply and borrow balance @@ -290,13 +340,66 @@ contract StrategyAave is StratManager, FeeManager { return supplyBal.sub(borrowBal); } + function nativeToWant() public view returns (address[] memory) { + return nativeToWantRoute; + } + + // returns rewards unharvested + function rewardsAvailable() public view returns (uint256) { + address[] memory assets = new address[](2); + assets[0] = aToken; + assets[1] = varDebtToken; + return IAaveV3Incentives(incentivesController).getUserRewards(assets, address(this), native); + } + + // native reward amount for calling harvest + function callReward() public view returns (uint256) { + return rewardsAvailable().mul(45).div(1000).mul(callFee).div(MAX_FEE); + } + + // returns strategy's eMode + function eMode() external view returns (uint256) { + return ILendingPool(lendingPool).getUserEMode(address(this)); + } + + // set strategy to a new eMode and set borrowRateMax to the loan-to-value of the new eMode category + function setEMode(uint8 _eMode, uint256 _borrowRateMax, uint256 _borrowRate, uint256 _borrowDepth) external onlyManager { + _deleverage(); + ILendingPool(lendingPool).setUserEMode(_eMode); + + if (_eMode != 0) { + (uint16 ltv,,,,) = ILendingPool(lendingPool).getEModeCategoryData(_eMode); + borrowRateMax = uint256(ltv).div(100); + } else { + borrowRateMax = _borrowRateMax; + } + + require(_borrowRate <= borrowRateMax, "!rate"); + require(_borrowDepth <= BORROW_DEPTH_MAX, "!depth"); + borrowRate = _borrowRate; + borrowDepth = _borrowDepth; + + _leverage(balanceOfWant()); + + emit SetEMode(_eMode, borrowRateMax, borrowRate, borrowDepth); + } + + function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager { + harvestOnDeposit = _harvestOnDeposit; + if (harvestOnDeposit) { + setWithdrawalFee(0); + } else { + setWithdrawalFee(10); + } + } + // called as part of strat migration. Sends all the available funds back to the vault. function retireStrat() external { require(msg.sender == vault, "!vault"); _deleverage(); - uint256 wantBal = IERC20(want).balanceOf(address(this)); + uint256 wantBal = balanceOfWant(); IERC20(want).transfer(vault, wantBal); } @@ -322,11 +425,11 @@ contract StrategyAave is StratManager, FeeManager { function _giveAllowances() internal { IERC20(want).safeApprove(lendingPool, uint256(-1)); - IERC20(wmatic).safeApprove(unirouter, uint256(-1)); + IERC20(native).safeApprove(unirouter, uint256(-1)); } function _removeAllowances() internal { IERC20(want).safeApprove(lendingPool, 0); - IERC20(wmatic).safeApprove(unirouter, 0); + IERC20(native).safeApprove(unirouter, 0); } -} \ No newline at end of file +} \ No newline at end of file diff --git a/contracts/BIFI/strategies/Aave/StrategyAaveNative.sol b/contracts/archive/strategies/Aave/StrategyAaveNative.sol similarity index 100% rename from contracts/BIFI/strategies/Aave/StrategyAaveNative.sol rename to contracts/archive/strategies/Aave/StrategyAaveNative.sol diff --git a/contracts/archive/strategies/Aave/StrategyAaveSupplyOnly.sol b/contracts/archive/strategies/Aave/StrategyAaveSupplyOnly.sol index 92750a53..b88fec91 100644 --- a/contracts/archive/strategies/Aave/StrategyAaveSupplyOnly.sol +++ b/contracts/archive/strategies/Aave/StrategyAaveSupplyOnly.sol @@ -9,7 +9,7 @@ import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; import "../../interfaces/aave/IDataProvider.sol"; -import "../../interfaces/aave/IIncentivesController.sol"; +import "../../interfaces/aave/IAaveV3Incentives.sol"; import "../../interfaces/aave/ILendingPool.sol"; import "../../interfaces/common/IUniswapRouterETH.sol"; import "../Common/FeeManager.sol"; @@ -20,26 +20,32 @@ contract StrategyAaveSupplyOnly is StratManager, FeeManager { using SafeMath for uint256; // Tokens used - address constant public wmatic = address(0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270); - address constant public eth = address(0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619); + address public native; address public want; address public aToken; // Third party contracts - address constant public dataProvider = address(0x7551b5D2763519d4e37e8B81929D336De671d46d); - address constant public lendingPool = address(0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf); - address constant public incentivesController = address(0x357D51124f59836DeD84c8a1730D72B749d8BC23); + address public dataProvider; + address public lendingPool; + address public incentivesController; // Routes - address[] public wmaticToWantRoute; + address[] public nativeToWantRoute; - /** - * @dev Events that the contract emits - */ - event StratHarvest(address indexed harvester); + bool public harvestOnDeposit; + uint256 public lastHarvest; + + event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl); + event Deposit(uint256 tvl); + event Withdraw(uint256 tvl); + event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees); constructor( address _want, + address _native, + address _dataProvider, + address _lendingPool, + address _incentivesController, address _vault, address _unirouter, address _keeper, @@ -47,79 +53,108 @@ contract StrategyAaveSupplyOnly is StratManager, FeeManager { address _beefyFeeRecipient ) StratManager(_keeper, _strategist, _unirouter, _vault, _beefyFeeRecipient) public { want = _want; + native = _native; + + dataProvider = _dataProvider; + lendingPool = _lendingPool; + incentivesController = _incentivesController; + (aToken,,) = IDataProvider(dataProvider).getReserveTokensAddresses(want); - if (want == eth) { - wmaticToWantRoute = [wmatic, eth]; - } else if (want != wmatic) { - wmaticToWantRoute = [wmatic, eth, want]; - } + nativeToWantRoute = [native, want]; _giveAllowances(); } // puts the funds to work function deposit() public whenNotPaused { - uint256 wantBal = IERC20(want).balanceOf(address(this)); + uint256 wantBal = balanceOfWant(); if (wantBal > 0) { ILendingPool(lendingPool).deposit(want, wantBal, address(this), 0); + emit Deposit(balanceOf()); } } function withdraw(uint256 _amount) external { require(msg.sender == vault, "!vault"); - uint256 wantBal = IERC20(want).balanceOf(address(this)); - + uint256 wantBal = balanceOfWant(); if (wantBal < _amount) { ILendingPool(lendingPool).withdraw(want, _amount.sub(wantBal), address(this)); - wantBal = IERC20(want).balanceOf(address(this)); + wantBal = balanceOfWant(); } if (wantBal > _amount) { wantBal = _amount; } - if (tx.origin == owner() || paused()) { - IERC20(want).safeTransfer(vault, wantBal); - } else { + if (tx.origin != owner() && !paused()) { uint256 withdrawalFeeAmount = wantBal.mul(withdrawalFee).div(WITHDRAWAL_MAX); - IERC20(want).safeTransfer(vault, wantBal.sub(withdrawalFeeAmount)); + wantBal = wantBal.sub(withdrawalFeeAmount); + } + + IERC20(want).safeTransfer(vault, wantBal); + emit Withdraw(balanceOf()); + } + + function beforeDeposit() external override { + if (harvestOnDeposit) { + require(msg.sender == vault, "!vault"); + _harvest(tx.origin); } } + function harvest() external virtual { + _harvest(tx.origin); + } + + function harvest(address callFeeRecipient) external virtual { + _harvest(callFeeRecipient); + } + + function managerHarvest() external onlyManager { + _harvest(tx.origin); + } + // compounds earnings and charges performance fee - function harvest() external whenNotPaused { + function _harvest(address callFeeRecipient) internal whenNotPaused { address[] memory assets = new address[](1); assets[0] = aToken; - IIncentivesController(incentivesController).claimRewards(assets, type(uint).max, address(this)); + IAaveV3Incentives(incentivesController).claimRewards(assets, type(uint).max, address(this), native); - chargeFees(); - swapRewards(); - deposit(); + uint256 nativeBal = IERC20(native).balanceOf(address(this)); + if (nativeBal > 0) { + chargeFees(callFeeRecipient); + swapRewards(); + uint256 wantHarvested = balanceOfWant(); + deposit(); - emit StratHarvest(msg.sender); + lastHarvest = block.timestamp; + emit StratHarvest(msg.sender, wantHarvested, balanceOf()); + } } // performance fees - function chargeFees() internal { - uint256 wmaticFeeBal = IERC20(wmatic).balanceOf(address(this)).mul(45).div(1000); + function chargeFees(address callFeeRecipient) internal { + uint256 nativeFeeBal = IERC20(native).balanceOf(address(this)).mul(45).div(1000); - uint256 callFeeAmount = wmaticFeeBal.mul(callFee).div(MAX_FEE); - IERC20(wmatic).safeTransfer(tx.origin, callFeeAmount); + uint256 callFeeAmount = nativeFeeBal.mul(callFee).div(MAX_FEE); + IERC20(native).safeTransfer(callFeeRecipient, callFeeAmount); - uint256 beefyFeeAmount = wmaticFeeBal.mul(beefyFee).div(MAX_FEE); - IERC20(wmatic).safeTransfer(beefyFeeRecipient, beefyFeeAmount); + uint256 beefyFeeAmount = nativeFeeBal.mul(beefyFee).div(MAX_FEE); + IERC20(native).safeTransfer(beefyFeeRecipient, beefyFeeAmount); - uint256 strategistFee = wmaticFeeBal.mul(STRATEGIST_FEE).div(MAX_FEE); - IERC20(wmatic).safeTransfer(strategist, strategistFee); + uint256 strategistFeeAmount = nativeFeeBal.mul(STRATEGIST_FEE).div(MAX_FEE); + IERC20(native).safeTransfer(strategist, strategistFeeAmount); + + emit ChargedFees(callFeeAmount, beefyFeeAmount, strategistFeeAmount); } // swap rewards to {want} function swapRewards() internal { - uint256 wmaticBal = IERC20(wmatic).balanceOf(address(this)); - IUniswapRouterETH(unirouter).swapExactTokensForTokens(wmaticBal, 0, wmaticToWantRoute, address(this), now); + uint256 nativeBal = IERC20(native).balanceOf(address(this)); + IUniswapRouterETH(unirouter).swapExactTokensForTokens(nativeBal, 0, nativeToWantRoute, address(this), now); } // return supply and borrow balance @@ -156,13 +191,38 @@ contract StrategyAaveSupplyOnly is StratManager, FeeManager { return supplyBal.sub(borrowBal); } + function nativeToWant() public view returns (address[] memory) { + return nativeToWantRoute; + } + + // returns rewards unharvested + function rewardsAvailable() public view returns (uint256) { + address[] memory assets = new address[](1); + assets[0] = aToken; + return IAaveV3Incentives(incentivesController).getUserRewards(assets, address(this), native); + } + + // native reward amount for calling harvest + function callReward() public view returns (uint256) { + return rewardsAvailable().mul(45).div(1000).mul(callFee).div(MAX_FEE); + } + + function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager { + harvestOnDeposit = _harvestOnDeposit; + if (harvestOnDeposit) { + setWithdrawalFee(0); + } else { + setWithdrawalFee(10); + } + } + // called as part of strat migration. Sends all the available funds back to the vault. function retireStrat() external { require(msg.sender == vault, "!vault"); ILendingPool(lendingPool).withdraw(want, type(uint).max, address(this)); - uint256 wantBal = IERC20(want).balanceOf(address(this)); + uint256 wantBal = balanceOfWant(); IERC20(want).transfer(vault, wantBal); } @@ -188,11 +248,11 @@ contract StrategyAaveSupplyOnly is StratManager, FeeManager { function _giveAllowances() internal { IERC20(want).safeApprove(lendingPool, uint256(-1)); - IERC20(wmatic).safeApprove(unirouter, uint256(-1)); + IERC20(native).safeApprove(unirouter, uint256(-1)); } function _removeAllowances() internal { IERC20(want).safeApprove(lendingPool, 0); - IERC20(wmatic).safeApprove(unirouter, 0); + IERC20(native).safeApprove(unirouter, 0); } -} \ No newline at end of file +} \ No newline at end of file diff --git a/contracts/BIFI/strategies/Alpaca/StrategyAlpacaVault.sol b/contracts/archive/strategies/Alpaca/StrategyAlpacaVault.sol similarity index 100% rename from contracts/BIFI/strategies/Alpaca/StrategyAlpacaVault.sol rename to contracts/archive/strategies/Alpaca/StrategyAlpacaVault.sol diff --git a/contracts/BIFI/strategies/Ape/StrategyJungleChefLP.sol b/contracts/archive/strategies/Ape/StrategyJungleChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Ape/StrategyJungleChefLP.sol rename to contracts/archive/strategies/Ape/StrategyJungleChefLP.sol diff --git a/contracts/BIFI/strategies/Aurora/StrategyAuroraChefLP.sol b/contracts/archive/strategies/Aurora/StrategyAuroraChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Aurora/StrategyAuroraChefLP.sol rename to contracts/archive/strategies/Aurora/StrategyAuroraChefLP.sol diff --git a/contracts/BIFI/strategies/Aurora/StrategyRoseLP.sol b/contracts/archive/strategies/Aurora/StrategyRoseLP.sol similarity index 100% rename from contracts/BIFI/strategies/Aurora/StrategyRoseLP.sol rename to contracts/archive/strategies/Aurora/StrategyRoseLP.sol diff --git a/contracts/BIFI/strategies/Aurora/StrategyRoseUSTLP.sol b/contracts/archive/strategies/Aurora/StrategyRoseUSTLP.sol similarity index 100% rename from contracts/BIFI/strategies/Aurora/StrategyRoseUSTLP.sol rename to contracts/archive/strategies/Aurora/StrategyRoseUSTLP.sol diff --git a/contracts/BIFI/strategies/Aurora/StrategyTriMiniChefDualLP.sol b/contracts/archive/strategies/Aurora/StrategyTriMiniChefDualLP.sol similarity index 100% rename from contracts/BIFI/strategies/Aurora/StrategyTriMiniChefDualLP.sol rename to contracts/archive/strategies/Aurora/StrategyTriMiniChefDualLP.sol diff --git a/contracts/BIFI/strategies/Aurora/StrategyTriMiniChefDualStable.sol b/contracts/archive/strategies/Aurora/StrategyTriMiniChefDualStable.sol similarity index 100% rename from contracts/BIFI/strategies/Aurora/StrategyTriMiniChefDualStable.sol rename to contracts/archive/strategies/Aurora/StrategyTriMiniChefDualStable.sol diff --git a/contracts/BIFI/strategies/Aurora/StrategyTriMiniChefLP.sol b/contracts/archive/strategies/Aurora/StrategyTriMiniChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Aurora/StrategyTriMiniChefLP.sol rename to contracts/archive/strategies/Aurora/StrategyTriMiniChefLP.sol diff --git a/contracts/BIFI/strategies/BIFI/StrategyBifiMaxi.sol b/contracts/archive/strategies/BIFI/StrategyBifiMaxi.sol similarity index 100% rename from contracts/BIFI/strategies/BIFI/StrategyBifiMaxi.sol rename to contracts/archive/strategies/BIFI/StrategyBifiMaxi.sol diff --git a/contracts/BIFI/strategies/BIFI/StrategyBifiMaxiLowGas.sol b/contracts/archive/strategies/BIFI/StrategyBifiMaxiLowGas.sol similarity index 100% rename from contracts/BIFI/strategies/BIFI/StrategyBifiMaxiLowGas.sol rename to contracts/archive/strategies/BIFI/StrategyBifiMaxiLowGas.sol diff --git a/contracts/BIFI/strategies/BIFI/StrategyBifiMaxiV2.sol b/contracts/archive/strategies/BIFI/StrategyBifiMaxiV2.sol similarity index 100% rename from contracts/BIFI/strategies/BIFI/StrategyBifiMaxiV2.sol rename to contracts/archive/strategies/BIFI/StrategyBifiMaxiV2.sol diff --git a/contracts/BIFI/strategies/BIFI/StrategyBifiMaxiV3.sol b/contracts/archive/strategies/BIFI/StrategyBifiMaxiV3.sol similarity index 100% rename from contracts/BIFI/strategies/BIFI/StrategyBifiMaxiV3.sol rename to contracts/archive/strategies/BIFI/StrategyBifiMaxiV3.sol diff --git a/contracts/BIFI/strategies/BIFI/StrategyBifiMaxiV4.sol b/contracts/archive/strategies/BIFI/StrategyBifiMaxiV4.sol similarity index 100% rename from contracts/BIFI/strategies/BIFI/StrategyBifiMaxiV4.sol rename to contracts/archive/strategies/BIFI/StrategyBifiMaxiV4.sol diff --git a/contracts/BIFI/strategies/Beamswap/StrategyBeamswapStable.sol b/contracts/archive/strategies/Beamswap/StrategyBeamswapStable.sol similarity index 100% rename from contracts/BIFI/strategies/Beamswap/StrategyBeamswapStable.sol rename to contracts/archive/strategies/Beamswap/StrategyBeamswapStable.sol diff --git a/contracts/BIFI/strategies/Beethovenx/MaiStrategyBeethovenx.sol b/contracts/archive/strategies/Beethovenx/MaiStrategyBeethovenx.sol similarity index 100% rename from contracts/BIFI/strategies/Beethovenx/MaiStrategyBeethovenx.sol rename to contracts/archive/strategies/Beethovenx/MaiStrategyBeethovenx.sol diff --git a/contracts/BIFI/strategies/Beethovenx/StrategyBeethovenx.sol b/contracts/archive/strategies/Beethovenx/StrategyBeethovenx.sol similarity index 100% rename from contracts/BIFI/strategies/Beethovenx/StrategyBeethovenx.sol rename to contracts/archive/strategies/Beethovenx/StrategyBeethovenx.sol diff --git a/contracts/BIFI/strategies/Beethovenx/StrategyBeethovenxDual.sol b/contracts/archive/strategies/Beethovenx/StrategyBeethovenxDual.sol similarity index 100% rename from contracts/BIFI/strategies/Beethovenx/StrategyBeethovenxDual.sol rename to contracts/archive/strategies/Beethovenx/StrategyBeethovenxDual.sol diff --git a/contracts/BIFI/strategies/Beethovenx/StrategyBeethovenxDualTwoStep.sol b/contracts/archive/strategies/Beethovenx/StrategyBeethovenxDualTwoStep.sol similarity index 100% rename from contracts/BIFI/strategies/Beethovenx/StrategyBeethovenxDualTwoStep.sol rename to contracts/archive/strategies/Beethovenx/StrategyBeethovenxDualTwoStep.sol diff --git a/contracts/BIFI/strategies/Beethovenx/StrategyBeethovenxSpiritRouter.sol b/contracts/archive/strategies/Beethovenx/StrategyBeethovenxSpiritRouter.sol similarity index 100% rename from contracts/BIFI/strategies/Beethovenx/StrategyBeethovenxSpiritRouter.sol rename to contracts/archive/strategies/Beethovenx/StrategyBeethovenxSpiritRouter.sol diff --git a/contracts/BIFI/strategies/Beethovenx/StrategyBeethovenxUST.sol b/contracts/archive/strategies/Beethovenx/StrategyBeethovenxUST.sol similarity index 100% rename from contracts/BIFI/strategies/Beethovenx/StrategyBeethovenxUST.sol rename to contracts/archive/strategies/Beethovenx/StrategyBeethovenxUST.sol diff --git a/contracts/BIFI/strategies/Beethovenx/StrategyBeethovenxfBeets.sol b/contracts/archive/strategies/Beethovenx/StrategyBeethovenxfBeets.sol similarity index 100% rename from contracts/BIFI/strategies/Beethovenx/StrategyBeethovenxfBeets.sol rename to contracts/archive/strategies/Beethovenx/StrategyBeethovenxfBeets.sol diff --git a/contracts/BIFI/strategies/Belt/Strategy4Belt.sol b/contracts/archive/strategies/Belt/Strategy4Belt.sol similarity index 100% rename from contracts/BIFI/strategies/Belt/Strategy4Belt.sol rename to contracts/archive/strategies/Belt/Strategy4Belt.sol diff --git a/contracts/BIFI/strategies/Belt/StrategyBeltCakeLP.sol b/contracts/archive/strategies/Belt/StrategyBeltCakeLP.sol similarity index 100% rename from contracts/BIFI/strategies/Belt/StrategyBeltCakeLP.sol rename to contracts/archive/strategies/Belt/StrategyBeltCakeLP.sol diff --git a/contracts/BIFI/strategies/Belt/StrategyBeltToken.sol b/contracts/archive/strategies/Belt/StrategyBeltToken.sol similarity index 100% rename from contracts/BIFI/strategies/Belt/StrategyBeltToken.sol rename to contracts/archive/strategies/Belt/StrategyBeltToken.sol diff --git a/contracts/BIFI/strategies/Belt/StrategyBeltVenusBLP.sol b/contracts/archive/strategies/Belt/StrategyBeltVenusBLP.sol similarity index 100% rename from contracts/BIFI/strategies/Belt/StrategyBeltVenusBLP.sol rename to contracts/archive/strategies/Belt/StrategyBeltVenusBLP.sol diff --git a/contracts/BIFI/strategies/Biswap/StrategyBiswap.sol b/contracts/archive/strategies/Biswap/StrategyBiswap.sol similarity index 100% rename from contracts/BIFI/strategies/Biswap/StrategyBiswap.sol rename to contracts/archive/strategies/Biswap/StrategyBiswap.sol diff --git a/contracts/BIFI/strategies/Blizz/IBlizz.sol b/contracts/archive/strategies/Blizz/IBlizz.sol similarity index 100% rename from contracts/BIFI/strategies/Blizz/IBlizz.sol rename to contracts/archive/strategies/Blizz/IBlizz.sol diff --git a/contracts/BIFI/strategies/Blizz/StrategyBlizz.sol b/contracts/archive/strategies/Blizz/StrategyBlizz.sol similarity index 100% rename from contracts/BIFI/strategies/Blizz/StrategyBlizz.sol rename to contracts/archive/strategies/Blizz/StrategyBlizz.sol diff --git a/contracts/BIFI/strategies/Blizz/StrategyBlizzChefLP.sol b/contracts/archive/strategies/Blizz/StrategyBlizzChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Blizz/StrategyBlizzChefLP.sol rename to contracts/archive/strategies/Blizz/StrategyBlizzChefLP.sol diff --git a/contracts/BIFI/strategies/Blizz/StrategyBlizzNative.sol b/contracts/archive/strategies/Blizz/StrategyBlizzNative.sol similarity index 100% rename from contracts/BIFI/strategies/Blizz/StrategyBlizzNative.sol rename to contracts/archive/strategies/Blizz/StrategyBlizzNative.sol diff --git a/contracts/BIFI/strategies/Blizz/StrategyRadiantChefLP.sol b/contracts/archive/strategies/Blizz/StrategyRadiantChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Blizz/StrategyRadiantChefLP.sol rename to contracts/archive/strategies/Blizz/StrategyRadiantChefLP.sol diff --git a/contracts/BIFI/strategies/Blizz/StrategyValas.sol b/contracts/archive/strategies/Blizz/StrategyValas.sol similarity index 100% rename from contracts/BIFI/strategies/Blizz/StrategyValas.sol rename to contracts/archive/strategies/Blizz/StrategyValas.sol diff --git a/contracts/BIFI/strategies/Blizz/StrategyValasChefLP.sol b/contracts/archive/strategies/Blizz/StrategyValasChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Blizz/StrategyValasChefLP.sol rename to contracts/archive/strategies/Blizz/StrategyValasChefLP.sol diff --git a/contracts/BIFI/strategies/Cake/FeeManagerCake.sol b/contracts/archive/strategies/Cake/FeeManagerCake.sol similarity index 100% rename from contracts/BIFI/strategies/Cake/FeeManagerCake.sol rename to contracts/archive/strategies/Cake/FeeManagerCake.sol diff --git a/contracts/BIFI/strategies/Cake/ICakeChefV2.sol b/contracts/archive/strategies/Cake/ICakeChefV2.sol similarity index 100% rename from contracts/BIFI/strategies/Cake/ICakeChefV2.sol rename to contracts/archive/strategies/Cake/ICakeChefV2.sol diff --git a/contracts/BIFI/strategies/Cake/IVeCakeStaker.sol b/contracts/archive/strategies/Cake/IVeCakeStaker.sol similarity index 100% rename from contracts/BIFI/strategies/Cake/IVeCakeStaker.sol rename to contracts/archive/strategies/Cake/IVeCakeStaker.sol diff --git a/contracts/BIFI/strategies/Cake/StratManagerCake.sol b/contracts/archive/strategies/Cake/StratManagerCake.sol similarity index 100% rename from contracts/BIFI/strategies/Cake/StratManagerCake.sol rename to contracts/archive/strategies/Cake/StratManagerCake.sol diff --git a/contracts/BIFI/strategies/Cake/StrategyCakeBoostedLP.sol b/contracts/archive/strategies/Cake/StrategyCakeBoostedLP.sol similarity index 100% rename from contracts/BIFI/strategies/Cake/StrategyCakeBoostedLP.sol rename to contracts/archive/strategies/Cake/StrategyCakeBoostedLP.sol diff --git a/contracts/BIFI/strategies/Cake/StrategyCakeV2.sol b/contracts/archive/strategies/Cake/StrategyCakeV2.sol similarity index 100% rename from contracts/BIFI/strategies/Cake/StrategyCakeV2.sol rename to contracts/archive/strategies/Cake/StrategyCakeV2.sol diff --git a/contracts/BIFI/strategies/Cometh/StrategyMultiRewardsPolygonLP.sol b/contracts/archive/strategies/Cometh/StrategyMultiRewardsPolygonLP.sol similarity index 100% rename from contracts/BIFI/strategies/Cometh/StrategyMultiRewardsPolygonLP.sol rename to contracts/archive/strategies/Cometh/StrategyMultiRewardsPolygonLP.sol diff --git a/contracts/BIFI/strategies/Cometh/StrategyRewardPoolPolygonLP.sol b/contracts/archive/strategies/Cometh/StrategyRewardPoolPolygonLP.sol similarity index 100% rename from contracts/BIFI/strategies/Cometh/StrategyRewardPoolPolygonLP.sol rename to contracts/archive/strategies/Cometh/StrategyRewardPoolPolygonLP.sol diff --git a/contracts/BIFI/strategies/Common/BeefyLP.sol b/contracts/archive/strategies/Common/BeefyLP.sol similarity index 100% rename from contracts/BIFI/strategies/Common/BeefyLP.sol rename to contracts/archive/strategies/Common/BeefyLP.sol diff --git a/contracts/BIFI/strategies/Common/FeeManager.sol b/contracts/archive/strategies/Common/FeeManager.sol similarity index 100% rename from contracts/BIFI/strategies/Common/FeeManager.sol rename to contracts/archive/strategies/Common/FeeManager.sol diff --git a/contracts/BIFI/strategies/Common/StratManager.sol b/contracts/archive/strategies/Common/StratManager.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StratManager.sol rename to contracts/archive/strategies/Common/StratManager.sol diff --git a/contracts/BIFI/strategies/Common/StrategyCommonChefLPKeeper.txt b/contracts/archive/strategies/Common/StrategyCommonChefLPKeeper.txt similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyCommonChefLPKeeper.txt rename to contracts/archive/strategies/Common/StrategyCommonChefLPKeeper.txt diff --git a/contracts/BIFI/strategies/Common/StrategyCommonChefLPTax.sol b/contracts/archive/strategies/Common/StrategyCommonChefLPTax.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyCommonChefLPTax.sol rename to contracts/archive/strategies/Common/StrategyCommonChefLPTax.sol diff --git a/contracts/BIFI/strategies/Common/StrategyCommonChefLPVoter.txt b/contracts/archive/strategies/Common/StrategyCommonChefLPVoter.txt similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyCommonChefLPVoter.txt rename to contracts/archive/strategies/Common/StrategyCommonChefLPVoter.txt diff --git a/contracts/BIFI/strategies/Common/StrategyCommonChefReferrerLP.sol b/contracts/archive/strategies/Common/StrategyCommonChefReferrerLP.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyCommonChefReferrerLP.sol rename to contracts/archive/strategies/Common/StrategyCommonChefReferrerLP.sol diff --git a/contracts/BIFI/strategies/Common/StrategyCommonChefReferrerLPBsc.sol b/contracts/archive/strategies/Common/StrategyCommonChefReferrerLPBsc.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyCommonChefReferrerLPBsc.sol rename to contracts/archive/strategies/Common/StrategyCommonChefReferrerLPBsc.sol diff --git a/contracts/BIFI/strategies/Common/StrategyCommonChefReferrerSingle.sol b/contracts/archive/strategies/Common/StrategyCommonChefReferrerSingle.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyCommonChefReferrerSingle.sol rename to contracts/archive/strategies/Common/StrategyCommonChefReferrerSingle.sol diff --git a/contracts/BIFI/strategies/Common/StrategyCommonChefStaking.sol b/contracts/archive/strategies/Common/StrategyCommonChefStaking.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyCommonChefStaking.sol rename to contracts/archive/strategies/Common/StrategyCommonChefStaking.sol diff --git a/contracts/BIFI/strategies/Common/StrategyCommonMultiRewardPoolLP.sol b/contracts/archive/strategies/Common/StrategyCommonMultiRewardPoolLP.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyCommonMultiRewardPoolLP.sol rename to contracts/archive/strategies/Common/StrategyCommonMultiRewardPoolLP.sol diff --git a/contracts/BIFI/strategies/Common/StrategyCommonRewardPool.sol b/contracts/archive/strategies/Common/StrategyCommonRewardPool.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyCommonRewardPool.sol rename to contracts/archive/strategies/Common/StrategyCommonRewardPool.sol diff --git a/contracts/BIFI/strategies/Common/StrategyMiniChefLP.sol b/contracts/archive/strategies/Common/StrategyMiniChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyMiniChefLP.sol rename to contracts/archive/strategies/Common/StrategyMiniChefLP.sol diff --git a/contracts/BIFI/strategies/Common/StrategyRewardPoolBsc.sol b/contracts/archive/strategies/Common/StrategyRewardPoolBsc.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyRewardPoolBsc.sol rename to contracts/archive/strategies/Common/StrategyRewardPoolBsc.sol diff --git a/contracts/BIFI/strategies/Common/StrategyVaultSeeder.txt b/contracts/archive/strategies/Common/StrategyVaultSeeder.txt similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyVaultSeeder.txt rename to contracts/archive/strategies/Common/StrategyVaultSeeder.txt diff --git a/contracts/BIFI/strategies/Common/StrategyYieldLP.sol b/contracts/archive/strategies/Common/StrategyYieldLP.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategyYieldLP.sol rename to contracts/archive/strategies/Common/StrategyYieldLP.sol diff --git a/contracts/BIFI/strategies/Common/StrategybeTokenRewardPool.sol b/contracts/archive/strategies/Common/StrategybeTokenRewardPool.sol similarity index 100% rename from contracts/BIFI/strategies/Common/StrategybeTokenRewardPool.sol rename to contracts/archive/strategies/Common/StrategybeTokenRewardPool.sol diff --git a/contracts/BIFI/strategies/Common/YieldBalancer.sol b/contracts/archive/strategies/Common/YieldBalancer.sol similarity index 100% rename from contracts/BIFI/strategies/Common/YieldBalancer.sol rename to contracts/archive/strategies/Common/YieldBalancer.sol diff --git a/contracts/BIFI/strategies/Curve/StrategyCurveHectorLP.sol b/contracts/archive/strategies/Curve/StrategyCurveHectorLP.sol similarity index 100% rename from contracts/BIFI/strategies/Curve/StrategyCurveHectorLP.sol rename to contracts/archive/strategies/Curve/StrategyCurveHectorLP.sol diff --git a/contracts/BIFI/strategies/Curve/StrategyCurveLPUniV3Router_sol6.txt b/contracts/archive/strategies/Curve/StrategyCurveLPUniV3Router_sol6.txt similarity index 100% rename from contracts/BIFI/strategies/Curve/StrategyCurveLPUniV3Router_sol6.txt rename to contracts/archive/strategies/Curve/StrategyCurveLPUniV3Router_sol6.txt diff --git a/contracts/BIFI/strategies/DCA/BeefyDCAStrategyUnirouter.sol b/contracts/archive/strategies/DCA/BeefyDCAStrategyUnirouter.sol similarity index 100% rename from contracts/BIFI/strategies/DCA/BeefyDCAStrategyUnirouter.sol rename to contracts/archive/strategies/DCA/BeefyDCAStrategyUnirouter.sol diff --git a/contracts/BIFI/strategies/DCA/BeefyDCAVaultBase.sol b/contracts/archive/strategies/DCA/BeefyDCAVaultBase.sol similarity index 100% rename from contracts/BIFI/strategies/DCA/BeefyDCAVaultBase.sol rename to contracts/archive/strategies/DCA/BeefyDCAVaultBase.sol diff --git a/contracts/BIFI/strategies/DCA/BeefyERC721Enumerable.sol b/contracts/archive/strategies/DCA/BeefyERC721Enumerable.sol similarity index 100% rename from contracts/BIFI/strategies/DCA/BeefyERC721Enumerable.sol rename to contracts/archive/strategies/DCA/BeefyERC721Enumerable.sol diff --git a/contracts/BIFI/strategies/DCA/IDCAStrategy.sol b/contracts/archive/strategies/DCA/IDCAStrategy.sol similarity index 100% rename from contracts/BIFI/strategies/DCA/IDCAStrategy.sol rename to contracts/archive/strategies/DCA/IDCAStrategy.sol diff --git a/contracts/BIFI/strategies/DCA/IDCAVault.sol b/contracts/archive/strategies/DCA/IDCAVault.sol similarity index 100% rename from contracts/BIFI/strategies/DCA/IDCAVault.sol rename to contracts/archive/strategies/DCA/IDCAVault.sol diff --git a/contracts/BIFI/strategies/DCA/IMooStrategy.sol b/contracts/archive/strategies/DCA/IMooStrategy.sol similarity index 100% rename from contracts/BIFI/strategies/DCA/IMooStrategy.sol rename to contracts/archive/strategies/DCA/IMooStrategy.sol diff --git a/contracts/BIFI/strategies/DCA/IMooVault.sol b/contracts/archive/strategies/DCA/IMooVault.sol similarity index 100% rename from contracts/BIFI/strategies/DCA/IMooVault.sol rename to contracts/archive/strategies/DCA/IMooVault.sol diff --git a/contracts/BIFI/strategies/DFYN/StrategyDFYNDualFarmRewardPoolLP.sol b/contracts/archive/strategies/DFYN/StrategyDFYNDualFarmRewardPoolLP.sol similarity index 100% rename from contracts/BIFI/strategies/DFYN/StrategyDFYNDualFarmRewardPoolLP.sol rename to contracts/archive/strategies/DFYN/StrategyDFYNDualFarmRewardPoolLP.sol diff --git a/contracts/BIFI/strategies/DFYN/StrategyDFYNRewardPoolLP.sol b/contracts/archive/strategies/DFYN/StrategyDFYNRewardPoolLP.sol similarity index 100% rename from contracts/BIFI/strategies/DFYN/StrategyDFYNRewardPoolLP.sol rename to contracts/archive/strategies/DFYN/StrategyDFYNRewardPoolLP.sol diff --git a/contracts/BIFI/strategies/Ellipsis/StrategyDotDotEllipsisFlat.txt b/contracts/archive/strategies/Ellipsis/StrategyDotDotEllipsisFlat.txt similarity index 100% rename from contracts/BIFI/strategies/Ellipsis/StrategyDotDotEllipsisFlat.txt rename to contracts/archive/strategies/Ellipsis/StrategyDotDotEllipsisFlat.txt diff --git a/contracts/BIFI/strategies/Geist/StrategyGeist.sol b/contracts/archive/strategies/Geist/StrategyGeist.sol similarity index 100% rename from contracts/BIFI/strategies/Geist/StrategyGeist.sol rename to contracts/archive/strategies/Geist/StrategyGeist.sol diff --git a/contracts/BIFI/strategies/Geist/StrategyGeistChefLP.sol b/contracts/archive/strategies/Geist/StrategyGeistChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Geist/StrategyGeistChefLP.sol rename to contracts/archive/strategies/Geist/StrategyGeistChefLP.sol diff --git a/contracts/BIFI/strategies/Geist/StrategyGeistNative.sol b/contracts/archive/strategies/Geist/StrategyGeistNative.sol similarity index 100% rename from contracts/BIFI/strategies/Geist/StrategyGeistNative.sol rename to contracts/archive/strategies/Geist/StrategyGeistNative.sol diff --git a/contracts/BIFI/strategies/Huckleberry/StrategyFinn.sol b/contracts/archive/strategies/Huckleberry/StrategyFinn.sol similarity index 100% rename from contracts/BIFI/strategies/Huckleberry/StrategyFinn.sol rename to contracts/archive/strategies/Huckleberry/StrategyFinn.sol diff --git a/contracts/BIFI/strategies/Mdex/StrategyMdexBscLP.sol b/contracts/archive/strategies/Mdex/StrategyMdexBscLP.sol similarity index 100% rename from contracts/BIFI/strategies/Mdex/StrategyMdexBscLP.sol rename to contracts/archive/strategies/Mdex/StrategyMdexBscLP.sol diff --git a/contracts/BIFI/strategies/Mdex/StrategyMdexChefLP.sol b/contracts/archive/strategies/Mdex/StrategyMdexChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Mdex/StrategyMdexChefLP.sol rename to contracts/archive/strategies/Mdex/StrategyMdexChefLP.sol diff --git a/contracts/BIFI/strategies/Mdex/StrategyMdexChefSingle.sol b/contracts/archive/strategies/Mdex/StrategyMdexChefSingle.sol similarity index 100% rename from contracts/BIFI/strategies/Mdex/StrategyMdexChefSingle.sol rename to contracts/archive/strategies/Mdex/StrategyMdexChefSingle.sol diff --git a/contracts/BIFI/strategies/Mdex/StrategyMdexLP.sol b/contracts/archive/strategies/Mdex/StrategyMdexLP.sol similarity index 100% rename from contracts/BIFI/strategies/Mdex/StrategyMdexLP.sol rename to contracts/archive/strategies/Mdex/StrategyMdexLP.sol diff --git a/contracts/BIFI/strategies/Moonbeam/StrategyBeamChefLP.sol b/contracts/archive/strategies/Moonbeam/StrategyBeamChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Moonbeam/StrategyBeamChefLP.sol rename to contracts/archive/strategies/Moonbeam/StrategyBeamChefLP.sol diff --git a/contracts/BIFI/strategies/Moonbeam/StrategyStella.sol b/contracts/archive/strategies/Moonbeam/StrategyStella.sol similarity index 100% rename from contracts/BIFI/strategies/Moonbeam/StrategyStella.sol rename to contracts/archive/strategies/Moonbeam/StrategyStella.sol diff --git a/contracts/BIFI/strategies/Netswap/INetswapChef.sol b/contracts/archive/strategies/Netswap/INetswapChef.sol similarity index 100% rename from contracts/BIFI/strategies/Netswap/INetswapChef.sol rename to contracts/archive/strategies/Netswap/INetswapChef.sol diff --git a/contracts/BIFI/strategies/Netswap/StrategyNetswapDualLP.sol b/contracts/archive/strategies/Netswap/StrategyNetswapDualLP.sol similarity index 100% rename from contracts/BIFI/strategies/Netswap/StrategyNetswapDualLP.sol rename to contracts/archive/strategies/Netswap/StrategyNetswapDualLP.sol diff --git a/contracts/BIFI/strategies/Scream/StrategyOXDxSCREAM.sol b/contracts/archive/strategies/Scream/StrategyOXDxSCREAM.sol similarity index 100% rename from contracts/BIFI/strategies/Scream/StrategyOXDxSCREAM.sol rename to contracts/archive/strategies/Scream/StrategyOXDxSCREAM.sol diff --git a/contracts/BIFI/strategies/Scream/StrategyScream.sol b/contracts/archive/strategies/Scream/StrategyScream.sol similarity index 100% rename from contracts/BIFI/strategies/Scream/StrategyScream.sol rename to contracts/archive/strategies/Scream/StrategyScream.sol diff --git a/contracts/BIFI/strategies/Scream/StrategyScreamFTM.sol b/contracts/archive/strategies/Scream/StrategyScreamFTM.sol similarity index 100% rename from contracts/BIFI/strategies/Scream/StrategyScreamFTM.sol rename to contracts/archive/strategies/Scream/StrategyScreamFTM.sol diff --git a/contracts/BIFI/strategies/Scream/StrategyScreamSupplyOnly.sol b/contracts/archive/strategies/Scream/StrategyScreamSupplyOnly.sol similarity index 100% rename from contracts/BIFI/strategies/Scream/StrategyScreamSupplyOnly.sol rename to contracts/archive/strategies/Scream/StrategyScreamSupplyOnly.sol diff --git a/contracts/BIFI/strategies/Scream/StrategyScreamSupplyOnlyFrax.sol b/contracts/archive/strategies/Scream/StrategyScreamSupplyOnlyFrax.sol similarity index 100% rename from contracts/BIFI/strategies/Scream/StrategyScreamSupplyOnlyFrax.sol rename to contracts/archive/strategies/Scream/StrategyScreamSupplyOnlyFrax.sol diff --git a/contracts/BIFI/strategies/Scream/StrategySteakHouseLP.sol b/contracts/archive/strategies/Scream/StrategySteakHouseLP.sol similarity index 100% rename from contracts/BIFI/strategies/Scream/StrategySteakHouseLP.sol rename to contracts/archive/strategies/Scream/StrategySteakHouseLP.sol diff --git a/contracts/BIFI/strategies/Solace/StrategySolaceRewardPool.sol b/contracts/archive/strategies/Solace/StrategySolaceRewardPool.sol similarity index 100% rename from contracts/BIFI/strategies/Solace/StrategySolaceRewardPool.sol rename to contracts/archive/strategies/Solace/StrategySolaceRewardPool.sol diff --git a/contracts/BIFI/strategies/Solace/StrategySolaceV2RewardPool.txt b/contracts/archive/strategies/Solace/StrategySolaceV2RewardPool.txt similarity index 100% rename from contracts/BIFI/strategies/Solace/StrategySolaceV2RewardPool.txt rename to contracts/archive/strategies/Solace/StrategySolaceV2RewardPool.txt diff --git a/contracts/BIFI/strategies/Solarbeam/StrategySolarbeam.sol b/contracts/archive/strategies/Solarbeam/StrategySolarbeam.sol similarity index 100% rename from contracts/BIFI/strategies/Solarbeam/StrategySolarbeam.sol rename to contracts/archive/strategies/Solarbeam/StrategySolarbeam.sol diff --git a/contracts/BIFI/strategies/Solidly/SolidyStaker.sol b/contracts/archive/strategies/Solidly/SolidyStaker.sol similarity index 100% rename from contracts/BIFI/strategies/Solidly/SolidyStaker.sol rename to contracts/archive/strategies/Solidly/SolidyStaker.sol diff --git a/contracts/BIFI/strategies/Spirit/StrategySpiritChefLP.sol b/contracts/archive/strategies/Spirit/StrategySpiritChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Spirit/StrategySpiritChefLP.sol rename to contracts/archive/strategies/Spirit/StrategySpiritChefLP.sol diff --git a/contracts/BIFI/strategies/Stargate/StrategyStargateStaking.sol b/contracts/archive/strategies/Stargate/StrategyStargateStaking.sol similarity index 100% rename from contracts/BIFI/strategies/Stargate/StrategyStargateStaking.sol rename to contracts/archive/strategies/Stargate/StrategyStargateStaking.sol diff --git a/contracts/BIFI/strategies/Sushi/StrategyArbSushiDualLP.sol b/contracts/archive/strategies/Sushi/StrategyArbSushiDualLP.sol similarity index 100% rename from contracts/BIFI/strategies/Sushi/StrategyArbSushiDualLP.sol rename to contracts/archive/strategies/Sushi/StrategyArbSushiDualLP.sol diff --git a/contracts/BIFI/strategies/Sushi/StrategyMrSushiLP.sol b/contracts/archive/strategies/Sushi/StrategyMrSushiLP.sol similarity index 100% rename from contracts/BIFI/strategies/Sushi/StrategyMrSushiLP.sol rename to contracts/archive/strategies/Sushi/StrategyMrSushiLP.sol diff --git a/contracts/BIFI/strategies/Sushi/StrategyPolygonSushiLP.sol b/contracts/archive/strategies/Sushi/StrategyPolygonSushiLP.sol similarity index 100% rename from contracts/BIFI/strategies/Sushi/StrategyPolygonSushiLP.sol rename to contracts/archive/strategies/Sushi/StrategyPolygonSushiLP.sol diff --git a/contracts/BIFI/strategies/Sushi/StrategyPolygonSushiOhmLP.sol b/contracts/archive/strategies/Sushi/StrategyPolygonSushiOhmLP.sol similarity index 100% rename from contracts/BIFI/strategies/Sushi/StrategyPolygonSushiOhmLP.sol rename to contracts/archive/strategies/Sushi/StrategyPolygonSushiOhmLP.sol diff --git a/contracts/BIFI/strategies/Sushi/StrategySushiLP.sol b/contracts/archive/strategies/Sushi/StrategySushiLP.sol similarity index 100% rename from contracts/BIFI/strategies/Sushi/StrategySushiLP.sol rename to contracts/archive/strategies/Sushi/StrategySushiLP.sol diff --git a/contracts/BIFI/strategies/Sushi/StrategySushiNativeDualLP.sol b/contracts/archive/strategies/Sushi/StrategySushiNativeDualLP.sol similarity index 100% rename from contracts/BIFI/strategies/Sushi/StrategySushiNativeDualLP.sol rename to contracts/archive/strategies/Sushi/StrategySushiNativeDualLP.sol diff --git a/contracts/BIFI/strategies/Tomb/StrategyTombTSHARE.sol b/contracts/archive/strategies/Tomb/StrategyTombTSHARE.sol similarity index 100% rename from contracts/BIFI/strategies/Tomb/StrategyTombTSHARE.sol rename to contracts/archive/strategies/Tomb/StrategyTombTSHARE.sol diff --git a/contracts/BIFI/strategies/TraderJoe/StrategyTraderJoeBoostedLP.sol b/contracts/archive/strategies/Trader Joe/StrategyTraderJoeBoostedLP.sol similarity index 100% rename from contracts/BIFI/strategies/TraderJoe/StrategyTraderJoeBoostedLP.sol rename to contracts/archive/strategies/Trader Joe/StrategyTraderJoeBoostedLP.sol diff --git a/contracts/BIFI/strategies/TraderJoe/StrategyTraderJoeDualLP.sol b/contracts/archive/strategies/Trader Joe/StrategyTraderJoeDualLP.sol similarity index 100% rename from contracts/BIFI/strategies/TraderJoe/StrategyTraderJoeDualLP.sol rename to contracts/archive/strategies/Trader Joe/StrategyTraderJoeDualLP.sol diff --git a/contracts/BIFI/strategies/TraderJoe/StrategyTraderJoeDualRouterNonNativeLP.sol b/contracts/archive/strategies/Trader Joe/StrategyTraderJoeDualRouterNonNativeLP.sol similarity index 100% rename from contracts/BIFI/strategies/TraderJoe/StrategyTraderJoeDualRouterNonNativeLP.sol rename to contracts/archive/strategies/Trader Joe/StrategyTraderJoeDualRouterNonNativeLP.sol diff --git a/contracts/BIFI/strategies/TraderJoe/StrategyTraderJoeSingleStake.sol b/contracts/archive/strategies/Trader Joe/StrategyTraderJoeSingleStake.sol similarity index 100% rename from contracts/BIFI/strategies/TraderJoe/StrategyTraderJoeSingleStake.sol rename to contracts/archive/strategies/Trader Joe/StrategyTraderJoeSingleStake.sol diff --git a/contracts/BIFI/strategies/VVS/StrategyVVSDualRewards.sol b/contracts/archive/strategies/VVS/StrategyVVSDualRewards.sol similarity index 100% rename from contracts/BIFI/strategies/VVS/StrategyVVSDualRewards.sol rename to contracts/archive/strategies/VVS/StrategyVVSDualRewards.sol diff --git a/contracts/BIFI/strategies/ValleySwap/StrategyValleySwapLP.sol b/contracts/archive/strategies/ValleySwap/StrategyValleySwapLP.sol similarity index 100% rename from contracts/BIFI/strategies/ValleySwap/StrategyValleySwapLP.sol rename to contracts/archive/strategies/ValleySwap/StrategyValleySwapLP.sol diff --git a/contracts/BIFI/strategies/Voltage/StrategyFuseRewardPoolLP.sol b/contracts/archive/strategies/Voltage/StrategyFuseRewardPoolLP.sol similarity index 100% rename from contracts/BIFI/strategies/Voltage/StrategyFuseRewardPoolLP.sol rename to contracts/archive/strategies/Voltage/StrategyFuseRewardPoolLP.sol diff --git a/contracts/BIFI/strategies/Voltage/StrategyVoltageStable.sol b/contracts/archive/strategies/Voltage/StrategyVoltageStable.sol similarity index 100% rename from contracts/BIFI/strategies/Voltage/StrategyVoltageStable.sol rename to contracts/archive/strategies/Voltage/StrategyVoltageStable.sol diff --git a/contracts/BIFI/strategies/Yuzu/StrategyYuzuChefMultiRewardsSwapMiningLP.sol b/contracts/archive/strategies/Yuzu/StrategyYuzuChefMultiRewardsSwapMiningLP.sol similarity index 100% rename from contracts/BIFI/strategies/Yuzu/StrategyYuzuChefMultiRewardsSwapMiningLP.sol rename to contracts/archive/strategies/Yuzu/StrategyYuzuChefMultiRewardsSwapMiningLP.sol diff --git a/contracts/BIFI/strategies/Yuzu/StrategyYuzuChefSwapMiningLP.sol b/contracts/archive/strategies/Yuzu/StrategyYuzuChefSwapMiningLP.sol similarity index 100% rename from contracts/BIFI/strategies/Yuzu/StrategyYuzuChefSwapMiningLP.sol rename to contracts/archive/strategies/Yuzu/StrategyYuzuChefSwapMiningLP.sol diff --git a/contracts/BIFI/strategies/Locked/beFTMRewardPool.sol b/contracts/archive/strategies/beFTMRewardPool.sol similarity index 100% rename from contracts/BIFI/strategies/Locked/beFTMRewardPool.sol rename to contracts/archive/strategies/beFTMRewardPool.sol diff --git a/contracts/BIFI/strategies/degens/LaunchpoolProxy.sol b/contracts/archive/strategies/degens/LaunchpoolProxy.sol similarity index 100% rename from contracts/BIFI/strategies/degens/LaunchpoolProxy.sol rename to contracts/archive/strategies/degens/LaunchpoolProxy.sol diff --git a/contracts/BIFI/strategies/degens/LaunchpoolReferralBsc.sol b/contracts/archive/strategies/degens/LaunchpoolReferralBsc.sol similarity index 100% rename from contracts/BIFI/strategies/degens/LaunchpoolReferralBsc.sol rename to contracts/archive/strategies/degens/LaunchpoolReferralBsc.sol diff --git a/contracts/BIFI/strategies/degens/LaunchpoolReferralFantom.sol b/contracts/archive/strategies/degens/LaunchpoolReferralFantom.sol similarity index 100% rename from contracts/BIFI/strategies/degens/LaunchpoolReferralFantom.sol rename to contracts/archive/strategies/degens/LaunchpoolReferralFantom.sol diff --git a/contracts/BIFI/strategies/degens/LaunchpoolReferralPolygon.sol b/contracts/archive/strategies/degens/LaunchpoolReferralPolygon.sol similarity index 100% rename from contracts/BIFI/strategies/degens/LaunchpoolReferralPolygon.sol rename to contracts/archive/strategies/degens/LaunchpoolReferralPolygon.sol diff --git a/contracts/BIFI/strategies/degens/StrategyAnnex.sol b/contracts/archive/strategies/degens/StrategyAnnex.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyAnnex.sol rename to contracts/archive/strategies/degens/StrategyAnnex.sol diff --git a/contracts/BIFI/strategies/degens/StrategyBanana.sol b/contracts/archive/strategies/degens/StrategyBanana.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyBanana.sol rename to contracts/archive/strategies/degens/StrategyBanana.sol diff --git a/contracts/BIFI/strategies/degens/StrategyBetu.sol b/contracts/archive/strategies/degens/StrategyBetu.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyBetu.sol rename to contracts/archive/strategies/degens/StrategyBetu.sol diff --git a/contracts/BIFI/strategies/degens/StrategyBison.sol b/contracts/archive/strategies/degens/StrategyBison.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyBison.sol rename to contracts/archive/strategies/degens/StrategyBison.sol diff --git a/contracts/BIFI/strategies/degens/StrategyChargeLP.sol b/contracts/archive/strategies/degens/StrategyChargeLP.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyChargeLP.sol rename to contracts/archive/strategies/degens/StrategyChargeLP.sol diff --git a/contracts/BIFI/strategies/degens/StrategyDinoSwapLP.sol b/contracts/archive/strategies/degens/StrategyDinoSwapLP.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyDinoSwapLP.sol rename to contracts/archive/strategies/degens/StrategyDinoSwapLP.sol diff --git a/contracts/BIFI/strategies/degens/StrategyDinoSwapSushiLP.sol b/contracts/archive/strategies/degens/StrategyDinoSwapSushiLP.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyDinoSwapSushiLP.sol rename to contracts/archive/strategies/degens/StrategyDinoSwapSushiLP.sol diff --git a/contracts/BIFI/strategies/degens/StrategyJetswapBusdLP.sol b/contracts/archive/strategies/degens/StrategyJetswapBusdLP.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyJetswapBusdLP.sol rename to contracts/archive/strategies/degens/StrategyJetswapBusdLP.sol diff --git a/contracts/BIFI/strategies/degens/StrategyJetswapLP.sol b/contracts/archive/strategies/degens/StrategyJetswapLP.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyJetswapLP.sol rename to contracts/archive/strategies/degens/StrategyJetswapLP.sol diff --git a/contracts/BIFI/strategies/degens/StrategyJetswapWings.sol b/contracts/archive/strategies/degens/StrategyJetswapWings.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyJetswapWings.sol rename to contracts/archive/strategies/degens/StrategyJetswapWings.sol diff --git a/contracts/BIFI/strategies/degens/StrategyLiquidus.sol b/contracts/archive/strategies/degens/StrategyLiquidus.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyLiquidus.sol rename to contracts/archive/strategies/degens/StrategyLiquidus.sol diff --git a/contracts/BIFI/strategies/degens/StrategyMasterChefApeLP.sol b/contracts/archive/strategies/degens/StrategyMasterChefApeLP.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyMasterChefApeLP.sol rename to contracts/archive/strategies/degens/StrategyMasterChefApeLP.sol diff --git a/contracts/BIFI/strategies/Spooky/StrategyMasterChefLP.sol b/contracts/archive/strategies/degens/StrategyMasterChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Spooky/StrategyMasterChefLP.sol rename to contracts/archive/strategies/degens/StrategyMasterChefLP.sol diff --git a/contracts/BIFI/strategies/degens/StrategyMasterChefPolygonLP.sol b/contracts/archive/strategies/degens/StrategyMasterChefPolygonLP.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyMasterChefPolygonLP.sol rename to contracts/archive/strategies/degens/StrategyMasterChefPolygonLP.sol diff --git a/contracts/BIFI/strategies/degens/StrategyMoonpotRewardPool.sol b/contracts/archive/strategies/degens/StrategyMoonpotRewardPool.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyMoonpotRewardPool.sol rename to contracts/archive/strategies/degens/StrategyMoonpotRewardPool.sol diff --git a/contracts/BIFI/strategies/degens/StrategyNfty.sol b/contracts/archive/strategies/degens/StrategyNfty.sol similarity index 100% rename from contracts/BIFI/strategies/degens/StrategyNfty.sol rename to contracts/archive/strategies/degens/StrategyNfty.sol diff --git a/contracts/BIFI/strategies/Spooky/StrategyOXDxBOO.sol b/contracts/archive/strategies/degens/StrategyOXDxBOO.sol similarity index 100% rename from contracts/BIFI/strategies/Spooky/StrategyOXDxBOO.sol rename to contracts/archive/strategies/degens/StrategyOXDxBOO.sol diff --git a/contracts/BIFI/strategies/Pangolin/StrategyPangolinLP.sol b/contracts/archive/strategies/degens/StrategyPangolinLP.sol similarity index 100% rename from contracts/BIFI/strategies/Pangolin/StrategyPangolinLP.sol rename to contracts/archive/strategies/degens/StrategyPangolinLP.sol diff --git a/contracts/BIFI/strategies/Pangolin/StrategyPangolinMiniChefLP.sol b/contracts/archive/strategies/degens/StrategyPangolinMiniChefLP.sol similarity index 100% rename from contracts/BIFI/strategies/Pangolin/StrategyPangolinMiniChefLP.sol rename to contracts/archive/strategies/degens/StrategyPangolinMiniChefLP.sol diff --git a/contracts/BIFI/strategies/Pangolin/StrategyPangolinMultiRewardsLP.sol b/contracts/archive/strategies/degens/StrategyPangolinMultiRewardsLP.sol similarity index 100% rename from contracts/BIFI/strategies/Pangolin/StrategyPangolinMultiRewardsLP.sol rename to contracts/archive/strategies/degens/StrategyPangolinMultiRewardsLP.sol diff --git a/contracts/BIFI/strategies/QuickSwap/StrategyPolygonQuickLP.sol b/contracts/archive/strategies/degens/StrategyPolygonQuickLP.sol similarity index 100% rename from contracts/BIFI/strategies/QuickSwap/StrategyPolygonQuickLP.sol rename to contracts/archive/strategies/degens/StrategyPolygonQuickLP.sol diff --git a/contracts/BIFI/strategies/QuickSwap/StrategyQuickDragonsLair.sol b/contracts/archive/strategies/degens/StrategyQuickDragonsLair.sol similarity index 100% rename from contracts/BIFI/strategies/QuickSwap/StrategyQuickDragonsLair.sol rename to contracts/archive/strategies/degens/StrategyQuickDragonsLair.sol diff --git a/contracts/BIFI/strategies/QuickSwap/StrategyQuickDualRewardLP.sol b/contracts/archive/strategies/degens/StrategyQuickDualRewardLP.sol similarity index 100% rename from contracts/BIFI/strategies/QuickSwap/StrategyQuickDualRewardLP.sol rename to contracts/archive/strategies/degens/StrategyQuickDualRewardLP.sol diff --git a/contracts/BIFI/strategies/QuickSwap/StrategyRewardPoolPolygonETHLP.sol b/contracts/archive/strategies/degens/StrategyRewardPoolPolygonETHLP.sol similarity index 100% rename from contracts/BIFI/strategies/QuickSwap/StrategyRewardPoolPolygonETHLP.sol rename to contracts/archive/strategies/degens/StrategyRewardPoolPolygonETHLP.sol diff --git a/contracts/BIFI/strategies/Solarbeam/StrategySolarbeamStable.sol b/contracts/archive/strategies/degens/StrategySolarbeamStable.sol similarity index 100% rename from contracts/BIFI/strategies/Solarbeam/StrategySolarbeamStable.sol rename to contracts/archive/strategies/degens/StrategySolarbeamStable.sol diff --git a/contracts/BIFI/strategies/Spooky/StrategySpookyV2LP.sol b/contracts/archive/strategies/degens/StrategySpookyV2LP.sol similarity index 100% rename from contracts/BIFI/strategies/Spooky/StrategySpookyV2LP.sol rename to contracts/archive/strategies/degens/StrategySpookyV2LP.sol diff --git a/contracts/BIFI/strategies/Stellaswap/StrategyStellaswapDualRewardLP.sol b/contracts/archive/strategies/degens/StrategyStellaswapDualRewardLP.sol similarity index 100% rename from contracts/BIFI/strategies/Stellaswap/StrategyStellaswapDualRewardLP.sol rename to contracts/archive/strategies/degens/StrategyStellaswapDualRewardLP.sol diff --git a/contracts/BIFI/strategies/Stellaswap/StrategyStellaswapStable.sol b/contracts/archive/strategies/degens/StrategyStellaswapStable.sol similarity index 100% rename from contracts/BIFI/strategies/Stellaswap/StrategyStellaswapStable.sol rename to contracts/archive/strategies/degens/StrategyStellaswapStable.sol diff --git a/contracts/BIFI/strategies/veJOE/ChefManager.sol b/contracts/archive/strategies/veJOE/ChefManager.sol similarity index 100% rename from contracts/BIFI/strategies/veJOE/ChefManager.sol rename to contracts/archive/strategies/veJOE/ChefManager.sol diff --git a/contracts/BIFI/strategies/veJOE/IJoeChef.sol b/contracts/archive/strategies/veJOE/IJoeChef.sol similarity index 100% rename from contracts/BIFI/strategies/veJOE/IJoeChef.sol rename to contracts/archive/strategies/veJOE/IJoeChef.sol diff --git a/contracts/BIFI/strategies/veJOE/IJoeStrategy.sol b/contracts/archive/strategies/veJOE/IJoeStrategy.sol similarity index 100% rename from contracts/BIFI/strategies/veJOE/IJoeStrategy.sol rename to contracts/archive/strategies/veJOE/IJoeStrategy.sol diff --git a/contracts/BIFI/strategies/veJOE/IVeJoe.sol b/contracts/archive/strategies/veJOE/IVeJoe.sol similarity index 100% rename from contracts/BIFI/strategies/veJOE/IVeJoe.sol rename to contracts/archive/strategies/veJOE/IVeJoe.sol diff --git a/contracts/BIFI/strategies/veJOE/JoeBatch.sol b/contracts/archive/strategies/veJOE/JoeBatch.sol similarity index 100% rename from contracts/BIFI/strategies/veJOE/JoeBatch.sol rename to contracts/archive/strategies/veJOE/JoeBatch.sol diff --git a/contracts/BIFI/strategies/veJOE/StrategyBeJoeRewardPool.sol b/contracts/archive/strategies/veJOE/StrategyBeJoeRewardPool.sol similarity index 100% rename from contracts/BIFI/strategies/veJOE/StrategyBeJoeRewardPool.sol rename to contracts/archive/strategies/veJOE/StrategyBeJoeRewardPool.sol diff --git a/contracts/BIFI/strategies/veJOE/VeJoeStaker.sol b/contracts/archive/strategies/veJOE/VeJoeStaker.sol similarity index 100% rename from contracts/BIFI/strategies/veJOE/VeJoeStaker.sol rename to contracts/archive/strategies/veJOE/VeJoeStaker.sol diff --git a/contracts/BIFI/utils/BeefyRefund.sol b/contracts/archive/utils/BeefyRefund.sol similarity index 100% rename from contracts/BIFI/utils/BeefyRefund.sol rename to contracts/archive/utils/BeefyRefund.sol diff --git a/contracts/BIFI/utils/BeefyRegistry.txt b/contracts/archive/utils/BeefyRegistry.txt similarity index 100% rename from contracts/BIFI/utils/BeefyRegistry.txt rename to contracts/archive/utils/BeefyRegistry.txt diff --git a/contracts/BIFI/utils/GasPrice.sol b/contracts/archive/utils/GasPrice.sol similarity index 100% rename from contracts/BIFI/utils/GasPrice.sol rename to contracts/archive/utils/GasPrice.sol diff --git a/contracts/BIFI/utils/GasThrottler.sol b/contracts/archive/utils/GasThrottler.sol similarity index 100% rename from contracts/BIFI/utils/GasThrottler.sol rename to contracts/archive/utils/GasThrottler.sol diff --git a/contracts/BIFI/utils/LPTokenWrapper.sol b/contracts/archive/utils/LPTokenWrapper.sol similarity index 100% rename from contracts/BIFI/utils/LPTokenWrapper.sol rename to contracts/archive/utils/LPTokenWrapper.sol diff --git a/contracts/BIFI/utils/Rescuer.sol b/contracts/archive/utils/Rescuer.sol similarity index 100% rename from contracts/BIFI/utils/Rescuer.sol rename to contracts/archive/utils/Rescuer.sol diff --git a/contracts/BIFI/utils/RescuerFrax.sol b/contracts/archive/utils/RescuerFrax.sol similarity index 100% rename from contracts/BIFI/utils/RescuerFrax.sol rename to contracts/archive/utils/RescuerFrax.sol diff --git a/contracts/BIFI/utils/RewardRecover.sol b/contracts/archive/utils/RewardRecover.sol similarity index 100% rename from contracts/BIFI/utils/RewardRecover.sol rename to contracts/archive/utils/RewardRecover.sol diff --git a/contracts/BIFI/utils/StrategistBuyback.sol b/contracts/archive/utils/StrategistBuyback.sol similarity index 100% rename from contracts/BIFI/utils/StrategistBuyback.sol rename to contracts/archive/utils/StrategistBuyback.sol diff --git a/contracts/BIFI/vaults/BeefyVaultV6.sol b/contracts/archive/vaults/BeefyVaultV6.sol similarity index 100% rename from contracts/BIFI/vaults/BeefyVaultV6.sol rename to contracts/archive/vaults/BeefyVaultV6.sol diff --git a/contracts/BIFI/vaults/BeefyVaultV6Native.sol b/contracts/archive/vaults/BeefyVaultV6Native.sol similarity index 100% rename from contracts/BIFI/vaults/BeefyVaultV6Native.sol rename to contracts/archive/vaults/BeefyVaultV6Native.sol diff --git a/contracts/BIFI/vaults/BeefyVaultv6Moonpot.sol b/contracts/archive/vaults/BeefyVaultv6Moonpot.sol similarity index 100% rename from contracts/BIFI/vaults/BeefyVaultv6Moonpot.sol rename to contracts/archive/vaults/BeefyVaultv6Moonpot.sol diff --git a/contracts/BIFI/zaps/BeefyPairFeeDataSource.sol b/contracts/archive/zaps/BeefyPairFeeDataSource.sol similarity index 100% rename from contracts/BIFI/zaps/BeefyPairFeeDataSource.sol rename to contracts/archive/zaps/BeefyPairFeeDataSource.sol diff --git a/contracts/BIFI/zaps/BeefyUniV2ZapSolidly.sol b/contracts/archive/zaps/BeefyUniV2ZapSolidly.sol similarity index 100% rename from contracts/BIFI/zaps/BeefyUniV2ZapSolidly.sol rename to contracts/archive/zaps/BeefyUniV2ZapSolidly.sol diff --git a/contracts/BIFI/zaps/BeefyZapMdex.sol b/contracts/archive/zaps/BeefyZapMdex.sol similarity index 100% rename from contracts/BIFI/zaps/BeefyZapMdex.sol rename to contracts/archive/zaps/BeefyZapMdex.sol diff --git a/contracts/BIFI/zaps/BeefyZapSolidlyDyst.sol b/contracts/archive/zaps/BeefyZapSolidlyDyst.sol similarity index 100% rename from contracts/BIFI/zaps/BeefyZapSolidlyDyst.sol rename to contracts/archive/zaps/BeefyZapSolidlyDyst.sol diff --git a/contracts/BIFI/zaps/BeefyZapUniswapV2.txt b/contracts/archive/zaps/BeefyZapUniswapV2.txt similarity index 100% rename from contracts/BIFI/zaps/BeefyZapUniswapV2.txt rename to contracts/archive/zaps/BeefyZapUniswapV2.txt diff --git a/contracts/BIFI/zaps/zapInterfaces/IBeefyDataSource.sol b/contracts/archive/zaps/IBeefyDataSource.sol similarity index 100% rename from contracts/BIFI/zaps/zapInterfaces/IBeefyDataSource.sol rename to contracts/archive/zaps/IBeefyDataSource.sol diff --git a/contracts/BIFI/zaps/ZapBeFtmOneInch.sol b/contracts/archive/zaps/ZapBeFtmOneInch.sol similarity index 100% rename from contracts/BIFI/zaps/ZapBeFtmOneInch.sol rename to contracts/archive/zaps/ZapBeFtmOneInch.sol diff --git a/contracts/BIFI/zaps/ZapBeVelo.sol b/contracts/archive/zaps/ZapBeVelo.sol similarity index 100% rename from contracts/BIFI/zaps/ZapBeVelo.sol rename to contracts/archive/zaps/ZapBeVelo.sol diff --git a/hardhat.config.ts b/hardhat.config.ts index f618238e..622d1cce 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -212,34 +212,7 @@ const config: DeploymentConfig = { runs: 200, }, }, - }, - { - version: "0.8.15", - settings: { - optimizer: { - enabled: true, - runs: 200, - }, - }, - }, - { - version: "0.6.12", - settings: { - optimizer: { - enabled: true, - runs: 200, - }, - }, - }, - { - version: "0.5.5", - settings: { - optimizer: { - enabled: true, - runs: 200, - }, - }, - }, + } ], }, paths: { diff --git a/package.json b/package.json index bbfb603b..f775cb27 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,6 @@ "@nomiclabs/hardhat-web3": "^2.0.0", "@openzeppelin-2/contracts": "npm:@openzeppelin/contracts@2.5.1", "@openzeppelin-4/contracts": "npm:@openzeppelin/contracts", - "@openzeppelin/contracts": "^3.4.2", "@openzeppelin/contracts-upgradeable": "^4.9.3", "@openzeppelin/hardhat-upgrades": "^1.21.0", "@openzeppelin/upgrades-core": "^1.20.4", diff --git a/yarn.lock b/yarn.lock index fd17cb72..6fa8170d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -837,11 +837,6 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2-solc-0.7.tgz#38f4dbab672631034076ccdf2f3201fab1726635" integrity sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA== -"@openzeppelin/contracts@^3.4.2": - version "3.4.2" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2.tgz#d81f786fda2871d1eb8a8c5a73e455753ba53527" - integrity sha512-z0zMCjyhhp4y7XKAcDAi3Vgms4T2PstwBdahiO0+9NaGICQKjynK3wduSRplTgk4LXmoO1yfDGO5RbjKYxtuxA== - "@openzeppelin/hardhat-upgrades@^1.21.0": version "1.21.0" resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.21.0.tgz#e90fb7d858093f35a300b3a5a2fd32bca6179dfc"