GoodDocs
Search…
2. The Reserve
The GoodDollar Reserve is the smart contract that governs the vault holding the assets that back G\$ tokens. The algorithm that guides the reserve is based on the Bancor formula, which has been altered to fit GoodDollar’s needs. There are two important characteristics unique to the GoodDollar Reserve:
1. 1.
The reserve supports the generation of G\$. Users can always convert to and from G\$ via the reserve.
2. 2.
The unique math of the GoodDollar Reserve lends G\$ exceptional stability.

## Key Terms

Reserve: The pool of tokens backing G\$ generation.
Reserve Ratio (Rr): The ratio between the total G\$ market cap and the value of the reserve.
Supply (S): The current circulating supply of G\$.
Price (P): The price of G\$ relative to the tokens in reserve.
Exit Contribution: A contribution paid when selling G\$ into the reserve in exchange for another currency.
G\$X: A token earned as a reward for buying G\$ from the reserve that can be used to reduce a user’s exit contribution in a subsequent sale of G\$.

### The Reserve Ratio (Rr)

The ratio between the value of the reserve and the market capitalization of G\$. The lower the ratio, the more G\$ the protocol can generate.

## Reserve Functions:

The GoodDollar Reserve performs three different functions important to the GoodDollar Economy: Expansion; Conversion; Interest Deposits. These are outlined below (for more on the underlying math, please see the appendix of the GoodDollar white paper).
• Expansion is the pre-set annual rate by which the token supply increases, thereby reducing the reserve ratio. For instance, if the expansion rate is set to 10% annually and the year begins with a reserve ratio of 1, then by the end of the first year the reserve ratio would be 0.9, by the end of year two, 0.81, and so on (Equation 3).
• Conversion is the process that enables users to exchange G\$ for CDAI and vice versa. Since the GoodDollar Reserve is essentially an automated market maker (AMM) that works on a bonding curve, the amount of G\$ minted or burned depends upon how much collateral is added or removed from the reserve. Users who buy G\$ receive a matching number of G\$X tokens as a reward for their purchases, which can be used to reduce their exit contributions when they choose to sell G\$ (see below).
• Interest deposits into the GoodDollar Reserve from a third-party protocol are converted to G\$ in a different way than during the crypto exchange process outlined above. When a user buys G\$ from the GoodDollar Reserve in exchange for a supported currency, new tokens are minted and the price of G\$ rises. In contrast, when a user deposits interest, there are more tokens minted, but the price of G\$ doesn’t change.

## Exit Contributions

### G\$X Tokens

In addition to the G\$ coin and the GOOD governance token, the GoodDollar ecosystem includes a third type of crypto token: G\$X. Members who hold G\$X tokens can use these to reduce their exit contributions when selling G\$ to the reserve by an amount set by the DAO. Users acquire G\$X tokens as a reward for buying G\$ from the reserve (currently, a user who buys 100 G\$ will also receive 100 G\$X).

### Exit contribution calculation including G\$X

1. 1.
Discount = 1 - G\$X/G\$sold
1. 1.
If Discount <= 0 Then Discount = 0
2. 2.
Exit contribution = Setcontribution*Discount

### G\$X Supply & Burn policies

For every G\$ token bought from the GoodDollar Reserve, the reserve will issue 1 G\$X token. For every G\$ token sold to the GoodDollar Reserve, the reserve will burn 1 G\$X token.

## Stability

As described above, the impact of buying and selling currencies to and from the GoodDollar Reserve depends on three factors:
1. 1.
The size of the reserve ratio.
2. 2.
The size of each transaction.
3. 3.
The total reserve value.

## Simulator

A Price similator with dynamic reseerve rate function is available here :

## Helper contracts

Helper contracts are smart contracts that connect the GoodDollar Reserve to other liquidity networks in order to allow liquidity to flow from G\$ to any other token that has an automated market maker (AMM). For example, if a user wants to convert token X to G\$, the helper contract will first convert token X to DAI using Uniswap, and then convert DAI to CDAI using Compound. Finally, it will convert the CDAI to G\$ using the GoodDollar Reserve. Future versions of the protocol may extend this functionality to additional protocols, such as Bancor and Aave.