This repo holds Astrolab DAO's yield primitives and dependencies.
Besides harvesting/compounding automation (cf. Astrolab Botnet), some of the strategies have off-chain components (eg. cross-chain arb, statistical arb, triangular arb, carry trading etc.), which are not part of this repository, and kept closed-source as part of our Protocol secret sauce.
Astrolab DAO and its core team members will not be held accountable for losses related to the deployment and use of this repository's codebase. As per the licence states, the code is provided as-is and is under active development. The codebase, documentation, and other aspects of the project may be subject to changes and improvements over time.
-
Core contracts
- StrategyV5.sol 🎯 Strategy base contract, extended by all, delegating common logic to StrategyV5Agent
- StrategyV5Agent.sol 🎭 Shared strategy back-end, inheriting from As4626
-
Base contracts
- As4626.sol 📦 Full-featured ERC4626 tokenized vault implementation
- AsPermissioned 🛡️
AccessController
consummer enabling contract RBAC - AsPriceAware 📡
PriceProvider
consummer feeding contracts with live exchange rates - AsFlashLender 🏦 Grants the contract EIP-3156 flash lending capabilitites
- AsRescuable ⛑️ Grants the contract native and ERC20 emergency token rescue capabilities
-
Standalone deployments
- AccessController 🛡️ DAO's standalone access controller used for RBAC
- PriceProvider 📡 Oracle adapter dedicated to price retrieval from Chainlink, Pyth, Redstone and more
- BridgeAdapter ⛓️ Bridge adapter dedicated to cross-chain interoperability through Axelar, LayerZero and more. Powers the DAO's cross-chain composite Strategies, acUSD, acETH and acBTC (to be migrated from v1 repo)
- Swapper ♻️ DAO's standalone liquidity aggregator
-
Implementations of DeFi multi-protocol, multi-chain strategies (cf. below)
-
Libs 📚
- AsCast.sol Safe and unsafe casting
- AsMaths.sol Standard maths library, built from OZ's, ABDK's, PRB's, Uniswap and more
- AsArrays.sol Array manipulation
- AsAccounting.sol Strategy accounting helpers
Testing As4626+StrategyV5 with Hardhat (make sure to set HARDHAT_CHAIN_ID=42161
in .env
to run the below test to be successful):
yarn test-hardhat # yarn hardhat test test/Compound/CompoundV3.test.ts --network hardhat
Testing As4626+StrategyV5 with Tenderly (make sure to set TENDERLY_CHAIN_ID=42161
and define your tenderly fork ids in .env
for the below test to be successful):
yarn test-tenderly # yarn hardhat test test/Compound/CompoundV3.test.ts --network tenderly
Foundry tests are also in the works, used for fuzzing, drafting and debugging (not integration as test suites require extensive data manipulation and http querying).
The repo depends on @astrolabs/hardhat, therefore you can use our generic deployment functions for fine-grain partial deployments of the stack:
import { deployAll } from "@astrolabs/hardhat";
async function main() {
await deployAll({
name: "AsMaths", // deployment unit name
contract: "AsMaths", // contract name
verify: true, // automatically verify on Tenderly or relevant explorer
export: false, // do not export abi+deployment .son
});
}
- AaveV3
- Hop
- Lodestar
- Venus
- Sonne
- CompoundV3
- AaveV3
- Moonwell
- MoonwellLegacy
- Stargate
- Agave
- Benqi
- and more
Primitives
- Lido/stETH
- RocketPool/rETH
- StakeWise/rETH2
- Stader/ETHx
- Swell/swETH
- Frax/sfrxETH
- Coinbase/cbETH
- Binance/wBETH
Derivatives
Primitives
Primitives
- Spark/sDAI
- stUSDT
- Ondo/USDY/OUSG
KYC
- Matrixdock/STBT
KYC
- OpenEden/TBill
KYC
- BackedFi/bIB01
KYC
- Hashnote/USYC
KYC
- Goldfinch
- Centrifuge
- Maple
- TrueFi
Primitives
- AAVE V2
- AAVE V3
- Compound V2
- Compound V3
- JustLend
- Spark
- Frax
- Silo
- Venus
- Radiant
- Agave
- Lodestar
- Abracadabra
Derivatives
Primitives
- Uniswap V2
- Uniswap V3
- Uniswap V4
- Balancer V1
- Balancer V2
- Curve
- Maverick
- Sushi
- PancakeSwap
- QuickSwap
- Trader Joe
- KyberSwap
- DODO
- Wombat
- Biswap
- Camelot
- Velodrome
- iZUMi/iZiSwap
- SyncSwap
Derivatives
Primitives
Derivatives
Primitives
Derivatives
Primitives
Derivatives
Special thanks to peer aggregators who also open source their strategies
Contributions are welcome, the DAO is always open to team up with like-minded builders and strategists. Find us on Discord by day or night 🌞🌛 Up to 20% of a strategy PnL is claimable to their rightful designer.
Astrolab DAO vetting process on strategy submission is in the works, and will be similar to that of Yearn
Feel free to open an issue or create a pull request if you have any improvements or suggestions.
Started with ❤️ at DevCon/EthGlobal IST 2023