# YDR v1.0 - minimum viable product (MVP)
### Inaugurating index: BSCX (BSC Maximus Index)
- YDR - 5% (0x3757232b55e60da4a8793183ac030cfce4c3865d)
- Farming done with our own staking protocol
- WBNB - 18% (0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c)
- Farm on BIFI
- CAKE - 25% (0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82)
- Farm on PCS: 0x73feaa1eE314F8c655E354234017bE2193C9E24E
- BAKE - 5% (0xE02dF9e3e622DeBdD69fb838bB799E3F168902c5)
- Farm on Bakeryswap: 0x6a8DbBfbB5a57d07D14E63E757FB80B4a7494f81
- BANANA - 22% (0x603c7f932ed1fc6575303d8fb018fdcbb0f39a95)
- Farm on Apeswap: 0x5c8D727b265DBAfaba67E050f2f739cAeEB4A6F9
- BIFI - 5% (0xCa3F508B8e4Dd382eE878A314789373D80A5190A)
- Farm on BIFI
- BSCS - 10% (0xbcb24afb019be7e93ea9c43b7e22bb55d5b7f45d)
- Farm on BSCS
- COW - 5% (0x422E3aF98bC1dE5a1838BE31A56f75DB4Ad43730)
- Farm on COW
- NFTY - 5% (0xe1d7c7a4596b038ced2a84bf65b8647271c53208)
- Farm on BIFI
### Inaugurating index: BSCX (BSC Maximus Index)
- CAKE - 25%
- BANANA - 22%
- WBNB - 18%
- BSCS - 10%
- YDR - 5%
- BAKE - 5%
- BIFI - 5%
- COW - 5%
- NFTY - 5%
### Roadmap
- Q4 2021
- YDR & YDR LP staking
- BSCX index launch
- BSCX staking launch
- Bridge YDR to AVAX
- AVX index launch
- AVX staking launch
- Q1 2022
- Governance expansion
- Bridge YDR to FTM
- FTM index launch
- FTM staking launch
- Bridge YDR to Polygon
- Polygon index launch
- Polygon staking launch
- Q2 2022
- Introduction of experimental indexes
- Increased index minting flexibility
- Reward auto-compounding features
- YDragon mobile app launch
### Fees
- Minting index token during index minting event (IME) - 0%
- Minting index token after minting event - 0.5% fee distributed to Z vault
- Redeeming index token - 2% with some dynamic fee change depending on XY vault; fee distributed to Z vault
- Note: dynamic fee structure should be well communicated to users
- Idea for formula:
- While X vault is 75-100%: flat 2% redeeming fee
- X vault between 25-75%: linearly grows to 6% fee as X vault decreases towards 25% of TVL (TVL in X vault), assuming 25% is the rebalancing point
- So formula would be...
**If(current%X >= 0.75): fee = 0.02
Else: fee = 0.06 - 4(current%X - rebalance%X)/50**
- Some examples:
- X vault is at 75%. User wants to redeem, his fee would be:
- 0.06 - 4*(0.75 - 0.25)/50 = 0.02
- X vault is at 50%, we rebalance when it reaches 25%. User wants to redeem, his fee would be:
- 0.06 - 4*(0.5 - 0.25)/50 = 0.04
- X vault is at 25%, we are about to rebalance. User wants to redeem, his fee would be:
- 0.06 - 4*(0.25 - 0.25)/50 = 0.06
- % of trading fees per index token - 0.25% Fee on transfer/trade of index tokens distributed to Z vault
### Minting
*Before IME*: Mint with stable coin (USDT, USDC, BUSD) (we will rebalance everything for the minting event) **OR** mint with the most liquid asset of blockchain used for the index (BNB), in addition to ETH to capture the most amount of users. Index tokens will be delivered as BEP20.
*After IME*: Mint with stable coin **OR** with underlying assets proportionally to the asset proportions in the index **OR** mint with most liquid asset of blockchain used for the index (BNB), in addition to ETH.
### Redeeming
Redeem into the underlying assets (YDR, BNB, CAKE, XVS, BIFI, AUTO) or redeem into stable coins
### Index Minting Event (IME)
IME involves the following actions:
#### Initial index/portfolio balancing: ####
- Collateral is a combination of stablecoin and BNB and ETH
- Calculate NAV of collateral, categorized by coin
- Calculate how much of each coin we should have, these will be our target value per coin
- Buy the missing assets with the stable coin, starting with the least liquid
- Swap the oversubscribed assets (if any) into the undersubscribed assets
- Split the collateral into 20/80 XY Vault
- Initialize yield farming for each asset in Y vault
##### EXAMPLE #####
We raised $1,000,000. We have:
1000 BNB, $600 per BNB = 600,000
400,000 USDT = 400,000
TOTAL = 1,000,000
Our TARGET values are, for $1,000,000:
BNB: 250,000
CAKE: 250,000
XVS: 180,000
BIFI: 150,000
AUTO: 150,000
YDR: 20,000
USDT: 0
TOTAL: 1,000,000
Missing to achieve TARGET ('+' indicates a buy):
BNB: -350,000
CAKE: +250,000
XVS: +180,000
BIFI: +150,000
AUTO: +150,000
YDR: +20,000
USDT: -400,000
TOTAL: 0
Now we buy missing assets with USDT, starting with the less liquid.
In order:
Buy YDR (USDT is now 380,000),
Buy BIFI (USDT is now 230,000),
Buy AUTO (USDT is now 80,000),
Buy 80,000 XVS, (USDT is now 0).
Missing to achieve TARGET, after USDT liquidation:
BNB: -350,000
CAKE: +250,000
XVS: +100,000
BIFI: 0
AUTO: 0
YDR: 0
USDT: 0
Now we swap the BNB into the undersubscribed assets.
In our case, we swap $250,000 worth of BNB into CAKE,
and the remaining $100,000 of BNB into XVS.
The index collateral is now balanced - next step is to split into X/Y:
BNB: 250,000 -> 50,000 / 200,000
CAKE: 250,000 -> 50,000 / 200,000
XVS: 180,000 -> 36,000 / 144,000
BIFI: 150,000 -> 30,000 / 120,000
AUTO: 150,000 -> 30,000 / 120,000
YDR: 20,000 -> 4,000 / 16,000
TOTAL: 1,000,000 -> 200,000 / 800,000
The Y vault funds are now ready to yield farm (see below).
##### Special considerations and notes #####
- Initial portfolio balancing needs to be careful of price impact on the underlying assets. Depending on how much collateral we raise, and depending on the liquidity of each of the underlying assets, initial balancing can take time.
- For example if we need to buy 500,000 of BIFI, which has a daily volume of 3,000,000 on PancakeSwap, we cannot buy everything at once. Do devs need a formula for this?
- Slippage and time needed for initial balance will affect the portfolio balance - it will be impossible to achieve the exact TARGET percentages. The goal is to approach the TARGET as much as possible.
- How to DCA into underlying index assets during index minting event - we are still discussing the details internally. To be determined (this affects how long index minting takes, how many index tokens to give out depending on user collateral, etc.).
### Liquidity Source for each asset
- CAKE:
- Pancakeswap https://pancakeswap.finance/
- WBNB:
- Pancakeswap https://pancakeswap.finance/
- BAKE:
- BakerySwap https://www.bakeryswap.org/#/home
- BIFI:
- Pancakeswap https://pancakeswap.finance/
- BANANA:
- Mdex https://mdex.com/#/
### Yield farming after IME
- After IME, minting/redeeming action can cause the Y vault to keep growing: call this ∆Y
- Yield farming will immediately start with ∆Y (after buying up the underlying assets), regardless of how small it is
### Yield farming protocols (1 or 2 options for each asset)
The following assets have potential yield farming protocols listed. Choose the one that makes the most sense based on ease of integration and reliability.
- CAKE:
- Pancakeswap: "Auto Cake" pool https://pancakeswap.finance/
- Rewards: CAKE
- WBNB:
- Beefy finance using Venus https://beefy.finance/
- Rewards: WBNB
- BAKE:
- Bakeryswap "Bread" pool (v2) https://www.bakeryswap.org/#/bakery
- Rewards: BAKE
- BIFI:
- Bifi Maxi pool on Beefy finance https://beefy.finance/
- Rewards: BIFI
- BANANA (Apeswap):
- Banana pool https://autofarm.network/
- Rewards: BANANA
### Yield farming harvest
##### Harvesting happens every week at a specific time and date
- **IMPORTANT 12/05**
- Please consider the below automated harvesting schedule as plans for the future - initially, harvesting the generated yield (that goes into the Z vault) will be done manually.
- First harvest for each asset happens exactly one week after the IME
- Every subsequent harvest happens 7 days after the previous harvest, or after a yield farming reset is triggered because of the following:
- yield farm protocol change
- portfolio rebalancing
- XY vault rebalancing
##### Some examples: #####
Yield farming protocol is changed:
- Harvest cycles for each asset happen 5 days from now (day 2 of 7 of harvest cycle)
- Today we change the BNB yield farm from BUNNY to Venus, so we have to...
- harvest current BNB rewards into Z,
- remove 100% of BNB from BUNNY yield farm,
- stake our BNB into Venus.
- Now first BNB harvest (with BUNNY yield farming) will happen 7 days from now
Portfolio rebalance happens where we swap CAKE for ABC:
- Harvest cycles for each asset happen 3 days from now (day 4 of 7 of harvest cycle)
- Today a portfolio rebalance happens: we sell 15% of CAKE to purchase 15% of ABC. So we have to...
- harvest current CAKE rewards into Z,
- remove 100% of CAKE from yield farming,
- swap CAKE into ABC periodically (based on asset rebalancing algo
[NOTE: however long the CAKE->ABC swap takes, the yield farming on the other assets continues as usual. Minting and redeeming is paused.]
- new ABC is put into yield farming when all of CAKE is swapped into ABC.
- Next ABC harvest will happen 7 days from now
Y vault grows:
- Harvest cycles for each asset happen 1 day from now (day 6 of 7)
- Today we have a new minting that injects 10000 USDT into collateral
- So value of 8000 goes into Y vault
- All underlying assets are purchased with the 8000 USDT and start yield farming
- Next harvest still happens 1 day from now because there was no yield farming reset
XY vault is rebalanced:
- Harvest cycles for each asset happen 6 days from now (day 1 of 7)
- Today X vault funds reach 5% which triggers a rebalance:
- harvest Y vault rewards into Z,
- Y funds exit yield farming and a portion is pooled into X (to restore 20/80 ratio),
- Y funds go back to yield farming.
- Next harvests for each asset happen 7 days from now (reset)
##### Harvest goes directly into Z vault
- Harvested tokens go directly into the Z vault - no token swapping involved
- Z vault reward distribution program still to be discussed internally. Please wait for additional documentation.
##### Portfolio rebalance notes
- Two types of portfolio rebalances
- Swapping one asset for another
- Changing asset percentages
- Portfolio rebalance can take a long time - up to a few days
- During that time minting and redeeming is disabled (06/05: to be discussed on next call)
- Yield farming is only stopped for assets that are meant to be sold, fully or partially (only topping up assets does not stop yield farming)
- For example
- Portfolio rebalance is triggered and we swap CAKE for ABC
- Minting and redeeming of index tokens is (to be discussed)
- CAKE yield farming is paused during portfolio rebalance period
- ABC yield farming starts when it is fully available in the index (and therefore no more CAKE in the index)
- Portfolio rebalance is triggered and we adjust percentages where more CAKE and BIFI has to be bought, and BNB has to be sold partially
- Minting and redeeming of index tokens is paused (to be discussed)
- BNB yield farming is paused
- CAKE and BIFI yield farming is topped up once it is fully bought in the scope of the rebalance
# Z Vault Structure
* Y vault assets are "put to work" by staking and/or yield farming on protocols chosen by the YDR team. For example:
* If ETH is in the index, ETH from the index's Y vault will be staked on a smart contract chosen by the team to earn yield.
* Yield generated with the Y vault will be stored in a separate Z vault
* Z vault yield will be swapped into the most liquid asset on the index's blockchain - for our initial index, this will be BNB.
* Who benefits from Z vault:
* Index token stakers
* Index LPers
* YDR token stakers
* YDR token LPers
* Other reward programs
### Z vault rules
- Harvest from the Y vault will end up in the Z vault
- There exists one Z vault per index
- Staking rewards for Index token stakers will be taken from the Z vault that is tied to the index
- Staking rewards for YDR token stakers will be taken from all Z vaults - more on that later.
##### Z vault reward distribution denominations
- Z vault funds will be swapped into and distributed in BNB, setting a precedent that indexes lying on one chain have their yield distributed in the most liquid and popular asset
##### Z vault reward distribution methods
- **"Harvest"** button
- Harvest rewards in BNB - one of two ways, whichever is easier to implement on the dev side
- Either swap into BNB with Z funds when user clicks "harvest", **OR**
- Swap into BNB whenever yield is harvested from protocols
##### Z vault reward channels
- Z vault for a given index is used to distribute rewards to the following ecosystem participants:
- Index token stakers
- Index token liquidity providers
- YDR token stakers
- YDR token liquidity providers
- Additionally, part of the Z vault will be put aside in a treasury for potential incentive programs.
- This portion of the Z vault will be managed manually
- **Initially**, these funds will be allocated into a separate wallet and compounded using the same yield generation protocols as for the index's Y vault
##### Z vault reward channel proportions:
- Index token stakers (total: 8% of Z vault allocation)
- 1-month stakers
- 0.8%
- 3-month stakers
- 2.4%
- 12-month stakers
- 4.8%
- Index token LP (total: 12% of Z vault allocation)
- 1-month LP
- 1.2%
- 3-month LP
- 3.6%
- 12-month LP
- 7.2%
- YDR token stakers (total: 30% of Z vault allocation)
- 1-month stakers
- 3%
- 3-month stakers
- 9%
- 12-month stakers
- 18%
- YDR token LP (total: 40% of Z vault allocation)
- 1-month LP
- 4%
- 3-month LP
- 12%
- 12-month lP
- 24%
- Treasury: 10%
## Staking Penalty Structure
- Stakers lose 25% of their original stake which gets put into the respective Z vault(s).
- Rewards accumulated up to that point should be distributed.
- Staking penalties accrued from YDR and YDR-LP unstakers get distributed to all Z vaults equally (reminder: YDR token stakers accumulate rewards from all available Z vaults)
- Unstaking involves harvesting the remaining reward balance and penalizing the user if unstake event happens within the staking period (i.e. 1 month, 3 months, or 12 months)
- After the period has expired, the user has to unstake and restake to keep his funds staked in the ecosystem.
**In the smart contract we'll need a parameter for fees structure**
Idea for future development:
- Stakers lose 2% per month remaining in the staking period that they originally commited to.
## Harvest Structure
- Provide 2 harvesting options:
- "Harvest" button, **AND**
- "Harvest and unstake" button (which would incure a penalty if unstaking before staking lockup period ends)