Add CGP-244: Improve Withdrawal for StakedCelo - #820
Merged
Conversation
0xj4an-Work
approved these changes
Jun 25, 2026
0xzoz
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds CGP-0244 — Upgrade stCELO Contracts: Precise Withdrawal Accounting and Distribution.
Main change: upgrades the four core stCELO implementation contracts (
Account,Manager,DefaultStrategy,SpecificGroupStrategy) so withdrawal capacity accounting reflects what is actually realisable at withdrawal time, spreads withdrawals across healthy groups, and adds a permissionlessrescueScheduledWithdrawalsafeguard — motivated by the forum discussion. Storage layouts are unchanged and the upgrade is non-breaking for stCELO holders.The proxies are owned by the StakedCelo MultiSig (
0x78DaA21FcE4D30E74fF745Da3204764a0ad40179), so the upgrade routes through itsgovernanceProposeAndExecuteentrypoint (callable only by Celo Governance), which forwards fourupgradeTocalls as the proxies' owner.New implementations
0x4aAD04D41FD7fd495503731C5a2579e19054C4320x3a81b5bd5c719cd57d9122d34a093119d61c81170x3A3ed74B1cC543D5EB323f70ac2F19977a0eA0880xac294abf757dd2890c65751dcc095152c27b34160xb88af6EAc9cd146D8b03b66708EF76beBD9378710x9cbbb5b84dc3dec31daea36c53bdfe145cb40e9d0x0239b96D10a434a56CC9E09383077A0490cF93980xbc465bbf2e2d71c62eda1b24061916877f6ae15eTable order matches the proposal payload (Account, DefaultStrategy, SpecificGroupStrategy, Manager). A shared
AddressSortedLinkedListlibrary (0x1f2030b177ea2d1ef457e4311d4ace5a920381a1) is linked into the new bytecode — not a proxy or upgrade target.Proposal transactions (
CGPs/cgp-0244/mainnet.json)A single Celo Governance transaction:
StakedCeloMultiSig.governanceProposeAndExecute(address[],uint256[],bytes[])→ fourupgradeTo(newImpl)calls (selector0x3659cfe6), one per proxy, applied atomically.Files
CGPs/cgp-0244.md— proposal descriptionCGPs/cgp-0244/mainnet.json— proposal transactionNotes / TODO
governance-proposal-idleft blank until submitted on-chain.authorset toPavel Hornak (@pahor167)(forum author + cgp-0239 precedent) — adjust if championed under a different name.cast callofgovernanceProposeAndExecutefrom the Governance proxy0xD533Ca…7972): executes with no revert; all four proxies confirmed owned by the MultiSig and each paired with its own implementation. A directupgradeTofrom Governance revertsOwnable: caller is not the owner, confirming the MultiSig route is required.