Skip to content

AstrolabDAO/strats

Repository files navigation

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), 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.

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

  • 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 📚

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

Strategies 🚧

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

Releases

No releases published

Packages

No packages published