|
2 | 2 |
|
3 | 3 | ## yVaults
|
4 | 4 |
|
| 5 | +### Dev Cheat Sheet (Examples) |
| 6 | + |
| 7 | +- **Vanilla ERC20 tokens** |
| 8 | + - Name: `${token.symbol()} or override yVault` |
| 9 | + - Symbol: `yv${token.symbol()} or override` |
| 10 | + - **Examples:** `USDC yVault`, `yvUSDC`, `aLINK yVault`, `yvaLINK` |
| 11 | +- **LP positions** |
| 12 | + - **Curve** |
| 13 | + - Name: `Curve + pool + Pool yVault` |
| 14 | + - **Examples:** `Curve sBTC Pool yVault`, `Curve 3pool yVault`, `Curve Y Pool yVault` |
| 15 | + - Symbol: `yvCurve-pool` |
| 16 | + - **Examples:** `yvCurve-sBTC`, `yvCurve-3pool`, `yvCurve-Y`. We make an exception for the last one and call it `yUSD`. |
| 17 | + - **Uniswap** |
| 18 | + - Name: `Uniswap + v${self.version()} + TOKEN-TOKEN + LP yVault` |
| 19 | + - **Examples:** `Uniswap v2 USDT-WETH LP yVault`, `Uniswap v2 WBTC-WETH LP yVault` |
| 20 | + - Symbol: `yvUni-TOKEN-TOKEN` |
| 21 | + - **Examples:** `yvUni-USDT-WETH`, `yvUni-WBTC-WETH` |
| 22 | + - Note: Version was included for Uniswap LP tokens to help limit confusion between UNI-v2 LP tokens and upcoming UNI-v3 LP tokens. |
| 23 | + - **Balancer** |
| 24 | + - Name: `Balancer + TOKEN-TOKEN + Pool yVault` |
| 25 | + - **Examples:** `Balancer USDT-WETH Pool yVault`, `Balancer WBTC-WETH Pool yVault` |
| 26 | + - Symbol: `yvBal-TOKEN-TOKEN` |
| 27 | + - **Examples:** `yvBal-USDT-WETH`, `yvBal-WBTC-WETH` |
| 28 | + - **SushiSwap** |
| 29 | + - Name: `SushiSwap + TOKEN-TOKEN + LP yVault` |
| 30 | + - **Examples:** `SushiSwap USDT-WETH LP yVault`, `Uniswap v2 WBTC-WETH LP yVault` |
| 31 | + - Symbol: `yvSushi-TOKEN-TOKEN` |
| 32 | + - **Examples:** `yvSushi-USDT-WETH`, `yvSushi-WBTC-WETH` |
| 33 | +- **Experimental** |
| 34 | + - No hard rules for `name` or `symbol`, just be sure to end `name` with "yVault". |
| 35 | + - **Examples:** `yveCRV-DAO yVault`, `yveCRV-DAO`, `St. Banteg of Yearn Patron of Plebs Lido St. Ether yVault`, `sboypoplyvstETH` |
| 36 | + |
| 37 | +### Overview and Explanation |
| 38 | + |
5 | 39 | - Acceptable alternative names include Yearn Vaults, or informally referring to the product as vaults.
|
6 |
| -- When referring to a specific yVault, the preferred name is generally `token name + yVault`; this matches the `name` field on the token contract. However, it is also acceptable to use `yvToken + Vault` or `yvToken`; the latter matches `symbol` in the contract. |
7 |
| - - **Examples:** `DAI yVault`, `yvDAI Vault`, or simply `yvDAI` |
| 40 | +- When referring to a specific yVault, the preferred name is generally `TOKEN + yVault`; this matches the `name` field on the yVault contract. However, it is also acceptable to use `yvTOKEN + Vault`, `Yearn + TOKEN + Vault` or `yvTOKEN`; the latter matches `symbol` in the contract. |
| 41 | + - **Examples:** `DAI yVault`, `yvDAI Vault`, `Yearn DAI Vault`, or simply `yvDAI` |
8 | 42 | - For each yVault, name and symbol conventions are as follows:
|
9 | 43 | - Name: `${token.symbol()} or override yVault`
|
10 | 44 | - Symbol: `yv${token.symbol()} or override`
|
11 | 45 | - A `version` field is included in the token contract to correspond to the major yVault release version.
|
12 |
| -- The predominant use case for name and symbol override is for LP tokens. |
13 |
| - - Curve |
| 46 | + - Additionally, developers may find it useful to denote `version` within the `name` field itself to help clarify the token to be deposited. Useful examples include Uniswap LPs (below), and also v1 vs v2 Aave aTokens. |
| 47 | +- The predominant use case for name and symbol override is for LP tokens. The use of the term `Pool` or `LP` is interchangeable, and will be selected based on colloquial use for each protocol. |
| 48 | + - For instance, Curve and Balancer LP positions are typically referred to as pools since they can contain more than two tokens, while Uniswap and SushiSwap positions are typically referred to as LPs. |
| 49 | + - **Curve** |
14 | 50 | - Name: `Curve + pool + Pool yVault`
|
15 | 51 | - **Examples:** `Curve sBTC Pool yVault`, `Curve 3pool yVault`, `Curve Y Pool yVault`
|
16 | 52 | - In this case, `pool` is taken directly from Curve.fi's UI, and we can adjust for capitalization as needed. In the case of the `3pool`, the redundant "Pool" is removed.
|
17 | 53 | - Symbol: `yvCurve-pool`
|
18 | 54 | - **Examples:** `yvCurve-sBTC`, `yvCurve-3pool`, `yvCurve-Y`
|
19 | 55 | - Note: In this methodology, `yvCurve-Y` refers to the vault previously known as `yUSD`. Please see below for a more detailed discussion on proper use of `yUSD`.
|
20 |
| - - Uniswap |
21 |
| - - Name: `Uniswap + v${self.version()} + TOKEN-TOKEN + Pool yVault` |
22 |
| - - **Examples:** `Uniswap v2 USDT-WETH Pool yVault`, `Uniswap v2 WBTC-WETH Pool yVault` |
| 56 | + - **Uniswap** |
| 57 | + - Name: `Uniswap + v${self.version()} + TOKEN-TOKEN + LP yVault` |
| 58 | + - **Examples:** `Uniswap v2 USDT-WETH LP yVault`, `Uniswap v2 WBTC-WETH LP yVault` |
23 | 59 | - Symbol: `yvUni-TOKEN-TOKEN`
|
24 | 60 | - **Examples:** `yvUni-USDT-WETH`, `yvUni-WBTC-WETH`
|
25 | 61 | - Note: Version was included for Uniswap LP tokens to help limit confusion between UNI-v2 LP tokens and upcoming UNI-v3 LP tokens.
|
26 |
| - - Balancer |
| 62 | + - **Balancer** |
27 | 63 | - Name: `Balancer + TOKEN-TOKEN + Pool yVault`
|
28 | 64 | - **Examples:** `Balancer USDT-WETH Pool yVault`, `Balancer WBTC-WETH Pool yVault`
|
29 | 65 | - Symbol: `yvBal-TOKEN-TOKEN`
|
30 | 66 | - **Examples:** `yvBal-USDT-WETH`, `yvBal-WBTC-WETH`
|
31 | 67 | - Note: Since Balancer allows more than two tokens per pool, append as many `TOKEN` as needed for the pool in question.
|
| 68 | + - **SushiSwap** |
| 69 | + - Name: `SushiSwap + TOKEN-TOKEN + LP yVault` |
| 70 | + - **Examples:** `SushiSwap USDT-WETH LP yVault`, `Uniswap v2 WBTC-WETH LP yVault` |
| 71 | + - Symbol: `yvSushi-TOKEN-TOKEN` |
| 72 | + - **Examples:** `yvSushi-USDT-WETH`, `yvSushi-WBTC-WETH` |
| 73 | + |
| 74 | +## yVault Want Token |
| 75 | + |
| 76 | +- In Yearn's UI, it may be useful to denote the desired token to deposit into a specific yVault. For basic ERC20 `want` tokens, `name` and `symbol` can be pulled directly from the token contract and utilized as-is. |
| 77 | + - **Examples:** `USD Coin`, `USDC`, `ChainLink Token`, `LINK` |
| 78 | +- However, for LP positions, naming needs to be standardized. |
| 79 | + - Curve |
| 80 | + - Name: `Curve + pool + Pool` |
| 81 | + - **Examples:** `Curve sBTC Pool`, `Curve 3pool`, `Curve Y Pool`, `Curve Compound Pool` |
| 82 | + - In this case, `pool` is taken directly from Curve.fi's UI, and we can adjust for capitalization as needed. In the case of the `3pool`, the redundant "Pool" is removed. |
| 83 | + - Symbol: `crvPOOL or override` |
| 84 | + - **Examples:** `crvBUSD`, `crvCOMP`, `crvGUSD`, `crvMUSD`, `crvTBTC`, `crvSBTC`, `yCRV`, `3Crv` |
| 85 | + - These names were chosen as `crvBUSD` and `crvSBTC` are already fairly widely used, and applying this formula works well for other pools. `yCRV` and `3Crv` are the allowed exceptions, as `yCRV` is the most widely used name for that pool, and `3Crv` usage is now fairly common with the recent admin fee distribution. |
| 86 | + - Uniswap |
| 87 | + - Name: `Uniswap + v${self.version()} + TOKEN-TOKEN + LP` |
| 88 | + - **Examples:** `Uniswap v2 USDT-WETH LP`, `Uniswap v2 WBTC-WETH LP` |
| 89 | + - Symbol: `TOKEN-TOKEN UNI` |
| 90 | + - **Examples:** `USDT-WETH UNI`, `WBTC-WETH UNI` |
| 91 | + - Balancer |
| 92 | + - Name: `Balancer + TOKEN-TOKEN + Pool` |
| 93 | + - **Examples:** `Balancer USDT-WETH Pool`, `Balancer WBTC-WETH Pool` |
| 94 | + - Symbol: `TOKEN-TOKEN BPT` |
| 95 | + - **Examples:** `USDT-WETH BPT`, `WBTC-WETH BPT` |
| 96 | + - Note: Since Balancer allows more than two tokens per pool, append as many `TOKEN` as needed for the pool in question. |
| 97 | + - SushiSwap |
| 98 | + - Name: `SushiSwap + TOKEN-TOKEN + LP` |
| 99 | + - **Examples:** `SushiSwap USDT-WETH LP`, `Uniswap v2 WBTC-WETH LP` |
| 100 | + - Symbol: `TOKEN-TOKEN SLP` |
| 101 | + - **Examples:** `USDT-WETH SLP`, `WBTC-WETH SLP` |
32 | 102 |
|
33 | 103 | ## yUSD
|
34 | 104 |
|
|
38 | 108 |
|
39 | 109 | ## yEarn
|
40 | 110 |
|
41 |
| -These are Yearn's original yield-aware tokens, whose v2 and v3 contracts can be found [here](https://docs.yearn.finance/developers/deployed-contracts-registry#v2-yield-tokens). |
42 |
| - |
| 111 | +- These are Yearn's original yield-aware tokens, whose v2 and v3 contracts can be found [here](https://docs.yearn.finance/developers/deployed-contracts-registry#v2-yield-tokens). |
43 | 112 | - These products should be referred to as yEarn Tokens, `underlying token name + Earn`, or `y{token.symbol()}v${self.version()}`
|
44 | 113 | - **Examples:** `yDAIv2`, `yDAI Earn`, `yBUSDv3`, `yBUSD Earn`
|
45 | 114 |
|
|
0 commit comments