This repo holds Astrolab DAO's yield primitives.
-
Strategy abstract contracts 🎯
- As4626.sol (light-weight, full-featured ERC4626 tokenized vault implementation)
- StrategyV5.sol (strategy contract, extended by strategies, transparent proxy delegating to StrategyV5Agent)
- StrategyV5Agent.sol (common strategy logic, implementation inheriting from As4626)
- Add-ons 🧩
-
Implementations of DeFi multi-protocol, multi-chain strategies (cf. below)
-
Libs 📚
- AsMaths.sol
- AsArrays.sol
- AsAccounting.sol Strategy accounting helpers
- ChainlinkUtils.sol Chainlink specific oracle utils
- PythUtils.sol Pyth specific oracle utils
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.
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/CompoundV3MultiStake.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/CompoundV3MultiStake.test.ts --network tenderly
The repo imports @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
});
}
- AaveMultiStake
- HopMultiStake
- LodestarMultiStake
- VenusMultiStake
- SonneMultiStake
- CompoundV3MultiStake
- AaveV3MultiStake
- MoonwellMultiStake
- MoonwellLegacyMultiStake
- StargateMultiStake
- AgaveMultiStake
- BenqiMultiStake
- ...
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