AstrolabDAO / strats

Home of Astrolab strategies
Other
15 stars 11 forks source link
Astrolab Strategies

by Astrolab DAO

License Discord Chat Astrolab Docs

This repo holds Astrolab DAO's yield primitives and dependencies.

Besides harvesting/compounding automation (cf. Astrolab Botnet), most of CSA and NSA strategies have off-chain components (eg. cross-chain arb, triangular arb, carry trading), which are not part of this repository, and kept closed-source as part of our Protocol secret sauce.

Disclaimer ⚠️

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.

Content

Testing

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/CompoundV3Optimizer.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/CompoundV3Optimizer.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 .json
  });
}

Strategy Types

Type Symbol Description Maximum Leverage Underlyings
Lending LND Liquidity providing to highly utilized money markets or CDP issuers (eg. Maker, Frax) 20:1 Stables, ETH, BTC, LSDs, LRTs
Spot Market Making SMM Liquidity providing to bridges (eg. Stargate, Connext) and spot DEXs (eg. Uniswap V2's volatile market making aka. vAMM, Curve's stable market making aka. sAMM, Uniswap V3 concentrated liquidity market making aka. CLMM) direct or delegated to ALMs (active liquidity managers, eg. Gamma for CLMM, Elixir for central limit order books aka. CLOBs) 20:1 Stables, ETH, BTC, LSDs, LRTs
Derivatives Market Making DMM Liquidity providing to derivatives DEXs (eg. GMX, Hyperliquid, Gains) direct or delegated to liquidity managers (eg. Pendle, Elixir for CLOBs) 20:1 Stables, ETH, BTC, LSDs, LRTs
Unsecured Govt Debt UGD Liquidity providing to government debt (eg. US treasuries) through relevant on-chain issuers (e.g. Ondo, Backed) 10:1 Stables
Unsecured Corp Debt UCD Liquidity providing to corporate debt through relevant on-chain issuers (e.g. Maple, Clearpool, Goldfinch) 10:1 Stables
Hyper Staking HST Augmented staking (direct or delegated eg. Lido, Rocket Pool, Ankr, Coinbase, Binance) with restaking (eg. EigenLayer) and LSD arbitrage 20:1 Stables, ETH, BTC, LSDs, LRTs
Covered Stat Arb CSA Delta-neutral trading: carry trading (direct or delegated eg. Ethena), cross-DEX and cross-chain arbitrage 500:1 Stables, ETH, BTC, LSDs, LRTs, Alts
Naked Stat Arb NSA High delta trading: crypto, FX, and equity derivatives (trend following, momentum, mean reversal) 500:1 Stables, ETH, BTC, LSDs, LRTs, Alts
Insurance INS Liquidity providing to protocol-specific (eg. AAVE Umbrella) or multi-protocol (eg. Nexus Mutual) insurers 10:1 Stables, ETH, BTC, Alts
Services SER Liquidity providing to infrastructure providers (governance, identity, gaming, betting eg. ) 10:1 Stables, ETH, BTC, Alts
Composite CMP Structured product that cannot fit a single of the above categories (eg. Astrolab Composites) 10:1 Stables, ETH, BTC, LSDs, LRTs

Strategies

Primitives

Name Type Identifier Status Compatible Chains
AaveV3 Optimizer LND AAVE3-O βœ”οΈ Tested
AaveV3 Arbitrage LND AAVE3-A 🚧 WIP
Compound V3 Optimizer LND COMP3-O βœ”οΈ Tested
Compound V3 Arbitrage LND COMP3-A 🚧 WIP
Venus Optimizer LND XVS-O βœ”οΈ Tested
Venus Arbitrage LND XVS-A βœ”οΈ Tested
Lodestar Optimizer LND LODE-O βœ”οΈ Tested
Lodestar Arbitrage LND LODE-A βœ”οΈ Tested
Moonwell Optimizer LND WELL-O βœ”οΈ Tested
Moonwell Arbitrage LND WELL-A 🚧 WIP
Benqi Optimizer LND QI-O βœ”οΈ Tested
Benqi Arbitrage LND QI-A 🚧 WIP
Agave Optimizer LND AGVE-O ☠️ Axed
Agave Arbitrage LND AGVE-A ☠️ Axed
Sonne Optimizer LND SONNE-O ☠️ Axed
Sonne Arbitrage LND SONNE-A ☠️ Axed
Stargate Optimizer SMM STG-O βœ”οΈ Tested
Stargate V2 Optimizer SMM STG2-O 🚧 WIP
Hop Optimizer SMM HOP-O βœ”οΈ Tested
Synapse Optimizer SMM SYN-O 🚧 WIP
Connext Optimizer SMM NEXT-O 🚧 WIP
Across Optimizer SMM ACX-O 🚧 WIP
Uniswap V3 Optimizer SMM UNI3-O 🚧 WIP
Uniswap V4 Optimizer SMM UNI4-O 🚧 WIP
Thena Optimizer SMM THE-O βœ”οΈ Tested
Camelot Optimizer SMM GRAIL-O 🚧 WIP
Velodrome Optimizer SMM VELO-O 🚧 WIP
Aerodrome Optimizer SMM AERO-O 🚧 WIP
Toros Optimizer DMM TOROS-O 🚧 WIP

Composites

Name Type Identifier Status Compatible Chains
Astrolab Composite USD CMP acUSD 🚧 WIP
Astrolab Composite ETH CMP acETH 🚧 WIP
Astrolab Composite BTC CMP acBTC 🚧 WIP

Integrated/Watched Protocols πŸ‘€

Staking

Primitives

Derivatives

ReStaking

Primitives

RWA

Primitives

Money Markets

Primitives

Derivatives

Spot DEXs

Primitives

Derivatives

Derivatives DEXs

Primitives

Derivatives

Structured Finance

Primitives

Derivatives

Bridges

Primitives

Derivatives

Yield Aggregators

Credits

Special thanks to peer aggregators who also open source their strategies

Contributing

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