Adapters
#
An Adapter is a contract that adapts the smart contracts of an exchange, yield farm, or other DeFi protocol to a common interface that allows it to be used by a Router contract.#
WhitelistThe StrategyProxyFactory contract holds the address of the platform's current Whitelist
contract. Anytime a contract attempts to interact with an adapter, it first must lookup the Whitelist
contract and check whether the address has been approved. The whitelist is managed by Enso Finance and the community.
#
SwapAll adapters must implement the swap()
function in order to be usable by Router contracts. Since it is expected that the Router will interact with the swap()
function via a delegate call the adapter's state variables (such as external contract addresses) must be defined in the deployment bytecode as constant
or immutable
variables.
#
Spot PriceAll adapters must implement the spotPrice()
function in order to be usable by Router contracts. This function estimates the price to exchange one token for another. Exchange fees are not included in the price estimate.
#
ExchangesEnso supports the following DEXes: Uniswap V2, Uniswap V3, Sushi, Balancer, Curve, and Synthetix. Interacting with these adapters allows a strategy to trade one token for another.
#
Liquidity PoolsEnso supports the following LPs: Uniswap V2, Sushi, and Curve. Interacting with these adapters allows a strategy to provide liquidity and passively earn trading fees.
#
VaultsEnso supports YEarn and Curve Gauge Rewards.
#
LendingEnso supports Aave and Compound for lending tokens in order to earn interest.
#
BorrowingEnso supports Aave for borrowing tokens for complex strategies such as getting into leveraged positions.