Skip to content

Update add-gas-currency.md #1970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Update add-gas-currency.md #1970

wants to merge 2 commits into from

Conversation

martinvol
Copy link
Contributor

No description provided.

@martinvol martinvol requested a review from a team as a code owner July 21, 2025 19:48
Copy link

netlify bot commented Jul 21, 2025

Deploy Preview for celo-docs ready!

Name Link
🔨 Latest commit 926ff4b
🔍 Latest deploy log https://app.netlify.com/projects/celo-docs/deploys/687e99f5a2624d000950b105
😎 Deploy Preview https://deploy-preview-1970--celo-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

### Reporting
#### Creating an equivalent Oracle

SortedOracles supports flagging two tokens as "equivalent". This is example do that no new oracle has to be deployed and useful for fiat-backed stablecoins. [Here is an exampl](https://github.com/celo-org/governance/pull/419/files#diff-ba5ba5397b269ceb4b93f3876bedabac605daeec083a364a270675242fe7c424)e of this approach. Using this approach, it is not needed to submit to proposals and can be done in only one.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do --> so

exampl --> example

lvpeschke
lvpeschke previously approved these changes Jul 22, 2025
### Reporting
#### Creating an equivalent Oracle

SortedOracles supports flagging two tokens as "equivalent". This is example do that no new oracle has to be deployed and useful for fiat-backed stablecoins. [Here is an exampl](https://github.com/celo-org/governance/pull/419/files#diff-ba5ba5397b269ceb4b93f3876bedabac605daeec083a364a270675242fe7c424)e of this approach. Using this approach, it is not needed to submit to proposals and can be done in only one.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SortedOracles supports flagging two tokens as "equivalent". This is example do that no new oracle has to be deployed and useful for fiat-backed stablecoins. [Here is an exampl](https://github.com/celo-org/governance/pull/419/files#diff-ba5ba5397b269ceb4b93f3876bedabac605daeec083a364a270675242fe7c424)e of this approach. Using this approach, it is not needed to submit to proposals and can be done in only one.
SortedOracles supports flagging two tokens as "equivalent". This way, no new oracle has to be deployed, which is useful for fiat-backed stablecoins. [Here is an example](https://github.com/celo-org/governance/pull/419/files#diff-ba5ba5397b269ceb4b93f3876bedabac605daeec083a364a270675242fe7c424) of this approach. Using this approach, it is not needed to submit two proposals, the change can be done in only one.


Before submitting the second proposal, at least one of the oracle addresses need to call `report(address token, uint256 value, address lesserKey, address greaterKey)`. This will make a price available to the protocol for gas pricing.

### Enabling as Gas Token

The second proposal enables the gas token by calling `addToken(address tokenAddress)`. After this proposal passes, EOAs should be able to pay for gas in the enabled token.
The second proposal enables the gas token by calling `FeeCurrencyDirectory.setCurrencyConfig(address token, address oracle, uint256 intrinsicGas)`. `intrinsicGas` is the estimated average amount of gas used by the functions `creditGasFees(...)`and `debitGasFees(...)`. A benchmark is recommended as an attachment to the governance proposal.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The second proposal enables the gas token by calling `FeeCurrencyDirectory.setCurrencyConfig(address token, address oracle, uint256 intrinsicGas)`. `intrinsicGas` is the estimated average amount of gas used by the functions `creditGasFees(...)`and `debitGasFees(...)`. A benchmark is recommended as an attachment to the governance proposal.
The second proposal enables the gas token by calling `FeeCurrencyDirectory.setCurrencyConfig(address token, address oracle, uint256 intrinsicGas)`. `intrinsicGas` is the estimated average amount of gas used by the functions `creditGasFees(...)` and `debitGasFees(...)`. A benchmark is recommended as an attachment to the governance proposal.

@lvpeschke lvpeschke dismissed their stale review July 24, 2025 14:26

The page needs to be added to the sidebar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants