Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

EnsoFinance/strategy-builder-contracts-v1

Repository files navigation

V1-Core

Enso V1 core contracts allow users to create strategies for a set of assets within the Defi ecosystem.The contracts are made up of 5 core components: Strategy, StrategyController, Routers, Adapters, and the Oracle.

⚠️ Deprecated Codebase ⚠️

This codebase has been deprecated. Use this code at your own risk, and Enso does not take any responsibility for vulnerabilities or any impact thereafter from learning/utilizing this codebase.

Use at your own risk.

Installation

Github

git clone git@github.com:EnsoFinance/v1-core.git  

Truffle/Hardhat

yarn install @ensofinance/v1-core

Forge

forge install EnsoFinance/v1-core

Compile

yarn run build

Test

yarn run test

Docs

Contract Documentation

├── adapters
│   ├── BaseAdapter.sol
│   ├── borrow
│   │   ├── AaveBorrowAdapter.sol
│   │   └── Leverage2XAdapter.sol
│   ├── exchanges
│   │   ├── BalancerAdapter.sol
│   │   ├── CurveAdapter.sol
│   │   ├── SynthetixAdapter.sol
│   │   ├── UniswapV2Adapter.sol
│   │   └── UniswapV3Adapter.sol
│   ├── lending
│   │   ├── AaveLendAdapter.sol
│   │   └── CompoundAdapter.sol
│   ├── liquidity
│   │   ├── CurveLPAdapter.sol
│   │   └── UniswapV2LPAdapter.sol
│   ├── strategy
│   │   └── MetaStrategyAdapter.sol
│   └── vaults
│       ├── CurveRewardsAdapter.sol
│       └── YEarnV2Adapter.sol
├── libraries
│   ├── Math.sol
│   ├── SafeERC20.sol
│   ├── StrategyLibrary.sol
│   └── UniswapV2Library.sol
├── oracles
│   ├── EnsoOracle.sol
│   ├── estimators
│   │   ├── AaveDebtEstimator.sol
│   │   ├── AaveEstimator.sol
│   │   ├── BasicEstimator.sol
│   │   ├── CompoundEstimator.sol
│   │   ├── CurveEstimator.sol
│   │   ├── CurveGaugeEstimator.sol
│   │   ├── EmergencyEstimator.sol
│   │   ├── StrategyEstimator.sol
│   │   ├── UniswapV2Estimator.sol
│   │   └── YEarnV2Estimator.sol
│   ├── protocols
│   │   ├── ChainlinkOracle.sol
│   │   ├── ProtocolOracle.sol
│   │   └── UniswapV3Oracle.sol
│   └── registries
│       ├── ChainlinkRegistry.sol
│       ├── CurveDepositZapRegistry.sol
│       ├── TokenRegistry.sol
│       └── UniswapV3Registry.sol
├── routers
│   ├── BatchDepositRouter.sol
│   ├── FullRouter.sol
│   ├── GenericRouter.sol
│   ├── LoopRouter.sol
│   └── StrategyRouter.sol
├── PlatformProxyAdmin.sol
├── StrategyController.sol
├── StrategyControllerStorage.sol
├── StrategyProxyAdmin.sol
├── StrategyProxyFactory.sol
├── StrategyProxyFactoryStorage.sol
├── Strategy.sol
├── StrategyToken.sol
├── StrategyTokenStorage.sol
└── Whitelist.sol