Skip to content

Commit 9d84c7b

Browse files
committed
adding readme for audit
1 parent e1369ea commit 9d84c7b

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed

AlchemixReadme.md

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Protocol Name
2+
Alchemix
3+
4+
### Prize Pool TO BE FILLED OUT BY XXXX
5+
6+
- Total Pool -
7+
- H/M -
8+
- Low -
9+
- Community Judging -
10+
11+
- Starts:
12+
- Ends:
13+
14+
- nSLOC:
15+
16+
[//]: # (contest-details-open)
17+
18+
## About the Project
19+
20+
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 potential depegs. 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 depeg of alETH vs WETH.
21+
22+
```
23+
About
24+
25+
This project is meant to enable smart contract auditors (sellers) and smart contract protocols
26+
looking for audits (buyers) to connect using a credibly neutral option, with optional arbitration.
27+
28+
[Documentation](https://docs.alchemix.fi/)
29+
[Transmuter](https://docs.alchemix.fi/alchemix-ecosystem/transmuter)
30+
[Website](https://alchemix.fi/)
31+
[Twitter](www.twitter.com/AlchemixFi)
32+
[GitHub](www.GitHub.com/account)
33+
```
34+
35+
## Actors
36+
37+
38+
Keeper: Has permission to call claimAndSwap (i.e. complete a claim from the transmuter for underlying asset & swap back to alx token at premium)
39+
Owner: Strategy owner - can call onlyOwner functions i.e. emergency functions within Yearn V3 tokenized strategy mix
40+
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)
41+
Depositor: Account that deposits the asset and holds Shares
42+
43+
Note there are additional roles within the Yearn V3 tokenized strategy mix that are not used in this strategy & out of scope.
44+
Details here : https://docs.yearn.fi/developers/v3/strategy_writing_guide
45+
46+
[//]: # (contest-details-close)
47+
48+
[//]: # (scope-open)
49+
50+
## Scope (contracts)
51+
52+
```
53+
src/
54+
├── StrategyOp.sol
55+
├── interfaces
56+
│ ├── IAlchemist.sol
57+
│ └── ITransmuter.sol
58+
│ └── IVeloRouter.sol
59+
```
60+
61+
## Compatibilities
62+
63+
Blockchains:
64+
- Optimism
65+
Tokens:
66+
- WETH
67+
- alETH
68+
- yTokens (based on Yearn V3 tokenized strategy mix : https://github.com/yearn/tokenized-strategy-foundry-mix)
69+
70+
71+
[//]: # (scope-close)
72+
73+
[//]: # (getting-started-open)
74+
75+
## Setup
76+
77+
- First you will need to install [Foundry](https://book.getfoundry.sh/getting-started/installation).
78+
NOTE: If you are on a windows machine it is recommended to use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install)
79+
- Install [Node.js](https://nodejs.org/en/download/package-manager/)
80+
81+
### Set your environment Variables
82+
83+
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](https://www.ankr.com/rpc/) (no sign-up required) and [Infura](https://infura.io/).
84+
85+
Use .env file
86+
87+
1. Make a copy of `.env.example`
88+
2. Add the value for `OPTIMISM_RPC_URL` and other example vars
89+
NOTE: If you set up a global environment variable, that will take precedence.
90+
91+
### Build the project
92+
93+
```sh
94+
make build
95+
```
96+
97+
Run tests
98+
99+
```sh
100+
make test-op
101+
```
102+
103+
## Known Issues
104+
105+
n/a

0 commit comments

Comments
 (0)