Adding GoodDollar as gas token on Celo

We are working to meet the requirements for adding GoodDollar as a gas token.

Short recap:
G$ recently launched on Celo, and will be bringing 10s of thousands of new users to the Celo ecosystem.
Currently for easy web3 experience we subsidize the gas fees for our users.
We run a faucet that any account that passed our proof of human can top his wallet from.
On top of that users of course get free money daily in the form of G$s.
This makes G$ an ideal gas token for the Celo ecosystem, to easily and seamlessly onboard new users to web3 without exposing them to complications of holding a gas token or needing to buy stables as an alternatives.
G$ is also “always liquidty” and “stable enough” due to its tokenmodel based on the Bancor Reserve model, which also makes it relatively secure and trusted for validators.
Another idea is that gas fees paid in G$s would go back to fund more UBI as per the vision for the Celo protocol to support UBI.

So far we’ve implemented the debitGasFees and creditGasFees requirements, we’d appreciate code reviews here:

We are looking for some guidance regarding the price oracles:

  1. what’s the interface for the Oracle?
  2. how often should it be updated?
  3. can it rely on on-chain data like TWAP?
  4. any oracles running this service we can rely on?

Thanks

11 Likes

Hey!

Take a look at the README in the codebase for the Celo Oracles for info on adding a new pair.

You need more than one USD pair at exchanges whose price feeds are accessible by API (via ccxt, right now). The Oracle handles time and volume weighted averaging, circuit-breakers, retries, etc.

The current model assumes more liquidity for gas tokens at centralized exchanges, than on-chain. This is not necessarily the right assumption for some tokens, especially in the future, but was true for the first use cases for the Celo Oracles.

If most of your token activity is on-chain, this model might not work for you. @roman @martinvol @bowd might have some more thoughts.

1 Like

yeah G$ is not on any centralized exchanges.
We have the reserve on mainnet which is based on Bancor AMM and has a subgraph
And we’ll have some pools on Celo

1 Like

Also have we implemented the debit and credit correctly?

@martinvol can help here!

But I think the bigger challenge is that the current model needs rethinking/extending for on-chain tokens. There a few different ways to solve this, but all would need new core contract code (and possibly a blockchain change)

In theory, the oracles can watch the price on-chain and calculate the TWAP. The client just calls an API and forwards that price on-chain, but there’s nothing stopping from getting the price for an on-chain source.

Worth noticing also with the current model, the client is needed, even if TWAP is available somewhere in the chain.

so basically the oracle can just be a subgraph endpoint?

Following up on this Forum proposal.

In the July Celo governance call, we presented the following overview.

This is linked to the following Github Repo: Merge branch 'main' into gd-gas-proposal by sirpy ¡ Pull Request #284 ¡ celo-org/governance ¡ GitHub

For the past 2 months, G$ has been running as a gas token on Alfajores effectively and steadily. We would like to prepare to take this to an on-chain vote. Would love to hear questions and feedback from the community as this is prepared to move to an on-chain vote.

2 Likes

I like this proposal,

Just for info of the Community there are tho CGPs related to this proposal, and as far I understand you need to propose for OnChain Voting the first one, and then you can submit the second one.

CGP-0085: G$ oracle activation

CGP-0089: Add G$ as GasToken

Thanks @0xj4an-work @tim @martinvol @roman @bowd & others for your feedback.

We are still in the discussion phase, seeking feedback on this proposal while G$ is running as a gas token is running on Alfajores (2+ months now), before submitting the on-chain proposal.

Next steps are to share more info on the oracles and the GoodDollar tokenomics aligned to the Celo burn rate. https://dashboard.gooddollar.org/ But G$ is a reserve-based token (AMM) with a predictable price curve - you can see all time price history on the dashboard. We also will present on the upcoming governance call on September19th.

Any other feedback and comments?

1 Like

Excited to see this up!

2 Likes

If using a token as a gas fee was ever significant - this is the moment the gap between the people claiming G$ daily and the idea of gas fees is remote, at the moment, the gas fees are sponsored from the good labs and can’t be sustainable over time.

This is the heavy lifting needed in order to turn UBI sustainable.

3 Likes

Having G$ as a gas token would facilitate for GoodDollar community and pretty much anyone new to web3 to utilize dApps in the Celo ecosystem.

What we’ve seen so far in the partnerships we’ve developed since the GoodDollar protocol’s expansion to Celo is that even though gas is subsidized through the GoodWallet, people struggle to engage with our partners because they don’t understand gas or they feel uneasy with swaps.

A recent example of the above is the latest GoodDollar Savings Challenge on Halofi. Users deposited almost 10k USD worth of G$ over 3 rounds using the subsidized gas, but withdrawing their deposit turns out to be more expensive than other transactions - which means that many are currently unable to retrieve rewards. Educating people about gas/swapping is definitely important as we onboard the world to web3, but better yet would be to remove the hassle altogether and let people use the money they have to pay for their transactions.

2 Likes

if the G$ is approved as a gas token I think that if wallets or dapps really allow people to use the G$ as a gas token Gooddollar could work as a kind of faucet also for the entire Celo Blockchain, it would make anyone who needs operate within a Blockchain, do not have to go buy a Gas token, many people are new and that makes access difficult, but using Gooddollar as a place to claim your basic income, you could use it to access the entire ecosystem skipping the problem of buy Gas token.

I believe it would facilitate the access and operation of tens of thousands of active basic income claimants and many others who are within the Celo Blockchain but do not have access to a gas token will naturally be included in Celo

So I am happy for this proposal

3 Likes

Happy to see this proposal up!

I see significant value in activating G$ users on Celo. Many G$ claimers are everyday, global, mobile users, who very much fit into the ideal customer profile of Celo.

At Masa, we integrated G$ as a payment token to Prosperity Passport dApp so users can purchase .celo domain names and engage with Prosperity Passport using G$. Adding G$ as a gas token on Celo is another significant step towards increasing the utility of G$ and UBI overall.

2 Likes

Love to see this proposal coming true.

2 Likes

The Good Labs team would like to share the following updates to the original proposal, after several months of testing G$ as a gas token on Alfajores and soliciting to the community for feedback.

re: Merge branch 'main' into gd-gas-proposal by sirpy ¡ Pull Request #284 ¡ celo-org/governance ¡ GitHub

Price Oracle

  • The Oracle is built calculate the price of G$ <> CELO & vice versa
  • The Oracle pulls from two sources
  • As further explained in the section that covers G$ tokenomics, G$ is an automated market maker whose price functions according to a bonding curve formula. As such, the true “G$” price is sourced from the GoodDollar reserve.
  • G$ has a price variability of < 10% per year, and as such, makes it useful for gas (all time price information can be found on dashboard.gooddollar.org).
  • As a protection mechanism, a rule has been added that if the G$ price varies more than 20%, the new price will not be executed

G$ Tokenomics in Brief

  1. Augmented Bonding Curve: G$ operates on an Augmented Bonding Curve backed by a monetary reserve held in cDAI. The price is calculated using a modified BancorV1 formula, promoting dynamic pricing. The reserve ratio is currently 55.39%. (See dashboard).
  2. On-Demand Issuance: G$ issuance responds to demand. New G$ are minted as cDAI deposits flow into the GoodDollar Reserve, maintaining a balance between supply and demand.
  3. Funding Sources: Funds in the GoodDollar Reserve come from:
  • Deposits to the Reserve, fueling G$ issuance and value of UBI.
  • Corporate Social Responsibility - Yield Farming, where partners donate interest earned, not capital, integrating with Compound and Aave protocols.
  1. Liquidity: G$ is fully liquid. The GoodDollar Reserve acts as a primary market maker, ensuring seamless exchangeability. DEXes support liquidity on side-chains, enabling cash-out into various currencies, fostering trust and incentivizing liquidity providers.
  2. 100% Mission-Driven: All minted G$ are used to to support UBI distribution, ecosystem growth, community initiatives, and rewards contributors; there is no founder allocation, and has been no private sale.

More information on GoodDollar protocol, tokenomics, community and usage can be found in this GoodDollar Overview, on gooddollar.org, or docs.gooddollar.org

1 Like

While the CELO token itself carries a promise of ledger usage, Good Dollar’s value is largely dependent on temporary donors, lacking a concrete promise or commitment to service / utility. This raises significant questions about the long-term sustainability and stability of such an integration.

The primary concern is the potential risk associated with the Good Dollar liquidity pool. What would happen in a worst-case scenario where the value of the Good Dollar liquidity pool drops to near zero after donors withdraw their support? Such a situation could have cascading effects on the CELO network and its users, potentially undermining the trust and utility of both tokens.

It is crucial to conduct rigorous mathematical modeling to assess the risks and implications of this integration. Understanding the worst-case scenarios will not only help in making informed decisions but also in implementing safeguards to mitigate potential risks. How limited to this risk is the CELO- ecosystem?

1 Like

if the main objective is to enable users to use their G$ for gas, then leveraging existing liquidity pools between G$ and CELO could be a more straightforward and less risky solution. Users could simply trade their G$ for CELO at fair market values through these pools and then use the CELO for gas. This approach avoids the complexities and potential pitfalls of making G$ a parallel gas token, such as issues related to supply management, stability, and utility.

By using existing liquidity pools, the ecosystem can capitalize on already-established mechanisms for value exchange. This would keep the system more resilient and less prone to the kind of imbalances that could arise from having two tokens serving the same primary function but with different economic models.

So, if the goal is to empower people to use G$ for transactions, then let’s build on what’s already working. It’s a path that honors both the wisdom of existing structures and the well-being of the community.