Repository navigation
fix(deployments): check router provenance before pool admission - #62
Conversation
👁️ Cyclops Security Review✅ Reviewed 1d6571b (latest) · Coverage: full ·
|
|
Low (exposure and trigger unconfirmed): Pool-owner handoff skips router provenance check and verification instruction The provenance check this PR adds to admitPoolRouter runs only when the deployer key owns the pool. With no key or no pool authority the step returns before the check, and the emitted pool-owner handoff asks for setTakerAllowed and setRecipientAllowed on the recovered router without any verification instruction. First reported at 529c4ec; recheck at this head: still present. Valid? React with 👍 / 👎. |
There was a problem hiding this comment.
I reviewed this PR and found no bugs. It changes when the lifecycle's own keys grant pool permissions, so a human look is still worthwhile.
What was reviewed:
admitPoolRouterawaitsrequireProvenanceafter the redirect check and the no-op return, and before it builds the calls. A rejection therefore stops both the direct-owner path and thecontroller.executepath before anything is sent.authorize-routeruses the same contract and constructor args asregister-zone-gateway.authorize-zone-routerreusesrequireModeProvenance, so it checks the factory and the router. Named-factory profiles still return a handoff before any check runs.- In both new tests the mock rejects. The tests check that the same error comes back and that
sendTransactionSyncis never called. I did not run the type check or the test suite.
Extended reasoning...
The change is in deployments/modules/earn/zone-router/steps.ts and deployments/modules/zone-router/steps.ts, plus two tests and two doc pages. It adds a required provenance callback to the shared pool-admission helper used by authorize-router and authorize-zone-router. The security-sensitive part is the deployer-key path that grants a router taker and recipient permission on a PropAMM pool, a grant the lifecycle cannot take back. The diff is small and follows the existing Portal-admission pattern. I deferred instead of approving because this is an authority and permission path, and an earlier inline bot comment on the Earn doc page may or may not be addressed by the follow-up commit.
Pool admission (
authorize-router,authorize-zone-router) now runs the same runtime provenance check as Portal gateway and account admission before it sendssetTakerAllowed/setRecipientAllowed. A recovered router (and, for the Zone router, its lifecycle-deployed factory) must match the reviewed local build byte for byte, or the step stops before signing anything. Routers that are already admitted cause no new check and no new transaction.admitPoolRoutertakes a requiredrequireProvenancecallback and runs it after the no-op check and before sending.authorize-routerchecksSingleZoneEarnRouter.authorize-zone-routerreusesrequireModeProvenance.docs/earn/modules/zone-router.mddescribes the check.Checks run:
pnpm check:types,pnpm check,pnpm --filter @tempoxyz/contracts test --run(777 passed, 1 skipped). No Solidity changed.