Hi everyone,
The cLabs team is happy to announce Core Contracts Release 11!
The release is being audited right now, and devs will be at the next Community Governance call to discuss this further.
Changes
Allow multiple tokens and identifiers to share one Oracle feed
Celo’s SortedOracles mechanism is a decentralized price feed infrastructure, operated by T-Systems, RedStone, and other community members, all funded by the Community Fund. It features VWAP aggregated prices from multiple trusted exchanges, and circuit breakers in case of data feed issues.
This release incorporates into the Core Contracts the SortedOracles enhancements already deployed to mainnet as part of the Mento v2 upgrades, and already audited by Verilog.
The release also introduces a new mapping layer to facilitate multiple tokens reusing a single data feed. These data feeds are used by the Celo client to evaluate gas prices specified in fee currencies against the price of CELO. We now have multiple tokens that could need to leverage a specific feed, namely the CELO-USD rate.
(As an aside, note that the feed does not track the price of a particular stablecoin. In the extremely rare event of the exchange rate for a specific token deviating from the CELO-USD rate, for example if it temporarily depegs, the impact would be transactions denominated in that currency being prioritized for inclusion in blocks ahead of or behind where they should be. Since fees are paid to validators etc in the fee currency, rather than swapped to CELO, the full intended value is paid).
Gas currency adapter template
This release also includes a gas currency adapter contract that can be used to specify gas prices in 18 digits for assets that use a different precision. This allows tokens that use fewer than 18 digits of precision to operate efficiently as gas currencies, effectively giving them 18 decimals of precision when users are bidding for gas.
The Ethereum transaction object format includes a maxFeePerGas
field that specifies the number of wei the sender is prepared to pay for each unit of gas, i.e. each amount of work the contract does. In Celo, this behaves identically when paying for gas with CELO. When paying for gas with another token, the maxFeePerGas
field is denominated in the units of that gas currency. Some tokens have different numbers of decimal places – USDC has 6 – which means that transaction issuers would not be able to specify a sufficiently small value for a unit of gas to construct competitively priced transactions.
This adapter joins several other library contracts in the Core Contracts: they are being audited and will be available for the community to use, but the upgrade does not deploy them nor does Governance control them.
When deployed by gas currency issuers, an adapter contract like this reference implementation enables gas prices to be specified in 18 decimal places. Adapter contracts hold no value and only ever need to be referenced when paying for gas. Wallets and transaction signers list the adapter’s address in the gasCurrency field. The experience is invisible to end users.
Minor fixes and enhancements
The release also includes minor enhancements to facilitate tooling improvements and a bug fix for a rare issue that prevents CELO being unlocked even once the governance proposal on which it was being used to vote has expired. See release notes.
Relevant links
- Governance proposal: CGP forthcoming
- Release notes: Core Contracts Release 11
- Audits:
- Forthcoming
- Release process documentation: Smart Contracts Release Process
Governance proposal timeline
- Community call, February 9
- Audit complete: expected ~February 12
- Alfajores: expected ~February 12
- Governance proposal: expected ~February 19
- Mainnet: expected ~February 27
What next?
If you have any comments or questions we’d love to hear from you! You can reply here. We’ll also be at the upcoming Community Call.
We look forward to hearing your thoughts!
Volpe, on behalf of the cLabs team