Skip to content

Commit

Permalink
Update main w/Tina CMS config (#49)
Browse files Browse the repository at this point in the history
* Issue #42: Docs review feedback pt.1  (#43)

* corrections

* dev corrections

* more link corrections

* testnet link removed temporarily

* remove ungovernance process

* more fixes (#45)

* tim changes (#46)

* Issue #47: Add Tina CMS (#48)

* cms changes so far

* add titles

* new build command

* no md to mdx script
  • Loading branch information
jahabeebs authored Nov 21, 2023
1 parent 558dea4 commit d728539
Show file tree
Hide file tree
Showing 131 changed files with 11,014 additions and 2,471 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,5 @@ build/
.idea/
build/

pdf/
pdf/
node_modules
9 changes: 9 additions & 0 deletions content/posts/hello-world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Hello, World!
---

## Hello World!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut non lorem diam. Quisque vulputate nibh sodales eros pretium tincidunt. Aenean porttitor efficitur convallis. Nulla sagittis finibus convallis. Phasellus in fermentum quam, eu egestas tortor. Maecenas ac mollis leo. Integer maximus eu nisl vel sagittis.

Suspendisse facilisis, mi ac scelerisque interdum, ligula ex imperdiet felis, a posuere eros justo nec sem. Nullam laoreet accumsan metus, sit amet tincidunt orci egestas nec. Pellentesque ut aliquet ante, at tristique nunc. Donec non massa nibh. Ut posuere lacus non aliquam laoreet. Fusce pharetra ligula a felis porttitor, at mollis ipsum maximus. Donec quam tortor, vehicula a magna sit amet, tincidunt dictum enim. In hac habitasse platea dictumst. Mauris sit amet ornare ligula, blandit consequat risus. Duis malesuada pellentesque lectus, non feugiat turpis eleifend a. Nullam tempus ante et diam pretium, ac faucibus ligula interdum.
1 change: 1 addition & 0 deletions docs/README.md → docs/README.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Introduction to Open Dollar
description: An overview to the Open Dollar protocol.
---

Expand Down
4 changes: 4 additions & 0 deletions docs/api/api-endpoints.md → docs/api/api-endpoints.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: API Endpoints
---

# API Endpoints

## RAI
Expand Down
38 changes: 0 additions & 38 deletions docs/community-resources.md

This file was deleted.

22 changes: 22 additions & 0 deletions docs/community-resources.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Community Resources
description: List of talks and articles about RAI and Reflexer
---

# Community Resources

### Videos

* [Testnet Walkthrough](https://www.youtube.com/watch?v=RebhR9OCLZs) November 2023
* [ChainLeak Podcast](https://youtube.com/watch?v=AFZYf-Z_r0E) October 2023

### Articles

* [What is Ungovernance](https://mirror.xyz/0x8a81CEeb0a12998616F1aB932cDbc941F0d539E9/hOuSqMOx6rtkLV5pY1KcM4B0k_7UmEDRnE8D91N6jLA) October 2023
* [How OD Makes Every Token Count](https://mirror.xyz/0x8a81CEeb0a12998616F1aB932cDbc941F0d539E9/Eu51D-5NlJQNSQwOc4twxOT8H_kCoPEJrV_UQrSw6wY) September 2023
* [How OD Stays Stable](https://mirror.xyz/0x8a81CEeb0a12998616F1aB932cDbc941F0d539E9/bpgJSu4JIMS3HYspKahU9CK3o6KwgYk7f-e7kVfrPbE) September 2023
* [A primer on NFVs](https://mirror.xyz/0x8a81CEeb0a12998616F1aB932cDbc941F0d539E9/eHkUevK2ssPvwOTweAQBTO5nWxVN_io0FJ8AOPFW7H8) September 2023




Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Governance Contracts Naming Transition
---

# Governance Contracts Naming Transition

The following tables show the before and after variable names for MCD governance contracts.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Core Contracts Naming Transition
description: Going from cute to actual English words
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
title: GEB Protocol Deployments
---

# GEB Protocol Deployments

Expand Down
26 changes: 13 additions & 13 deletions docs/faq.md → docs/faq.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: FAQ
description: Frequently asked questions about Open Dollar
---

Expand Down Expand Up @@ -57,14 +58,17 @@ Yes, you can add more collateral to your vault at any time. Depending on your co
Each type of vault has its own collateralization ratio that is required. The “collateralization ratio” is the ratio of the value of the collateral deposited in your vault to the value of the OD borrowed against it. When borrowing OD be sure to leave a margin that accounts for market volatility and top up your vault with more collateral as needed.

### Where can I use my OD tokens?
OD is a standard ERC-20 token which can be used accross any bridge, DeFi protocols, exchanges, etc. that support it. Have an idea for an OD integration? Let us know in [discord](https://discord.opendollar.com/)!
OD is a standard ERC-20 token which can be used across any bridge, DeFi protocols, exchanges, etc. that support it. Have an idea for an OD integration? Let us know in [Discord](https://discord.opendollar.com/)!

### What networks is Open Dollar deployed on?
Open Dollar is currently only deployed on Arbitrum. There's also a testnet version deployed on Arbtrium-Goerli.
Open Dollar is currently only deployed on Arbitrum. There's also a testnet version deployed on Arbtrium-Sepolia.

### Where can I trade my NFV?
You can trade your vaults on any NFT marketplace, like [OpenSea](https://opensea.io/) for example. Keep in mind that when you sell your Non-Fungible Vault you’re also selling all collateral and debt associated with it. Any app or tool which supports the ERC-721 token standard will also support Open Dollar NFVs.

### How do I update my NFV image metadata?
If you’ve altered your vault on the OD Protocol, changes reflect in the Open Dollar vault dashboard immediately. On NFT marketplaces the vault image and data in the description may be cached and require refreshing of the metadata to view the most current data. On OpenSea, look in the top right of the screen, click the 3 horizontal dots ( … ) directly underneath the “List for sale” button, & select “Refresh metadata”.

### Is OD a rebase token that changes my balance over time?

No. The protocol doesn't change the amount of tokens you have. Rather, it changes the target price that the protocol wants OD to have on exchanges. This makes it easier to use OD throughout DeFi.
Expand All @@ -77,7 +81,7 @@ When you connect to Open Dollar’s app for the first time you are asked to crea

### Isn't OD growth bounded by ETH and LST growth?

Short answer: yes. Open Dollar can meet any demand and mint any amount of OD, so long as their is more value of collateral that participants are willing to borrow against.
Not necessarily. As our minimized governance model can slowly add other strong collateral types in the future, OD growth can continue even as pure ETH growth slows.

### Can you summarize the behavior of the OD redemption rate?

Expand All @@ -99,29 +103,25 @@ A system like OD has two types of rates:

* Capped borrow rate: in the long run, OD will have a capped (and small) borrow rate which makes the cost of maintaining a vault more predictable. Governance can, in theory, set the borrow rate to 0% although this prevents the system from accruing surplus that's used to incentivize to update core components such as oracles and the PID.

* Insurance for vaults: in the long run we can allow SAFE users to attach a wide variety of insurance contracts meant to protect their positions against liquidation
* Insurance for vaults: in the long run we can allow vault users to attach a wide variety of insurance contracts meant to protect their positions against liquidation

* No exposure to assets with counterparty risk: OD will only be backed by ETH. Borrowers are not exposed to riskier crypto assets or real world collateral

* Superior collateral factors: as we improve the efficiency of our [collateral auctions](/system-contracts/auction-module/fixed-discount-collateral-auction-house) and add insurance contracts for SAFEs, we can lower the collateral requirements for borrowing OD

### Will OD always return to the same initial value/peg?

OD is not designed to be pegged to anything, so it may never return to the exact same value it started at. Similar to many fiat currencies (EUR, USD, etc), OD's price will float, being influenced by market forces (supply & demand) and by the incentives that the PID controller offers to vault users and OD holders. Those incentives are designed to target a $1.00 market price but the actual price will fluctuate up or down.
* Superior collateral factors: as we improve the efficiency of our [collateral auctions](/system-contracts/auction-module/fixed-discount-collateral-auction-house) and add insurance contracts for vaults, we can lower the collateral requirements for borrowing OD

### How does the OD price work/behave?

The long term price trajectory of OD is determined by the demand for leverage on the types of tokens Open Dollar allows as collateral. OD tends to appreciate if vault users deleverage and/or OD users long and it depreciates in case vault users leverage and/or OD users short.

To better understand how OD behaves, we need to analyze its monetary policy which is made out of four elements:

* Redemption price: this is the price that the protocol wants OD to have on the secondary market (e.g on Uniswap). The redemption price is used by SAFE users to mint OD against ETH and it is also used during Global Settlement in order to allow both SAFE and OD users to redeem collateral from the system. The redemption price almost always floats and it does not target any specific peg.
* Redemption price: this is the price that the protocol wants OD to have on the secondary market (e.g on Uniswap). The redemption price is used by vault users to mint OD against ETH and it is also used during Global Settlement in order to allow both vault and OD users to redeem collateral from the system. The redemption price almost always floats and it does not target any specific peg.

* Market price: this is the price that OD is traded at on the secondary market (on exchanges).

* Redemption rate: this is the rate at which OD is being devalued or revalued. The process of devaluing/revaluing OD consists in the redemption rate changing the redemption price.

* Global Settlement: settlement consists in shutting down the protocol and allowing both SAFE and OD users to redeem collateral from the system. Settlement uses the redemption (and not the market) price to calculate how much collateral can be redeemed by each user.
* Global Settlement: settlement consists in shutting down the protocol and allowing both vault and OD users to redeem collateral from the system. Settlement uses the redemption (and not the market) price to calculate how much collateral can be redeemed by each user.

Let's walk through an example of how OD is revalued in case of capital inflow of some Liquid Staked Token that we can call lstETH (meaning people are bullish on lstETH ):

Expand All @@ -131,9 +131,9 @@ Let's walk through an example of how OD is revalued in case of capital inflow of

* At time T3: lstETH remains at $1000 and OD's market price is still $0.95. The protocol wants the market price to get close to the redemption price. In order to eliminate the imbalance between the market/redemption prices, the system starts to revalue OD. Revaluing consists in setting a positive redemption rate which makes the redemption price grow every second.

* At time T4: lstETH remains at $1000. OD's redemption price is now $1.05. SAFE users are starting to realize that they can now borrow less OD per one lstETH, they can redeem less lstETH during Settlement (because OD is now more expensive) and that it will be more expensive to close their SAFE once the market price follows the redemption price. At the same time, OD holders are starting to realize that they can redeem more and more ETH during settlement.
* At time T4: lstETH remains at $1000. OD's redemption price is now $1.05. Vault users are starting to realize that they can now borrow less OD per one lstETH, they can redeem less lstETH during Settlement (because OD is now more expensive) and that it will be more expensive to close their vault once the market price follows the redemption price. At the same time, OD holders are starting to realize that they can redeem more and more ETH during settlement.

* At time T5: lstETH remains at $1000. OD's redemption price is now $1.10. OD's market price surged to $1.01 as a result of SAFE users buying OD in order to close their positions as soon as possible instead of later on when OD is more expensive.
* At time T5: lstETH remains at $1000. OD's redemption price is now $1.10. OD's market price surged to $1.01 as a result of vault users buying OD in order to close their positions as soon as possible instead of later on when OD is more expensive.

When OD is devalued (in case of lstETH capital outflow), the opposite thing happens:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: API Reference
---

# API Reference

Detailed documentation of public classes of the geb.js library.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Geb
---

# Geb

The main package used to interact with the GEB system. Includes [helper functions](geb.md#deployproxy) for safe management and the [contract interface object](geb.md#contracts) to directly call smart contracts.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: GEB Admin
---

# Geb Admin

This class extends the core `GEB` class with additional tools and contracts that are not used as often as other SAFE management tools. Here you will find utils for contracts such as DSPause, ESM etc. These contracts are scattered across several repositories. Please refer to the smart contract documentation to learn more about them.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Geb Proxy Actions
---

# Proxy Actions

Convenience class to call functions from [GebProxyActions](https://github.com/UseKeyp/od-contracts/tree/main/src/contracts/proxies/actions) through a proxy contract registered in the [Vault721](https://github.com/UseKeyp/od-contracts/blob/main/src/contracts/proxies/Vault721.sol). These actions bundle multiple actions in one (e.g: open a safe + lock some ETH + draw some system coins).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Safe
---

# Safe

This object represents a GEB safe. It has the entire SAFE state and provides helper functions to calculate its liquidation price, collateralization ratio etc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Global Settlement Guide
---

# Global Settlement Guide

The following are examples of how you can use geb.js to facilitate the Global Settlement process and redeem your collateral which is locked in your own Safes or directly exchange system coins with collateral.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Getting Started
---

# Getting Started

Library to interact with the GEB smart contracts. Manage your safes, mint stablecoins, inspect the system state, and much more.
Expand Down
1 change: 1 addition & 0 deletions docs/glossary.md → docs/glossary.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Glossary
description: A glossary of terms that are requently used in these docs and in Open Dollar.
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: SAFE Manager
description: A central hub for all SAFEs
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: FLX Staking
---

# FLX Staking

## 1. Overview
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: RAI Uniswap V2 Mint + LP Incentives Program
---

# RAI Uniswap V2 Mint + LP Incentives Program

## Overview
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: RAI Uniswap V3 Mint + LP Incentives Program
---

# RAI Uniswap V3 Mint + LP Incentives Program

## Overview
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: SAFE Insurance
description: Building and integrating insurance contracts for SAFEs
---

Expand All @@ -14,7 +15,7 @@ Anyone can build and propose new insurance contracts, assuming that the contract

Every insurance contract must implement one of the official interfaces \(the oldest interface can be found [here](https://github.com/reflexer-labs/geb-safe-saviours/blob/master/src/interfaces/SafeSaviourLike.sol)\):

```javascript
```solidity
abstract contract SafeSaviourLike is ReentrancyGuard {
// Checks whether a saviour contract has been approved by governance in the LiquidationEngine
modifier liquidationEngineApproved(address saviour) {
Expand Down Expand Up @@ -105,11 +106,10 @@ There is no specific way in which users should cover a `SAFE`. They can store co
* Users can withdraw cover \(with something like [withdraw](https://github.com/reflexer-labs/geb-safe-saviours/blob/6b8a89e1f6e7c7d210cb68f684ac1c6a5fb6e0c5/src/saviours/GeneralTokenReserveSafeSaviour.sol#L109)\) even if the saviour contract is not whitelisted inside the [LiquidationEngine](https://github.com/reflexer-labs/geb/blob/a49e4486682b787571475821ec66bfa025e5183f/src/LiquidationEngine.sol#L83)
* Only the `SAFE`'s owner or an authorized address inside the [GebSafeManager](https://github.com/reflexer-labs/geb-safe-manager/blob/7da11a4638a994fb0a58e7c1330f69ce897844f9/src/GebSafeManager.sol#L49) can withdraw cover

{% hint style="danger" %}
**Reentrancy**
:::danger Reentrancy
Make sure to protect your cover/uncover functions against re-entrancy.
{% endhint %}
:::


### View Function Requirements:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Bidding Models
description: Information about bidding models for debt and surplus auction keepers
---

Expand Down Expand Up @@ -56,9 +57,9 @@ A sample message sent from the debt model to the keeper may look like:

Any messages written by a _bidding model_ to **stderr** will be passed through by the keeper to its logs. This is the most convenient way of implementing logging from _bidding models_.

{% hint style="danger" %}
:::danger
**Currently there's no mechanism that prevents a keeper from bidding at an unprofitable price**
{% endhint %}
:::

## Simplest possible bidding model

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Collateral Auction Keeper
description: How to run a collateral auction keeper
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Flash Swaps
description: Lightning fast bidding in collateral auctions
---

Expand Down
Loading

0 comments on commit d728539

Please sign in to comment.