Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(naming conventions): add mindmap #396

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 44 additions & 23 deletions docs/developers/v2/naming-convention.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,49 @@
# Naming Conventions

 

## yVaults

### Dev Cheat Sheet (Examples)
```mermaid
mindmap
root(Naming Conventions)
Vanilla_ERC20(Vanilla ERC20 Tokens)
Name_Vanilla(Name)
Symbol_Vanilla(Symbol)
LP_Positions(LP Positions)
Curve(Curve)
Name_Curve(Name)
Symbol_Curve(Symbol)
Uniswap(Uniswap)
Name_Uniswap(Name)
Symbol_Uniswap(Symbol)
Balancer(Balancer)
Name_Balancer(Name)
Symbol_Balancer(Symbol)
SushiSwap(SushiSwap)
Name_SushiSwap(Name)
Symbol_SushiSwap(Symbol)
Experimental(Experimental)
Rule_Experimental(No hard rules)
```

## Overview and Explanation

- **Vanilla ERC20 tokens**
- Acceptable alternative names include Yearn Vaults, or informally referring to the product as vaults.
- 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.
- **Examples:** `DAI yVault`, `yvDAI Vault`, `Yearn DAI Vault`, or simply `yvDAI`
- For each yVault, name and symbol conventions are as follows:
- Name: `${token.symbol()} or override yVault`
- Symbol: `yv${token.symbol()} or override`
- **Examples:** `USDC yVault`, `yvUSDC`, `aLINK yVault`, `yvaLINK`
- **LP positions**
- A `version` field is included in the token contract to correspond to the major yVault release version.
- 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.
- 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.
- 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.
- **Curve**
- Name: `Curve + pool + Pool yVault`
- **Examples:** `Curve sBTC Pool yVault`, `Curve 3pool yVault`, `Curve Y Pool yVault`
- 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.
- Symbol: `yvCurve-pool`
- **Examples:** `yvCurve-sBTC`, `yvCurve-3pool`, `yvCurve-Y`. We make an exception for the last one and call it `yUSD`.
- **Examples:** `yvCurve-sBTC`, `yvCurve-3pool`, `yvCurve-Y`
- 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`.
- **Uniswap**
- Name: `Uniswap + v${self.version()} + TOKEN-TOKEN + LP yVault`
- **Examples:** `Uniswap v2 USDT-WETH LP yVault`, `Uniswap v2 WBTC-WETH LP yVault`
Expand All @@ -27,34 +55,25 @@
- **Examples:** `Balancer USDT-WETH Pool yVault`, `Balancer WBTC-WETH Pool yVault`
- Symbol: `yvBal-TOKEN-TOKEN`
- **Examples:** `yvBal-USDT-WETH`, `yvBal-WBTC-WETH`
- Note: Since Balancer allows more than two tokens per pool, append as many `TOKEN` as needed for the pool in question.
- **SushiSwap**
- Name: `SushiSwap + TOKEN-TOKEN + LP yVault`
- **Examples:** `SushiSwap USDT-WETH LP yVault`, `Uniswap v2 WBTC-WETH LP yVault`
- Symbol: `yvSushi-TOKEN-TOKEN`
- **Examples:** `yvSushi-USDT-WETH`, `yvSushi-WBTC-WETH`
- **Experimental**
- No hard rules for `name` or `symbol`, just be sure to end `name` with "yVault".
- **Examples:** `yveCRV-DAO yVault`, `yveCRV-DAO`, `St. Banteg of Yearn Patron of Plebs Lido St. Ether yVault`, `sboypoplyvstETH`

### Overview and Explanation
### Dev Cheat Sheet (Examples)

- Acceptable alternative names include Yearn Vaults, or informally referring to the product as vaults.
- 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.
- **Examples:** `DAI yVault`, `yvDAI Vault`, `Yearn DAI Vault`, or simply `yvDAI`
- For each yVault, name and symbol conventions are as follows:
- **Vanilla ERC20 tokens**
- Name: `${token.symbol()} or override yVault`
- Symbol: `yv${token.symbol()} or override`
- A `version` field is included in the token contract to correspond to the major yVault release version.
- 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.
- 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.
- 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.
- **Examples:** `USDC yVault`, `yvUSDC`, `aLINK yVault`, `yvaLINK`
- **LP positions**
- **Curve**
- Name: `Curve + pool + Pool yVault`
- **Examples:** `Curve sBTC Pool yVault`, `Curve 3pool yVault`, `Curve Y Pool yVault`
- 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.
- Symbol: `yvCurve-pool`
- **Examples:** `yvCurve-sBTC`, `yvCurve-3pool`, `yvCurve-Y`
- 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`.
- **Examples:** `yvCurve-sBTC`, `yvCurve-3pool`, `yvCurve-Y`. We make an exception for the last one and call it `yUSD`.
- **Uniswap**
- Name: `Uniswap + v${self.version()} + TOKEN-TOKEN + LP yVault`
- **Examples:** `Uniswap v2 USDT-WETH LP yVault`, `Uniswap v2 WBTC-WETH LP yVault`
Expand All @@ -66,12 +85,14 @@
- **Examples:** `Balancer USDT-WETH Pool yVault`, `Balancer WBTC-WETH Pool yVault`
- Symbol: `yvBal-TOKEN-TOKEN`
- **Examples:** `yvBal-USDT-WETH`, `yvBal-WBTC-WETH`
- Note: Since Balancer allows more than two tokens per pool, append as many `TOKEN` as needed for the pool in question.
- **SushiSwap**
- Name: `SushiSwap + TOKEN-TOKEN + LP yVault`
- **Examples:** `SushiSwap USDT-WETH LP yVault`, `Uniswap v2 WBTC-WETH LP yVault`
- Symbol: `yvSushi-TOKEN-TOKEN`
- **Examples:** `yvSushi-USDT-WETH`, `yvSushi-WBTC-WETH`
- **Experimental**
- No hard rules for `name` or `symbol`, just be sure to end `name` with "yVault".
- **Examples:** `yveCRV-DAO yVault`, `yveCRV-DAO`, `St. Banteg of Yearn Patron of Plebs Lido St. Ether yVault`, `sboypoplyvstETH`

## yVault Want Token

Expand Down
Loading