diff --git a/README.md b/README.md index 70a9e7eaa..9750f130f 100644 --- a/README.md +++ b/README.md @@ -120,3 +120,47 @@ npm run docusaurus docs:version 0.4.5 ``` If you are developing in Solidity and Foundry you can use `[forge-doc](https://book.getfoundry.sh/reference/forge/forge-doc)` + +### Custom Elements + +#### Detail Element + +This is a Detail element that contains other text inside. If you format the summary section as shown it renders markdown correctly. + +``` +
+ + + + ## Title Here + + + +### Subtitles as needed + +content here + +
+``` + +There is also a "customFaqDetails" css class that removes the borders. + +#### PrettyLink + +The PrettyLink element makes your links into button-like elements with subtle animation and yearn styling. These links will fill the full width of the markdown document. Can be used with naked links or with markdown style links. + +``` +[your link name](your-link-url) +``` + +#### Yearn Admonition + +There is a custom informational Yearn-styled admonition that can be used like any other admonition. + +``` +:::yearn-info[title-goes-here] + +text content + +::: +``` diff --git a/docs/developers/data-services/yearn-data.md b/docs/developers/data-services/yearn-data.md index b1c4fa8b4..93a8cbd1a 100644 --- a/docs/developers/data-services/yearn-data.md +++ b/docs/developers/data-services/yearn-data.md @@ -36,8 +36,13 @@ Yearn Lens is a collection of smart contracts that collect data about V2 Yearn v --- -
-

Deprecated Data Services

+
+ + + +## Deprecated Data Services + + ### Yearn Exporter - No longer supported diff --git a/docs/developers/v1/introduction.md b/docs/developers/v1/introduction.md index 659ebb367..1f562ec52 100644 --- a/docs/developers/v1/introduction.md +++ b/docs/developers/v1/introduction.md @@ -4,6 +4,12 @@ description: This documentation only covers v1 vaults. # v1 Vaults Overview +:::warning + +This document describes the original implementation of Yearn's Vault and Governance systems. It gives a good sense of the bones of Yearn and is a place to build your intuitions about how things work. These contracts are all mostly deprecated or superseded at this point, so if you are looking for information on actual implementations or to better understand particulars of the current vaults, please review those specific docs. + +::: + This document gives a _generalized and high level overview_ of how the protocol and its actors, smart contracts, and other services interact with each other. The aim is to build intuition about how Yearn products work. :::info diff --git a/docs/getting-started/products/yvaults/vault-factory.md b/docs/developers/v2/vault-factory.md similarity index 100% rename from docs/getting-started/products/yvaults/vault-factory.md rename to docs/developers/v2/vault-factory.md diff --git a/docs/developers/v3/overview.md b/docs/developers/v3/overview.md index d5ba0f9bb..e7cde13fc 100644 --- a/docs/developers/v3/overview.md +++ b/docs/developers/v3/overview.md @@ -1,4 +1,4 @@ -# Overview +# yVaults v3 Yearn's V3 system is a decentralized suite of yield-generating products built to fit any need. It is designed to be un-opinionated and customizable infrastructure for the world to build on, making yield generation as safe, efficient, and easy as possible for all parties. Anyone can deploy a strategy or manage a vault. So whether you are a gas golfing expert, a degen looking to codify your personal yield farming strategy, or just an average crypto user looking to earn passive yield on your magical internet tokens, V3 is for you. @@ -16,6 +16,25 @@ The most significant update to Yearn V3 from V2 was the introduction of "Tokeniz - [Vault Factory](https://github.com/yearn/yearn-vaults-v3/blob/master/contracts/VaultFactory.vy): A factory contract deployed by Yearn Governance that anyone can use to easily and trustlessly deploy new Allocator Vaults. Each Allocator Vault release will have its own factory. +![image](/img/diagrams/yvaults-v3-more-detail.png) + +## Periphery Contracts + +V3 incorporates periphery contracts, which are extensible code blocks that can be attached to a yVault or work alongside it to extend functionality over and beyond core base logic. They are not required but can facilitate building around yVaults. + +A few examples of periphery contracts used in V3 are: + +- **4626 Router**: Wrapper that handles deposits and withdrawals to/from all vaults and strategies. +- **Registry**: Handles adding and tracking strategies and vaults. +- **Debt Allocator**: Can efficiently allocate debt to different strategies. Added to a Allocator Vault for the best yield opportunities. +- **Accountant**: Handles changing fees for vault operations. +- **Deposit/Withdraw Limit Modules**: Allows dynamic control over a vaults deposit or withdraw limits for full customization. +- **Swappers**: Pre-built contracts for strategies to inherit to easily implement their desired swap logic. +- **APR Oracles**: Retrieve the expected current APY on-chain for different vaults or strategies to properly allocate debt. +- And any others you can come up with! + +To read more about the periphery contracts or where to find the curren versions click [here](./periphery.md) + ## Get started - [Integrating V3](/developers/v3/integrating_v3) diff --git a/docs/getting-started/products/ylockers/ycrv/overview.md b/docs/getting-started/products/ylockers/ycrv/overview.md index 06e94d9a7..ffdb9f110 100644 --- a/docs/getting-started/products/ylockers/ycrv/overview.md +++ b/docs/getting-started/products/ylockers/ycrv/overview.md @@ -1,6 +1,8 @@ # yCRV Overview +![image](/img/product-pages/ycrv-banner.png) + ## What is yCRV? yCRV is Yearn's veCRV yLocker product. It is designed to tokenize the different benefits of a [veCRV position](https://resources.curve.fi/crv-token/vecrv/) in a simple, user-friendly way. Let's review the basics of liquid locker tokens like yCRV: diff --git a/docs/getting-started/products/ylockers/yprisma/overview.md b/docs/getting-started/products/ylockers/yprisma/overview.md index 61dcf7b5c..502449d9b 100644 --- a/docs/getting-started/products/ylockers/yprisma/overview.md +++ b/docs/getting-started/products/ylockers/yprisma/overview.md @@ -1,5 +1,7 @@ # yPRISMA Overview +![image](/img/product-pages/yprisma-banner.png) + Claim and deposit at [yprisma.yearn.fi](https://yprisma.yearn.fi) ## What is yPRISMA? diff --git a/docs/getting-started/products/yvaults/overview.md b/docs/getting-started/products/yvaults/overview.md index edbe13360..f19df1e71 100644 --- a/docs/getting-started/products/yvaults/overview.md +++ b/docs/getting-started/products/yvaults/overview.md @@ -1,39 +1,41 @@ -# Overview +# yVaults -  +:::yearn-info[WHAT IS A yVAULT ANYWAY?] -## What are yVaults? +Yearn Vaults are like crypto savings accounts in cyberspace. You deposit your assets, and Yearn's smart contracts put them to work within the DeFi ecosystem, returning the earned yield back to you. -[yVaults](https://yearn.fi/vaults) are like savings accounts for your crypto assets. They accept your deposit, then route it through strategies which seek out the highest yield available in DeFi. +However, unlike a bank account - none of this takes place behind closed doors (no offense to doors). Decentralised Finance uses public blockchains, meaning you are in control of your assets and can see where they are at all times. Nothing is hidden and everything is auditable by anyone, at any time. -![image](https://github.com/yearn/yearn-devdocs/assets/7863230/af161f3d-ed71-4010-84ba-e1bfab66d782) +With the advent of v3, Vaults can now be made out of a single strategy for your assets, or a collection of multiple strategies which balance your funds between them. Users now have more control over where they want their funds to go and a wider range of risk appetites. -## yVault Fee Structure +Go you! -**Performance Fee**: Deducted from yield earned every time a vault harvests a strategy. +::: -**Management Fee**: Flat rate taken from vault deposits over a year. The fee is extracted by minting new shares of the vault, thereby diluting vault participants. This is done at the time of harvest, and calculated based on time since the previous harvest. +[Still Confused? Click here for an ELI-5 explainer](yvaults-faq#yvaults-eli-5) + +## yVault Types + +Over the years, Yearn has developed 3 versions of the yVault products: v1, v2, and v3. Super creative, we know! -The old structure used before the changes brought by [YIP-69](https://gov.yearn.fi/t/yip-69-reduce-and-cap-fees-through-yrates/12588) was 20% performance fees and 2% management fees, but this has changed and vaults now have a dynamic fee structure. Single asset vaults have no management fee. Fee values for all yVaults can be checked in real-time at [yearn.watch](https://yearn.watch/) +- [**v1 yVaults**](../../../developers/v1/introduction) are the OG vaults and are mostly phased out (*deprecated* in developer-speak). -*Example YFI yVault fee structure at the time of writing:* +- [**v2 yVaults**](./v2) are the reliable, workhorse vaults that you know and love. They started out focused on the Curve ecosystem and are still used when creating vaults for Curve pools. -| Fee Type | Value | -|-----------------|-----| -| Management Fee | 0% | -| Performance Fee | 20% | +- [**v3 yVaults**](./v3) are the new cool vaults on the block. They are designed to interoperate using the ERC-4626 standard and have a number of new features to make them safer and easier to use and create. -On the [yearn.fi](https://yearn.fi/) user interface, yield is displayed as net APY. This means that both fees and compounding returns are taken into consideration in the rates presented. Since harvests don't occur on a set basis, yield is usually estimated based on historical data. For more information, see [How to Understand yVault ROI](https://docs.yearn.fi/getting-started/guides/how-to-understand-yvault-roi) +## yVault Fee Structure + +yVaults have 2 potential fees that can be charged on deposited funds: -- For vaults deployed by the vault [factory](https://docs.yearn.fi/getting-started/products/yvaults/vault-factory) the performance fee is 10% instead of 20%. +**Performance Fee**: Deducted from yield earned every time a vault harvests a strategy. + +**Management Fee**: Flat rate taken from vault deposits over a year. The fee is extracted by minting new shares of the vault, thereby diluting vault participants. This is done at the time of harvest, and calculated based on time since the previous harvest. -## v2 yVault Improvements +Prior to [YIP-69](https://gov.yearn.fi/t/yip-69-reduce-and-cap-fees-through-yrates/12588), vaults had 20% performance fees and 2% management fees, but this has changed and yVaults now have a dynamic fee structure. -- **Up to 20 strategies per vault:** This will increase the flexibility to manage capital efficiently during different market scenarios. Each strategy has a capital cap. This is useful to avoid over-allocating funds to a strategy that cannot increase APY anymore. -- **Strategist and Guardian are the new Controllers:** The Controller concept is not available in V2 yVaults and has been replaced by a Guardian and the Strategy creator \(strategist\). These 2 actors oversee strategy performance and are empowered to take action to improve capital management or act on critical situations. -- **Automated vault housekeeping \(Keep3r network\):** `harvest()` and `earn()` calls are now automated through the Keep3r bots network. These 2 function calls are used to purchase new underlying collateral by selling the earned tokens while moving the profits back to the vault and later into strategies. The keep3r network takes the heavy lifting of doing these calls and running with the gas costs in exchange for keep3r tokens. This approach unloads humans from these housekeeping tasks. -- **No Withdrawal Fee**: The one-time fee charged on balance upon withdrawal has been turned off for all vaults and only existed in the v1 iteration. +Single asset vaults generally have no management fee. Fee values for all yVaults can be checked in real-time at [yearn.fi](https://yearn.fi/) -## v3 yVaults +- On the [yearn.fi](https://yearn.fi/) user interface, yield is displayed as net APY. This means that both fees and compounding returns are taken into consideration in the rates presented. Since harvests don't occur on a set basis, yield is usually estimated based on historical data. For more information, see [How to Understand yVault ROI](../../guides/how-apy-works) -The newest version of yVaults are EIP-4626 compatible and allow for tokenized strategies, read more: https://docs.yearn.fi/getting-started/products/yvaults/v3 +- For vaults deployed by the vault [factory](/developers/v2/vault-factory) the performance fee is 10% instead of 20%. diff --git a/docs/getting-started/products/yvaults/v2.md b/docs/getting-started/products/yvaults/v2.md new file mode 100644 index 000000000..494f55509 --- /dev/null +++ b/docs/getting-started/products/yvaults/v2.md @@ -0,0 +1,22 @@ +# yVaults v2 + +## Overview + +The second iteration of yVaults are auto-compounding contracts that allow depositors to earn and compound yield on deposited assets. These are still the trusty workhorse vaults for Curve, Velodrome, and Aerodrome LP positions. They allow multiple strategies and can be automatically harvested, but they have mostly been superseded by the [V3](./v3) architecture for single asset vaults and other more exotic asset types. They are not ERC-4626 compatible, nor as flexible as the newer V3 vaults. + +![image](/img/diagrams/yvaults-v2.png) + +## v2 yVault Improvements + +- **Up to 20 strategies per vault:** This will increase the flexibility to manage capital efficiently during different market scenarios. Each strategy has a capital cap. This is useful to avoid over-allocating funds to a strategy that cannot increase APY anymore. +- **Strategist and Guardian are the new Controllers:** The Controller concept is not available in V2 yVaults and has been replaced by a Guardian and the Strategy creator \(strategist\). These 2 actors oversee strategy performance and are empowered to take action to improve capital management or act on critical situations. +- **Automated vault housekeeping \(Keep3r network\):** `harvest()` and `earn()` calls are now automated through the Keep3r bots network. These 2 function calls are used to purchase new underlying collateral by selling the earned tokens while moving the profits back to the vault and later into strategies. The keep3r network takes the heavy lifting of doing these calls and running with the gas costs in exchange for keep3r tokens. This approach unloads humans from these housekeeping tasks. +- **No Withdrawal Fee**: The one-time fee charged on balance upon withdrawal has been turned off for all vaults and only existed in the v1 iteration. + +## Read More + +**V2 developer docs:** [https://docs.yearn.fi/developers/v2/getting-started](/developers/v2/getting-started) + +**dApp:** https://yearn.fi/vaults + +**Guides** [V2 Interface Guide](/getting-started/guides/using-yearn-v2) diff --git a/docs/getting-started/products/yvaults/v3.md b/docs/getting-started/products/yvaults/v3.md index f7d852270..2eb25d09c 100644 --- a/docs/getting-started/products/yvaults/v3.md +++ b/docs/getting-started/products/yvaults/v3.md @@ -1,8 +1,20 @@ -# Overview +# yVaults V3 + +![image](/img/product-pages/v3-banner.png) + +## Overview + +**V3 Vaults are the newest, shiniest yVaults. More flexibility, better security, more Yearn goodness!** + +Yearn's v3 yVaults are a decentralized suite of yield-generating products built to fit any need. They are designed to be un-opinionated and customizable infrastructure for the world to build on, making yield generation as safe, efficient, and easy as possible for all parties. Version 3 of yVaults iterates on Version 2 by increasing its robustness and developing Yearn’s path towards further decentralization, while keeping the same proven product (yield-bearing tokens). Version 3 has all the same functionality as Version 2, but with many more added benefits and improvements to continue to grow the Yearn ecosystem. -V3 also sees the introduction of "Tokenized Strategies". Strategies are now capable of being standalone 4626 vaults themselves. These single-strategy vaults can be used as stand-alone vaults or easily added as a strategy to any of the multi-strategy "Allocator Vaults". +V3 also sees the introduction of "Tokenized Strategies". Strategies are now capable of being standalone 4626 vaults themselves. These single-strategy vaults can be used as stand-alone vaults or easily added as a strategy to a Multi-Strategy Vault. + +![image](/img/diagrams/yvaults-v3-more-detail.png) + +## v3 yVault Improvements Version 3 of yVaults improves on Version 2 by: @@ -13,33 +25,10 @@ Version 3 of yVaults improves on Version 2 by: - Decreasing gas costs to report profits and update debts. - Adding new product and vault types. -[VaultV3 Specification](https://github.com/yearn/yearn-vaults-v3/blob/master/TECH_SPEC.md) - -[Tokenized Strategy Specification](https://github.com/yearn/tokenized-strategy/blob/master/SPECIFICATION.md) - -## Periphery Contracts - -V3 incorporates periphery contracts, which are extensible code blocks that can be attached to a yVault or work alongside it to extend functionality over and beyond core base logic. They are not required but can facilitate building around yVaults. - -A few examples of periphery contracts used in V3 are: - -- **4626 Router**: Wrapper that handles deposits and withdrawals to/from all vaults and strategies. -- **Registry**: Handles adding and tracking strategies and vaults. -- **Debt Allocator**: Can efficiently allocate debt to different strategies. Added to a Allocator Vault for the best yield opportunities. -- **Accountant**: Handles changing fees for vault operations. -- **Deposit/Withdraw Limit Modules**: Allows dynamic control over a vaults deposit or withdraw limits for full customization. -- **Swappers**: Pre-built contracts for strategies to inherit to easily implement their desired swap logic. -- **APR Oracles**: Retrieve the expected current APY on-chain for different vaults or strategies to properly allocate debt. -- And any others you can come up with! - -To read more about the periphery contracts or where to find the curren versions click [here](../../../developers/v3/periphery) - ## Read More -**For more information visit the V3 developer section: https://docs.yearn.fi/developers/v3/overview** +**V3 developer docs:** [https://docs.yearn.fi/developers/v3/overview](/developers/v3/overview) + +**dApp:** https://yearn.fi/v3 -- https://github.com/yearn/yearn-vaults-v3 -- https://github.com/yearn/tokenized-strategy -- https://medium.com/iearn/yearnv3-motivation-and-design-107840cb4844 -- https://erc4626.info/ -- https://eips.ethereum.org/EIPS/eip-4626 +**Guides** [V3 Interface Guide](/getting-started/guides/using-yearn-v3) diff --git a/docs/getting-started/products/yvaults/yvaults-faq.md b/docs/getting-started/products/yvaults/yvaults-faq.md new file mode 100644 index 000000000..6511124e0 --- /dev/null +++ b/docs/getting-started/products/yvaults/yvaults-faq.md @@ -0,0 +1,81 @@ +# yVaults FAQ + +
+ + + +## yVaults ELI-5 + + + +Yearn Vaults are contracts on the Ethereum blockchain—and the layer2 networks that sit atop it. They allow you to deposit cryptocurrency tokens you own and earn interest on them. When you deposit, your tokens are combined with other depositors' tokens and directed toward interest earning opportunities. How and which opportunities are chosen depends on the *Strategies* used by the vault. You receive a receipt token (aka a Vault Token) that can be used to retrieve your original deposit plus any interest earned. +
+ +
+ + + +## V1, V2, V3, Juiced... Whats the difference? + + + +So many options! But don't worry, it isn't so complicated. + +- V3 are the newest vaults. They are probably your best bet unless you can't find what you are looking for. +- V2 are older vaults, but are still used for Curve and Curve-based pools like Velodrome and Aerodrome. +- V1 vaults are the OG and not supported so you shouldn't even see them anywhere. If you do, or if you need to access funds deposited during defi summer, hop in the discord and let us know. Someone there can help you out. Discord link is above under "Community". +- Juiced Vaults are vaults built to use Ajna, which is a new lending and borrowing protocol. They have their own [front-end](https://juiced.yearn.fi/) and [docs](https://docs.juiced.app/) so check those out. One thing to be aware of is that since Ajna is a lending platform, you may not be able to withdraw funds immediately if there is high borrowing demand. + +
+ +
+ + + +## What is Gimme? + + + +[Gimme](https://gimme.mom/) is a new, easy-to-use front-end focused on making Yearn super simple. It currently only supports Polygon, but will roll out other L2s soon. You can easily zap right into Yearn's single asset V3 vaults and start earning fast! + +
+ +
+ + + +## How Do Vault Tokens Work? + + + +[yVault Tokens](https://docs.yearn.fi/resources/defi-glossary#ytoken) are like a deposit receipt. They represent a user's share of the yVault that they are participating in. + +**For example**, if you deposit YFI in a yVault you will receive yvYFI in return. yvYFI would be the yVault Token. + +If your yVault generates profit, the share price of your yVault tokens will increase. This happens because more underlying tokens are in the yVault to redeem upon withdrawal. + +![image](https://i.imgur.com/3zkSnoE.png) +![image](https://i.imgur.com/yrGEVCr.png) + +Once a user's assets are withdrawn from the yVault, their yVault Token will be burned. yVault Tokens are [ERC-20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/), meaning they can be transferred and traded as any other common Ethereum token. + +The vault tokens have evolved between v1, v2, and v3, here are a couple of main differences: + +### V1 yVault Tokens + +- Each vault contract can use only 1 yield strategy contract. +- Vault tokens are prefixed with a leading `y`, so a v1 vault for USDC gives the user yUSDC. + +### V2 yVault Tokens + +- Each vault contract can use up to 20 yield strategy contracts. +- Vault tokens are prefixed with `yv`, so a v2 vault for USDC gives the user yvUSDC. + +### V3 yVault Tokens + +- All V3 vaults are [ERC-4626](https://ethereum.org/en/developers/docs/standards/tokens/erc-4626/) compliant. +- Vaults can be either [multi-strategy](https://docs.yearn.fi/developers/v3/overview#definitions) or [single-strategy (Tokenized Strategy)](https://docs.yearn.fi/developers/v3/overview#definitions). +- Multi-strategy vaults tokens are prefixed with `yv` and appended with a ["category"](https://docs.yearn.fi/developers/v3/integrating_v3#category), so a v3 vault for USDC with a category type of `1` gives the user `yvUSDC-1`. +- Single strategy vaults are prefixed with `ys`, so a v3 single strategy vault gives the user `ysUSDC`. + +
diff --git a/docusaurus.config.js b/docusaurus.config.js index 22082e2d0..f5c2e84fd 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -142,6 +142,10 @@ export default { 'https://github.com/yearn/yearn-devdocs/edit/master/website/', sidebarCollapsed: true, breadcrumbs: false, + admonitions: { + keywords: ['yearn-info'], + extendDefaults: true, + }, }, theme: { customCss: './src/css/custom.css', diff --git a/sidebars/sidebarsDeveloperDocs.js b/sidebars/sidebarsDeveloperDocs.js index 7f5bbc7b2..f749b9ef5 100644 --- a/sidebars/sidebarsDeveloperDocs.js +++ b/sidebars/sidebarsDeveloperDocs.js @@ -53,6 +53,7 @@ export default { items: [ 'v2/getting-started', 'v2/DEPLOYMENT', + 'v2/vault-factory', 'v2/SPECIFICATION', 'v2/OPERATIONS', 'v2/additional-resources', diff --git a/sidebars/sidebarsUserDocs.js b/sidebars/sidebarsUserDocs.js index 71f51d5a6..07086b2c3 100644 --- a/sidebars/sidebarsUserDocs.js +++ b/sidebars/sidebarsUserDocs.js @@ -9,18 +9,60 @@ module.exports = { { type: 'category', label: 'yVaults', + link: { + type: 'doc', + id: 'products/yvaults/overview', + }, items: [ - 'products/yvaults/overview', - 'products/yvaults/vault-tokens', { type: 'category', - label: 'yVaults Version 3', - items: ['products/yvaults/v3'], + label: 'yVaults v3', + link: { + type: 'doc', + id: 'products/yvaults/v3', + }, + items: [ + { + type: 'link', + label: 'v3 Vaults Interface Guide →', + href: '/getting-started/guides/using-yearn-v3', //this breaks if you don't use relative links here + }, + { + type: 'link', + label: 'v3 Vaults dApp', + href: 'https://yearn.fi/v3', + }, + ], }, { type: 'category', - label: 'yVaults Version 2', - items: ['products/yvaults/vault-factory'], + label: 'yVaults v2', + link: { + type: 'doc', + id: 'products/yvaults/v2', + }, + items: [ + { + type: 'link', + label: 'v2 Vaults Interface Guide →', + href: '/getting-started/guides/using-yearn-v2', //this breaks if you don't use relative links here + }, + { + type: 'link', + label: 'v2 Vaults dApp', + href: 'https://yearn.fi/vaults', + }, + ], + }, + { + type: 'doc', + id: 'products/yvaults/yvaults-faq', + label: 'yVaults FAQ', + }, + { + type: 'link', + label: 'yVaults Dev Docs →', + href: '/developers/v1/introduction', }, ], }, diff --git a/src/css/custom.css b/src/css/custom.css index 28732d2f1..0cac47425 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -201,6 +201,13 @@ h6 { margin-bottom: 0; } +.customFaqDetails { + background-color: transparent; + --ifm-alert-border-color: grey; + border: none !important; + box-shadow: none; +} + .docusaurus-highlight-code-line { background-color: rgb(72, 77, 91); display: block; @@ -208,10 +215,18 @@ h6 { padding: 0 var(--ifm-pre-padding); } -.main-wrapper { - margin-bottom: 5rem; +.collapsibleContent_node_modules-\@docusaurus-theme-common-lib-components-Details-styles-module { + margin-top: 0px !important; + border-top: none !important; + padding-top: 0px !important; +} + +.details_node_modules-\@docusaurus-theme-classic-lib-theme-Details-styles-module { + margin: 0px !important; } +/*---IMG stuff---*/ + img { height: auto; } diff --git a/src/theme/Admonition/Types.js b/src/theme/Admonition/Types.js new file mode 100644 index 000000000..1a5d01f8a --- /dev/null +++ b/src/theme/Admonition/Types.js @@ -0,0 +1,35 @@ +import React from 'react' +import DefaultAdmonitionTypes from '@theme-original/Admonition/Types' +import styles from './admonitions.module.css' + +function yearnAdmonition(props) { + return ( +
+
+ + Yearn Logo + +
{props.title}
+
+
{props.children}
+
+ ) +} + +yearnAdmonition.defaultProps = { + title: 'Yearn Tip', // Replace 'Default Title' with your desired default title +} + +const AdmonitionTypes = { + ...DefaultAdmonitionTypes, + + // Add all your custom admonition types here... + // You can also override the default ones if you want + 'yearn-info': yearnAdmonition, +} + +export default AdmonitionTypes diff --git a/src/theme/Admonition/admonitions.module.css b/src/theme/Admonition/admonitions.module.css new file mode 100644 index 000000000..4aea87dba --- /dev/null +++ b/src/theme/Admonition/admonitions.module.css @@ -0,0 +1,32 @@ +.yearnDiv { + background-color: var(--ifm-color-primary-dark); + border-radius: 5px; + padding: var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal); + margin-bottom: 1em; + border: var(--ifm-alert-border-width) solid var(--ifm-color-primary-light); + border-left-width: var(--ifm-alert-border-left-width); + border-radius: var(--ifm-alert-border-radius); + box-shadow: var(--ifm-alert-shadow); +} + +.yearnTitle { + display: flex; + align-items: center; + padding-bottom: 0.5em; +} + +.yearnHeading { + color: white; + font: var(--ifm-heading-font-weight) var(--ifm-h5-font-size) / + var(--ifm-heading-line-height) var(--ifm-heading-font-family); + margin-bottom: 0; + margin-left: 0.5em; +} + +.yearnBody { + color: white; +} + +.yearnLogo { + width: 24px; +} diff --git a/static/img/diagrams/yvaults-v2.png b/static/img/diagrams/yvaults-v2.png new file mode 100644 index 000000000..1727f053b Binary files /dev/null and b/static/img/diagrams/yvaults-v2.png differ diff --git a/static/img/diagrams/yvaults-v3-more-detail.png b/static/img/diagrams/yvaults-v3-more-detail.png new file mode 100644 index 000000000..ed1a669b0 Binary files /dev/null and b/static/img/diagrams/yvaults-v3-more-detail.png differ diff --git a/static/img/diagrams/yvaults-v3.png b/static/img/diagrams/yvaults-v3.png new file mode 100644 index 000000000..147ca2451 Binary files /dev/null and b/static/img/diagrams/yvaults-v3.png differ diff --git a/static/img/product-pages/v3-banner.png b/static/img/product-pages/v3-banner.png new file mode 100644 index 000000000..5db0774a7 Binary files /dev/null and b/static/img/product-pages/v3-banner.png differ diff --git a/static/img/product-pages/ycrv-banner.png b/static/img/product-pages/ycrv-banner.png new file mode 100644 index 000000000..88e022052 Binary files /dev/null and b/static/img/product-pages/ycrv-banner.png differ diff --git a/static/img/product-pages/yprisma-banner.png b/static/img/product-pages/yprisma-banner.png new file mode 100644 index 000000000..49f43bd9c Binary files /dev/null and b/static/img/product-pages/yprisma-banner.png differ