GoodDocs
  • Welcome to GoodDocs!
  • GoodDollar Ecosystem Vision
  • About the Protocol
    • Usage
    • Tokenomics
    • Sybil-Resistance
    • Protocol V3 Documentation
      • Architecture & Value Flow
      • System's Elements
      • Core Contracts & API
        • GoodDollar
        • GoodCompoundStaking V2 (DAI)
        • GoodAaveStaking V2 (USDC)
        • GoodReserveCDai
        • GoodFundManager
        • GoodMarketMaker
        • ContributionCalculation
        • UBIScheme
        • Identity
        • FirstClaimPool
        • AdminWallet
        • OneTimePayments
        • DonationsStaking
        • NameService
        • GReputation
        • CompoundVotingMachine
        • StakersDistribution
        • UniswapV2SwapHelper
        • Invites
        • GovernanceStaking
        • ClaimersDistribution
        • CompoundStakingFactory
        • AaveStakingFactory
        • ExchangeHelper
        • FuseFaucet
        • GoodDollarMintBurnWrapper
      • Previous Protocol Versions
        • Protocol V1
          • Architecture & Value Flow
          • Core Contracts & API
        • Protocol V2
          • Architecture & Value Flow
          • System's Elements
            • 1. The token (G$)
            • 2. The Reserve
            • 3. The Trust
            • 4. Staking rewards (APR)
            • 5. The Fund Manager
            • 6. The Distribution Contract (DisCo)
            • 7. Governance (DAO)
          • Core Contracts & API
            • GoodDollar
            • GoodCompoundStaking V2 (DAI)
            • GoodAaveStaking V2 (USDC)
            • GoodReserveCDai
            • GoodFundManager
            • GoodMarketMaker
            • ContributionCalculation
            • UBIScheme
            • Identity
            • FirstClaimPool
            • AdminWallet
            • OneTimePayments
            • DonationsStaking
            • NameService
            • GReputation
            • CompoundVotingMachine
            • StakersDistribution
            • UniswapV2SwapHelper
            • Invites
            • GovernanceStaking
            • ClaimersDistribution
            • CompoundStakingFactory
            • AaveStakingFactory
            • ExchangeHelper
            • FuseFaucet
  • User Guides
    • Buy & Sell G$
    • Stake to create UBI
    • Claim GOOD and G$X
    • Bridge GoodDollars
    • Connect another wallet address to identity
  • Liquidity
  • Wallet and Products
    • GoodWallet
    • GoodDapp
    • New GoodWallet
    • GoodCollective
    • GoodID & GoodOffers
    • 3rd Party Partners and Integrations
  • Frequently Asked Questions
    • Web3 basic knowledge and security tips - by Consensys
    • About GoodDollar
    • GoodDollar Protocol & G$ Token
    • Using GoodDollar
    • GoodDollar Community
    • Troubleshooting
  • For Developers
    • Contributing to GoodDollar
    • GoodDapp Developer Guides
      • Deploy your own GoodDapp UI
      • How to integrate the G$ token
      • Use G$ streaming
      • Ethers V5/useDapp Context Setup
    • APIs & SDKs
      • UBI
        • Claim UBI (Ethers v5/ React)
        • Claim UBI (Viem/Wagmi)
        • Claim UBI (Web-components)
      • Sybil Resistance
        • Identity (Ethers v5 / React)
        • Identity (Viem/Wagmi)
  • Useful Links
    • GoodDollar.org
    • GoodDapp
    • GoodWallet
    • GoodDollar User Guides
    • Statistics Dashboard
    • GoodDollar Whitepaper
    • GoodDollar Litepaper
    • GoodDollar Litepaper - Español
Powered by GitBook
On this page
  • Key Terms
  • Reserve Functions:
  • Exit Contributions
  • Stability
  • Simulator
  • Helper contracts

Was this helpful?

  1. About the Protocol
  2. Protocol V3 Documentation
  3. Previous Protocol Versions
  4. Protocol V2
  5. System's Elements

2. The Reserve

Previous1. The token (G$)Next3. The Trust

Last updated 3 years ago

Was this helpful?

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. The reserve supports the generation of G$. Users can always convert to and from G$ via the reserve.

  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 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 ().

  • 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. Discount = 1 - G$X/G$sold

    1. If Discount <= 0 Then Discount = 0

  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. The size of the reserve ratio.

  2. The size of each transaction.

  3. The total reserve value.

Simulator

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.

A Price similator with dynamic reseerve rate function is available :

appendix
Equation 3
here