# $RG: Rarity Gold

We redeveloped the Rarity 2 contract to achieve a two main things:

1. Ensure that gold can be deflationary, which reduces its supply relative to demand over time thereby defending its value.
2. Allowing governance of the variable parameters of the gold smart contract formula, with a view to optimising the game economy.

Note that for trading purposes, you need to wrap your $RG on the web UI into Wrapped Rarity gold, with the symbol $WG.

### The Rarity Gold Supply Formula

The formula is written simply as follows:

A \* ((level - 1) ^ 2) + B \* (level - 1) + C + D / (level - 1).&#x20;

The variables A, B, C & D adjust the gold supply. Their values will be set through governance by $RGV token holders initially with a voting mechanism as is typical in many other projects but ultimately aiming at DAO owners.

### **Examples of Economic Models Possible**

The values assigned to the variable parameters could be used for the following economic outcomes:

1. Exponential increase: B, C, D = 0; A = 1000;&#x20;
2. Linear increase: A, C, D = 0; B = 1000;&#x20;
3. Static: A, B, D = 0; C = 1000;&#x20;
4. Hyperbolic decrease: A, B, C = 0; D = 1000;&#x20;
5. Standard(as it is in rarity): A = 500; B = 500; C, D = 0.

***$RG has been set at hyperbolic decrease at the outset. This is represented in a graph as follows:***

![](https://3030580325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkB1FSHs8bnQOsrf_a4%2Fuploads%2FkyyuPyx3yoFwCch5pVri%2Fimage.png?alt=media\&token=84fb2895-ae56-4a4f-8d7b-f4f8c4e73271)

The full code of the formula can be found [**here**](https://github.com/degen-vc/rarity-v2/blob/main/contracts/core/GoldV2.sol#L94).

&#x20;
