diff --git a/docs/GEB.md b/docs/GEB.md deleted file mode 100644 index 6bc720eb..00000000 --- a/docs/GEB.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -description: The what and how of the GEB framework ---- - -# Introduction to GEB - -[GEB](https://en.wikipedia.org/wiki/G%C3%B6del,\_Escher,\_Bach) is a framework for deploying systems that can issue [stablecoins](https://medium.com/reflexer-labs/stability-without-pegs-8c6a1cbc7fbd). Stablecoins don't look like [this](https://www.coingecko.com/en/coins/usd-coin) (that's a pegged coin), but rather like [this](https://duneanalytics.com/HggqX/Reflexer-RAI). Stablecoins are a great collateral source for other DeFi protocols (compared to ETH or BTC) and are also a store of value with an embedded funding rate.\ -\ -This documentation is meant to explain all the components behind GEB. Before diving in the docs, we recommend reading our original [whitepaper](https://github.com/reflexer-labs/whitepapers/blob/master/English/rai-english.pdf).\ -\ -GEB is a modified fork of [MCD](https://github.com/makerdao/dss) that has several core differences: - -* Variable names you [can actually understand](/contract-translation/naming-transition) -* An autonomous feedback mechanism that changes the incentives of system participants -* The possibility to add insurance for SAFEs -* Fixed and increasing discount auctions (instead of English auctions) used to sell off collateral -* Automatic adjustment of several parameters in the system -* A set of contracts that bound control over parameters that are governed in the long run -* The possibility to send stability fees at once to multiple addresses -* The possibility to switch between surplus auctions and other types of strategies meant to remove surplus from the system -* Two prices for each `CollateralType`: one used for generating debt, the other one used exclusively when liquidating SAFEs -* A stability fee treasury that can pay for oracle calls or other contracts that automate the system - -### GEB Overview Diagram - -Explore the diagram in detail [here](https://viewer.diagrams.net/?target=blank\&highlight=0000ff\&layers=1\&nav=1\&title=GEB\_overview.drawio#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D1nIcaY8N8StVCfyAL\_ztbmETJX2bvY3a9%26export%3Ddownload). diff --git a/docs/flx-mechanics.md b/docs/flx-mechanics.md deleted file mode 100644 index f30d4825..00000000 --- a/docs/flx-mechanics.md +++ /dev/null @@ -1,30 +0,0 @@ -# FLX Mechanics - -## 1. Overview - -The FLX token has two main functions inside the RAI protocol: - -* Backstop mechanism: FLX stakers are the first line of defense in case the RAI protocol goes underwater. The second line of defense is with debt auctions that mint new FLX and auction it in exchange for RAI -* Ungovernance: once governance minimization is finalized, FLX holders will be able to remove control from any remaining components in RAI or, if needed, continue to manage components that may be challenging to ungovern (such as oracles or any other component interacting with other protocols) - -## 2. RAI Resource Flow - -Before the protocol is governance minimized, RAI will be set up so that stability fees (borrow rate charged to Safes that mint RAI) flow in three places: - -* The stability fee treasury, which is a smart contract in charge with paying for oracle updates or any other contract meant to automate RAI parameters -* FLX stakers, which are the first line of defense for the protocol -* Buyback and burn, which is meant to auction RAI in exchange for FLX which is subsequently burned - -In the case of FLX stakers, the RAI that accrues for them is auctioned in exchange for FLX. The FLX proceeds from the auction are then sent to the staking pool.\ -\ -As for buyback and burn, RAI is first accrued in the protocol's balance sheet. Once there's enough RAI in the balance sheet, the protocol can start to auction some of it in exchange for FLX that is then burned. - -To visualize all this, you can check the diagram below: - -![](/assets/untitled-diagram.png) - -**NOTE**: RAI only flows to the stability fee treasury, to stakers and in the protocol's balance sheet when the borrow rate charged to Safes is positive. When the borrow rate is negative, the protocol only uses funds from the balance sheet to repay RAI debt from all Safes. - -## 3. FLX and the Money God League - -FLX is also at the core of the Money God League as seen [here](https://community.reflexer.finance/t/another-new-money-god-introducing-h2o/131) and [here](https://community.reflexer.finance/t/a-new-money-god-introducing-volt/120). The Money God League is presented on [this page](/the-money-god-league/intro-to-the-league). diff --git a/docs/liquidation-protection/liquidation-protection-guide.md b/docs/liquidation-protection/liquidation-protection-guide.md index 9b0af818..a3055486 100644 --- a/docs/liquidation-protection/liquidation-protection-guide.md +++ b/docs/liquidation-protection/liquidation-protection-guide.md @@ -10,8 +10,8 @@ Liquidation Protection is a unique feature that \(as of the date of this guide\) There are two key advantages in protecting your SAFE: -* Capital efficiency - protecting your SAFE means that you can mint more RAI with the same amount of ETH and have a higher guarantee that your capital will stay safe -* Peace of mind - an extra layer of cover for your SAFE means you can sleep better knowing that your capital is in a safer place +- Capital efficiency - protecting your SAFE means that you can mint more RAI with the same amount of ETH and have a higher guarantee that your capital will stay safe +- Peace of mind - an extra layer of cover for your SAFE means you can sleep better knowing that your capital is in a safer place ## 2. Walkthrough to Protect a SAFE @@ -27,7 +27,7 @@ Your SAFE can be protected from liquidation by what we call a "saviour". A savio To start connecting a saviour to your SAFE, you can click on **Add a Saviour** which is on every SAFE's details page: -![](/assets/untitled-design.png) +![](/assets/liq-protection.png) You should see the onboarding page for saviours: @@ -39,10 +39,10 @@ Once you click on **Configure**, you should see the configuration screen: You will notice a couple of things: -* You can deposit LP tokens in a saviour that protects your SAFE. During a liquidation, the saviour will first try to pull your liquidity from a DEX \(in this case, Uniswap v2\) and repay some of your debt or add more ETH in the SAFE -* There is a Target Rescue CRatio. This is the collateralization ratio that your SAFE will have in case it is successfully saved. If the saviour cannot bring the SAFE's collateralization ratio to the target that you specify, it will not save the SAFE at all \(the SAFE will end up getting liquidated\) -* The Protected Liquidation Point is the minimum collateralization ratio at which your SAFE can get liquidated and the saviour still manages to save it. If the SAFE gets liquidated below this threshold, these is a high chance it will not be saved -* There is a Rescue Fee. This is a flat fee that has to be paid to the address that initially wanted to liquidate your SAFE but ended up saving it. The saviour must both pay this fee and manage to bring the CRatio of your SAFE to the Target Rescue CRatio that you picked, otherwise your SAFE will end up getting liquidated. The Rescue Fee can be changed by governance +- You can deposit LP tokens in a saviour that protects your SAFE. During a liquidation, the saviour will first try to pull your liquidity from a DEX \(in this case, Uniswap v2\) and repay some of your debt or add more ETH in the SAFE +- There is a Target Rescue CRatio. This is the collateralization ratio that your SAFE will have in case it is successfully saved. If the saviour cannot bring the SAFE's collateralization ratio to the target that you specify, it will not save the SAFE at all \(the SAFE will end up getting liquidated\) +- The Protected Liquidation Point is the minimum collateralization ratio at which your SAFE can get liquidated and the saviour still manages to save it. If the SAFE gets liquidated below this threshold, these is a high chance it will not be saved +- There is a Rescue Fee. This is a flat fee that has to be paid to the address that initially wanted to liquidate your SAFE but ended up saving it. The saviour must both pay this fee and manage to bring the CRatio of your SAFE to the Target Rescue CRatio that you picked, otherwise your SAFE will end up getting liquidated. The Rescue Fee can be changed by governance Once you pick an amount of tokens to deposit in the saviour and a Target Rescue CRatio, you can click on **Review Transaction** and then on **Confirm Transaction**. After your transaction is confirmed, you should see a screen like this: @@ -52,22 +52,22 @@ Congrats, your SAFE is now being protected! 🎉 Let's see what happens after one of your SAFEs gets saved. If you go to the SAFE details page, you'll see a button called **Collect Saviour Balance**: -![](/assets/untitled-design-1-.png) +![](/assets/liq-protection-2.png) Sometimes, the saviour doesn't need to use all the tokens you deposited in order to save your SAFE. You can collect these unused tokens \(e.g ETH & RAI withdrawn from Uniswap\) by clicking on **Collect Saviour Balance**. ## 3. Best Practices -* Avoid minting more RAI after you protect your SAFE. If you do mint more after you protect it \(regardless of whether you add more ETH or not\), try to add more LP tokens in the saviour to make sure your SAFE can still be saved now that it has more debt -* Liquidation Protection is **not** a completely set and forget system. You should still watch your SAFE. The idea for protection is that it makes RAI more capital efficient \(you can mint more RAI with the same amount of ETH\) and liquidators are forced to try and save your SAFEs before they liquidate you -* You should deposit more LP tokens than the minimum recommended amount \(which can be found in the app when you deposit cover for a SAFE\). By depositing more tokens than the minimum, you take into account the fact that your SAFE accrues debt over time \(because of the interest rate\), meaning that you will slowly need more and more tokens to save it +- Avoid minting more RAI after you protect your SAFE. If you do mint more after you protect it \(regardless of whether you add more ETH or not\), try to add more LP tokens in the saviour to make sure your SAFE can still be saved now that it has more debt +- Liquidation Protection is **not** a completely set and forget system. You should still watch your SAFE. The idea for protection is that it makes RAI more capital efficient \(you can mint more RAI with the same amount of ETH\) and liquidators are forced to try and save your SAFEs before they liquidate you +- You should deposit more LP tokens than the minimum recommended amount \(which can be found in the app when you deposit cover for a SAFE\). By depositing more tokens than the minimum, you take into account the fact that your SAFE accrues debt over time \(because of the interest rate\), meaning that you will slowly need more and more tokens to save it ## 4. Gotchas -* If the saviour you're using cannot bring the collateralization ratio of a protected SAFE to the **Target Rescue CRatio** you picked, the saviour will not save the SAFE at all -* When a saviour saves a SAFE, it will withdraw all your liquidity from a DEX using the LP tokens you deposited. If you want your SAFE to be protected after it's saved, you need to deposit tokens again in the saviour -* You must have enough tokens deposited in the saviour so that it can both save your SAFE and also reimburse the liquidator that ended up paying for the save action -* Once a SAFE is saved, there are probably leftover tokens that were withdrawn from Uniswap and not used for anything. You can redeem these extra tokens at any time by going back to the SAFE's details page and clicking on **Collect Saviour Balance** +- If the saviour you're using cannot bring the collateralization ratio of a protected SAFE to the **Target Rescue CRatio** you picked, the saviour will not save the SAFE at all +- When a saviour saves a SAFE, it will withdraw all your liquidity from a DEX using the LP tokens you deposited. If you want your SAFE to be protected after it's saved, you need to deposit tokens again in the saviour +- You must have enough tokens deposited in the saviour so that it can both save your SAFE and also reimburse the liquidator that ended up paying for the save action +- Once a SAFE is saved, there are probably leftover tokens that were withdrawn from Uniswap and not used for anything. You can redeem these extra tokens at any time by going back to the SAFE's details page and clicking on **Collect Saviour Balance** ## 5. Why Use Liquidation Protection Instead of DeFi Saver? @@ -77,11 +77,10 @@ Liquidation Protection is not meant to replace platforms such as DeFi Saver. Rat When someone starts to liquidate a Safe and the saviour steps in, it will try to do the following: -* Withdraw all the Uniswap liquidity using the LP tokens allocated to save the liquidated Safe -* Calculate how much RAI would need to be repaid in order to bring the Safe's collateralization ratio above the **Target Rescue CRatio** -* If the amount of RAI calculated is higher than the amount of RAI withdrawn from Uniswap and calculate the amount of ETH that would need to be added in the Safe \(besides the amount of RAI withdrawn from Uniswap which will be used to repay debt\) -* If the calculated ETH amount is higher than the ETH amount withdrawn from Uniswap, the saviour will revert and the Safe will continue to be liquidated. The saviour will also revert if there isn't enough ETH and/or RAI to reimburse the liquidator \(who is spending gas to save the Safe\) for saving the Safe -* On the other hand, if the calculated ETH amount is lower than the ETH amount withdrawn from Uniswap, the saviour will successfuly save the Safe \(by repaying some of the debt and adding the ETH in the Safe\). Any amount of ETH and/or RAI that we not used to save will be kept in the saviour until the owner of the Safe will withdraw them +- Withdraw all the Uniswap liquidity using the LP tokens allocated to save the liquidated Safe +- Calculate how much RAI would need to be repaid in order to bring the Safe's collateralization ratio above the **Target Rescue CRatio** +- If the amount of RAI calculated is higher than the amount of RAI withdrawn from Uniswap and calculate the amount of ETH that would need to be added in the Safe \(besides the amount of RAI withdrawn from Uniswap which will be used to repay debt\) +- If the calculated ETH amount is higher than the ETH amount withdrawn from Uniswap, the saviour will revert and the Safe will continue to be liquidated. The saviour will also revert if there isn't enough ETH and/or RAI to reimburse the liquidator \(who is spending gas to save the Safe\) for saving the Safe +- On the other hand, if the calculated ETH amount is lower than the ETH amount withdrawn from Uniswap, the saviour will successfuly save the Safe \(by repaying some of the debt and adding the ETH in the Safe\). Any amount of ETH and/or RAI that we not used to save will be kept in the saviour until the owner of the Safe will withdraw them Note that because the saviours withdraws all the liquidity from Uniswap when it saves, the Safe owner will need to deposit LP tokens again if they want to be protected moving forward. - diff --git a/docs/multi-chain-rai.md b/docs/multi-chain-rai.md deleted file mode 100644 index 3b8e6945..00000000 --- a/docs/multi-chain-rai.md +++ /dev/null @@ -1,12 +0,0 @@ -# Multi-chain RAI - -## Fantom - -Currently, RAI holders can port their tokens to [Fantom RAI](https://ftmscan.com/token/0xa71353bb71dda105d383b02fc2dd172c4d39ef8b) using the [Multichain.xyz](https://multichain.xyz/) bridge. RAI holders should keep in mind that they need to get FTM first in order to send transactions on Fantom. One way to [get FTM](https://fantom.foundation/where-to-buy-ftm/) is on [Sushiswap](https://app.sushi.com/swap) and then use Multichain.xyz to transfer your Ethereum FTM to Fantom FTM. - -### RAI Partners - -The first protocol that started to support RAI on Fantom is [SpiritSwap](https://app.spiritswap.finance/#/). Initially, SpiritSwap will incentivize RAI/FTM LPs using their SPIRIT token. - -In order to earn SPIRIT, you need to LP in the [RAI/FTM pool](https://swap.spiritswap.finance/#/add/FTM/0xa71353Bb71DdA105D383B02fc2dD172C4D39eF8B) and then go the the [staking page](https://app.spiritswap.finance/#/farms) and find the the RAI/FTM farm \(by typing "RAI" in the Search field\). - diff --git a/docusaurus.config.js b/docusaurus.config.js index ac8b9f16..0638552a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -7,17 +7,11 @@ const darkCodeTheme = require("prism-react-renderer/themes/dracula"); /** @type {import('@docusaurus/types').Config} */ const config = { title: "Open Dollar Docs", - tagline: "The no brainer onboarding stack for web3.", url: "https://docs.opendollar.com", baseUrl: "/", onBrokenLinks: "throw", onBrokenMarkdownLinks: "warn", - favicon: "img/favicon.png", - - // GitHub pages deployment config. - // If you aren't using GitHub pages, you don't need these. - organizationName: "UseKeyp", // Usually your GitHub org/user name. - projectName: "usekeyp-docs", // Usually your repo name. + favicon: "assets/favicon.png", // Even if you don't use internalization, you can use this field to set useful // metadata like html lang. For example, if your site is Chinese, you may want @@ -47,7 +41,7 @@ const config = { sidebarPath: require.resolve("./sidebars.js"), // Please change this to your repo. // Remove this to remove the "edit this page" links. - editUrl: "https://github.com/UseKeyp/usekeyp-docs/tree/main", + editUrl: "https://github.com/open-dollar/od-docs/tree/main", sidebarCollapsed: false, sidebarCollapsible: false, }, @@ -62,44 +56,19 @@ const config = { themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ - image: "img/docs-og-image-1200x630.png", + image: "assets/docs-og-image.png", navbar: { logo: { alt: "Open Dollar Logo", - src: "img/full-logo.svg", - srcDark: "img/full-logo.svg", + src: "assets/full-logo.svg", + srcDark: "assets/full-logo.svg", }, items: [ { - href: "https://usekeyp.com", - label: "Website", - position: "left", - }, - { - href: "https://dev.usekeyp.com", - label: "Dev Portal", - position: "left", - }, - { - href: "https://app.usekeyp.com", - label: "App", - position: "left", - }, - { - href: "https://usekeyp.com/blog", - label: "Blog", - position: "right", - }, - { - href: "https://github.com/usekeyp", + href: "https://github.com/open-dollar", label: "GitHub", position: "right", }, - { - href: "https://schedule.usekeyp.com", - label: "Partner with us", - position: "right", - }, ], }, footer: { @@ -119,11 +88,11 @@ const config = { items: [ { label: "Discord", - href: "https://discord.usekeyp.com", + href: "https://discord.opendollar.com", }, { label: "Twitter", - href: "https://twitter.com/usekeyp", + href: "https://twitter.com/open_dollar", }, ], }, @@ -132,16 +101,16 @@ const config = { items: [ { label: "Blog", - href: "https://blog.usekeyp.com", + href: "https://opendollar.com/blog", }, { label: "GitHub", - href: "https://github.com/usekeyp", + href: "https://github.com/open-dollar", }, ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} Keyp. Built with Docusaurus.`, + copyright: `Copyright © ${new Date().getFullYear()} Open Dollar`, }, prism: { theme: lightCodeTheme, diff --git a/static/.nojekyll b/static/.nojekyll deleted file mode 100644 index e69de29b..00000000 diff --git a/static/assets/docs-og-image.jpg b/static/assets/docs-og-image.jpg new file mode 100644 index 00000000..864a110f Binary files /dev/null and b/static/assets/docs-og-image.jpg differ diff --git a/static/assets/favicon.png b/static/assets/favicon.png new file mode 100644 index 00000000..92bf711f Binary files /dev/null and b/static/assets/favicon.png differ diff --git a/static/img/full-logo.svg b/static/assets/full-logo.svg similarity index 100% rename from static/img/full-logo.svg rename to static/assets/full-logo.svg diff --git a/static/assets/untitled-design-1-.png b/static/assets/liq-protection-2.png similarity index 100% rename from static/assets/untitled-design-1-.png rename to static/assets/liq-protection-2.png diff --git a/static/assets/untitled-design.png b/static/assets/liq-protection.png similarity index 100% rename from static/assets/untitled-design.png rename to static/assets/liq-protection.png diff --git a/static/assets/untitled-diagram.png b/static/assets/untitled-diagram.png deleted file mode 100644 index 762b2605..00000000 Binary files a/static/assets/untitled-diagram.png and /dev/null differ diff --git a/static/img/Keyp_Architecture_Roadmap_v5.png b/static/img/Keyp_Architecture_Roadmap_v5.png deleted file mode 100644 index d4fc7c9d..00000000 Binary files a/static/img/Keyp_Architecture_Roadmap_v5.png and /dev/null differ diff --git a/static/img/dev-portal-access-token.png b/static/img/dev-portal-access-token.png deleted file mode 100644 index 899816a2..00000000 Binary files a/static/img/dev-portal-access-token.png and /dev/null differ diff --git a/static/img/dev-portal-client-gen.gif b/static/img/dev-portal-client-gen.gif deleted file mode 100644 index d16dc156..00000000 Binary files a/static/img/dev-portal-client-gen.gif and /dev/null differ diff --git a/static/img/dev-portal-client-gen.png b/static/img/dev-portal-client-gen.png deleted file mode 100644 index 3088bc0b..00000000 Binary files a/static/img/dev-portal-client-gen.png and /dev/null differ diff --git a/static/img/dev-portal-login-page.png b/static/img/dev-portal-login-page.png deleted file mode 100644 index 41967240..00000000 Binary files a/static/img/dev-portal-login-page.png and /dev/null differ diff --git a/static/img/dev-portal-postman-environment.png b/static/img/dev-portal-postman-environment.png deleted file mode 100644 index 87d1aab9..00000000 Binary files a/static/img/dev-portal-postman-environment.png and /dev/null differ diff --git a/static/img/docs-og-image-1200x630.png b/static/img/docs-og-image-1200x630.png deleted file mode 100644 index 027bd4ca..00000000 Binary files a/static/img/docs-og-image-1200x630.png and /dev/null differ diff --git a/static/img/docusaurus.png b/static/img/docusaurus.png deleted file mode 100644 index 2782c92c..00000000 Binary files a/static/img/docusaurus.png and /dev/null differ diff --git a/static/img/favicon.png b/static/img/favicon.png deleted file mode 100644 index 51013add..00000000 Binary files a/static/img/favicon.png and /dev/null differ diff --git a/static/img/logo-white.svg b/static/img/logo-white.svg deleted file mode 100644 index d1b9d4a0..00000000 --- a/static/img/logo-white.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/static/img/logo.svg b/static/img/logo.svg deleted file mode 100644 index 957bbaec..00000000 --- a/static/img/logo.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/static/img/onramp.png b/static/img/onramp.png deleted file mode 100644 index f4a277c9..00000000 Binary files a/static/img/onramp.png and /dev/null differ diff --git a/static/img/postman-access-token.png b/static/img/postman-access-token.png deleted file mode 100644 index 7cfec032..00000000 Binary files a/static/img/postman-access-token.png and /dev/null differ diff --git a/static/img/undraw_docusaurus_mountain.svg b/static/img/undraw_docusaurus_mountain.svg deleted file mode 100644 index af961c49..00000000 --- a/static/img/undraw_docusaurus_mountain.svg +++ /dev/null @@ -1,171 +0,0 @@ - - Easy to Use - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/img/undraw_docusaurus_react.svg b/static/img/undraw_docusaurus_react.svg deleted file mode 100644 index 94b5cf08..00000000 --- a/static/img/undraw_docusaurus_react.svg +++ /dev/null @@ -1,170 +0,0 @@ - - Powered by React - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/img/undraw_docusaurus_tree.svg b/static/img/undraw_docusaurus_tree.svg deleted file mode 100644 index d9161d33..00000000 --- a/static/img/undraw_docusaurus_tree.svg +++ /dev/null @@ -1,40 +0,0 @@ - - Focus on What Matters - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/static/img/user-authorization-portal.png b/static/img/user-authorization-portal.png deleted file mode 100644 index b4fa531d..00000000 Binary files a/static/img/user-authorization-portal.png and /dev/null differ