Audit: CL8Y flows through smart contracts (PASS) + operational hardening recommendations #69
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#69
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
A thorough audit of every CL8Y inflow / outflow path across the Yieldomega smart contracts has been merged to
mainasdocs/onchain/cl8y-flow-audit.md(commit2511077).Result: PASS. The codebase implements the stated invariant correctly:
No hidden outflow surfaces were found (no
rescue,sweep,recoverERC20,selfdestruct, or admin-redirectable burn-sink setter).What was audited
TimeCurve,FeeRouter,PodiumPool,EcosystemTreasury,DoubLPIncentives,CL8YProtocolTreasury(all threeFeeSinksubclasses),RabbitTreasury,TimeCurveBuyRouter,ReferralRegistry.FeeSink.withdrawon the three sink deployments — plusTimeCurve.setReservePodiumPayoutsEnabledand the UUPS upgrade authorization on each proxy. All are immediate role-gated with no timelock, matching the design spec.See the report for the full per-site table with file/line references.
Recommendations (operational hardening — non-blocking)
These do not require contract changes. They tighten monitoring, deployment, and documentation around the existing (correct) controls.
R1 — Document expected
withdrawdestinations for each CL8Y sinkIn
docs/onchain/treasury-contracts.md, add a per-sink note listing the expected destination(s) ofFeeSink.withdraw(token=CL8Y, to=…, amount=…)(e.g. multisig address, LP locker contract). Off-spec destinations inWithdrawnevents then become obvious in monitoring/review.Affected sinks:
EcosystemTreasury,DoubLPIncentives,CL8YProtocolTreasury.R2 — Add monitoring rows for high-impact admin events
In
docs/onchain/security-and-threat-model.md(or a new operational monitoring doc), add high-severity alert rows for:Upgraded(address implementation)on every UUPS proxy (TimeCurve,FeeRouter,PodiumPool,RabbitTreasury,ReferralRegistry, and the threeFeeSinksubclasses).FeeRouter.SinksUpdated(...).TimeCurve.ReservePodiumPayoutsEnabled(...),BuyFeeRoutingEnabled(...),CharmRedemptionEnabled(...),TimeCurveBuyRouterSet(...).Withdrawn(token == CL8Y, …)from each CL8Y-receiving sink.R3 — Deploy-time guard against using
MockReserveCl8y/MockCL8Yin productionAdd a chain-id whitelist (or
vm.envString(\"NETWORK\")check) incontracts/script/DeployDev.s.solso that theMockReserveCl8yfallback path cannot fire on any non-Anvil RPC. Cheap, single-line change. Matches existing comment intent ("NOT for production").R4 — Cross-link the audit from related docs
Link the new
docs/onchain/cl8y-flow-audit.mdfrom:docs/onchain/security-and-threat-model.mddocs/onchain/fee-routing-and-governance.mddocs/operations/final-signoff-and-value-movement.md(issue #55)R5 — Mainnet checklist: confirm role custody is multisig
In
docs/operations/deployment-checklist.md, add an explicit check that on the production deploy,DEFAULT_ADMIN_ROLE,WITHDRAWER_ROLE,GOVERNOR_ROLE, andOwnableownership of every contract on the CL8Y path are held by a multisig (or hardware-backed signer). The contract design assumes this — the checklist should make it a literal pre-launch gate.Conclusion
No protocol changes recommended. The contract design and gating model match the stated security requirement ("owner/admin without timelock so manual review can be done"). Recommendations R1–R5 are operational hardening to make the existing controls easier to monitor, harder to misuse, and easier to audit in future.
References
docs/onchain/cl8y-flow-audit.md2511077docs/onchain/fee-routing-and-governance.md,docs/onchain/security-and-threat-model.md