Skip to content

Latest commit

 

History

History
126 lines (84 loc) · 3.45 KB

AlchemixReadme.md

File metadata and controls

126 lines (84 loc) · 3.45 KB

Protocol Name

Alchemix

Prize Pool TO BE FILLED OUT BY CYFRIN

  • Total Pool -

  • H/M -

  • Low -

  • Starts:

  • Ends:

  • nSLOC:

About the Project

The strategy utilises Yearn V3 strategy template & builds on top of Alchemix providing an automated strategy which allows users to earn yield on Alchemix tokens (primiarly alETH) by taking advantage of the discount of alETH from ETH. The strategy deposits to Alchemix's transmuter contract, an external keeper can claim alETH for WETH & execute a swap back to alETH at a premium to take advantage of any the alETH pricing relative to ETH

Documentation Transmuter Website Twitter GitHub

Actors

Keeper: Has permission to call claimAndSwap (i.e. complete a claim from the transmuter for underlying asset & swap back to alx token at premium)

Owner: Strategy owner - can call onlyOwner functions i.e. emergency functions within Yearn V3 tokenized strategy mix

Manager: Can call functions with onlyManagement modifier - in this strategy this allows for swap routes to be added (i.e. when swapping via Velo which route is used)

Depositor: Account that deposits the asset and holds Shares

Note there are additional roles within the Yearn V3 tokenized strategy mix that are not used in this strategy & out of scope.

Details here : https://docs.yearn.fi/developers/v3/strategy_writing_guide

Scope (contracts)

src/
├── StrategyArb.sol
├── StrategyMainnet.sol
├── StrategyOp.sol
├── interfaces
│   ├── IAlchemist.sol
│   ├── ICurve.sol
│   ├── IRamses.sol
│   ├── IStrategyInterface.sol
│   ├── ITransmuter.sol
│   ├── ITransmuterBuffer.sol
│   ├── IVelo.sol
│   └── IWhitelist.sol

Compatibilities

Blockchains: - Optimism - Arbitrum - Ethereum Tokens: - WETH - alETH - yTokens (based on Yearn V3 tokenized strategy mix : https://github.com/yearn/tokenized-strategy-foundry-mix)

Setup

  • First you will need to install Foundry. NOTE: If you are on a windows machine it is recommended to use WSL
  • Install Node.js

Set your environment Variables

Use the .env.example template to create a .env file and store the environement variables. You will need to populate the RPC_URL for the desired network(s). RPC url can be obtained from various providers, including Ankr (no sign-up required) and Infura.

Use .env file

  1. Make a copy of .env.example
  2. Add the value for OPTIMISM_RPC_URL and other example vars NOTE: If you set up a global environment variable, that will take precedence.

Build the project

make build

Run tests

Tests run in fork environment, you need to complete the full installation and setup to be able to run these commands.

make test

Run tests with traces (very useful)

make trace

Additionally tests can be run for specific chains using the following

make test-op
make test-arb
make test-mainnet

Known Issues

n/a