celo-org / celo-monorepo

Official repository for core projects comprising the Celo platform
https://celo.org
Apache License 2.0
697 stars 370 forks source link

Soloseng/celo-minting-schedule #10995

Closed soloseng closed 4 months ago

soloseng commented 4 months ago

Description

Created a contract MintGoldSchedule.sol that calculates the amount of CELO to mint and distribute to the community fund and carbon offsetting fund address. This contract can be deployed on L1, but will only be activated on L2 by calling MintGoldSchedule.setDependencies().

This schedule is based on the existing schedule previously defined by EpochRewards contract. In this new schedule, only the percentage of CELO allocated to community rewards and carbon offsetting fund is minted.

As with the L1 minting schedule, the L2 minting schedule in only defined for the first 15 years after L1 genesis block. Future modification to the MintGoldSchedule contract will be required to define a schedule beyond the first 15 years. Additionally, setting the distribution fraction for any fund is prohibited once the first 15 years have elapsed.

GoldToken.sol was updated to only allow minting by the owner or the MintGoldSchedule contract.

Other changes

Tested

Related issues

openzeppelin-code[bot] commented 4 months ago

Soloseng/celo-minting-schedule

Generated at commit: 044c620a98c3646444ed755a1819ee837c570862

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
2
3
0
15
42
62
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector