Skip to content

aloelabs/aloe-blend

Repository files navigation

Aloe Blend

dapptools

This repository contains the core smart contracts for the Aloe Blend Protocol.

Bug bounty

Contracts in this repository are included in Aloe Labs' Immunefi bug bounty program. Please see immunefi.com/bounty/aloeprotocol/ for more info.

Disclaimer

This is experimental software and is provided on an "as is" and "as available" basis. We do not give any warranties and will not be liable for any loss incurred through any use of this codebase.

Environment

This repository is set up to work with both Hardhat and dapptools. Most tests rely on dapptools, but it's easier to get started with Hardhat:

yarn install
yarn build-hh
yarn test-hh

If you prefer dapptools, follow the instructions here to install it. Once that's done, you can run the following:

yarn install
yarn build-dapp
yarn test-dapp

If things aren't working, make sure you populate a .env file as shown in .env.template. Also make sure that you run git submodule init and git submodule update after cloning.

Contracts

AloeBlend -- "Holds and manages assets for a single Uniswap pair"
Factory -- "Coming soon"
VolatilityOracle -- "Oracle that computes implied volatility for any Uniswap pair"

interfaces
|-- IAloeBlend -- "Describes user-facing functions of the vault"
|-- IFactory -- "Describes user-facing functions of the factory"
|-- ISilo -- "Prescribes functions that every silo must have"
|-- IVolatilityOracle -- "Describes user-facing functions of the volatility oracle"
libraries
|-- FixedPoint96
|-- FixedPoint128
|-- FullMath -- "Allows for full precision uint256 multiplication"
|-- LiquidityAmounts -- "Translates liquidity to amounts or vice versa"
|-- Oracle -- "Helps with low-level queries to Uniswap oracles"
|-- Silo -- "Helps delegatecall to the silos a vault is using"
|-- TickMath -- "Translates ticks to prices or vice versa"
|-- Uniswap -- "Improves readability of Uniswap interactions"
|-- Volatility -- "Computes implied volatility from observed swap fee earnings"
silos
|-- CompoundCEtherSilo -- "A silo for WETH that earns interest from Compound (cETH)"
|-- CompoundCTokenSilo -- "A silo that works with a number of tokens by depositing to Compound (cTokens)"
|-- FuseFEtherSilo -- "A silo for WETH that earns interest from a Fuse pool (fETH)"
|-- FuseFTokenSilo -- "A silo that works with a number of tokens by depositing to a Fuse pool (fTokens)"

Documentation

Code comments and natspec should be considered the primary source of truth regarding this code. That said, additional documentation is available at docs.aloe.capital.

About

Maximizing liquidity utilization while maintaining 50/50 inventory ratio

Resources

License

Stars

Watchers

Forks