Protocol Sync Review
Use this workflow to catch integration drift before runtime failures.
Primary objective
Detect mismatches between:
- Solidity interfaces and implementations
- Event names, field order, and indexed fields
- Decimal and unit assumptions (
priceUsdE8, USDC e6, wei) - Feed key hashing conventions
- Workflow/frontend expectations versus on-chain APIs
Review targets
requirements.mdREADME.mdpolicy-engine/contracts/srcvault/contracts/srcchainlink-cre-car-price-oracle/contracts/srcchainlink-cre-car-value-insurance/contracts/srcchainlink-cre-car-price-oracle/car-price-oracle-workflowchainlink-cre-car-value-insurance/insurance-workflowfrontend
Locked protocol assumptions
Treat these as stable until the team intentionally revises the spec:
feedKeyHash = keccak256(bytes(feedKeyString))- Oracle struct shape:
priceUsdE8 uint128sampleSize uint32confidenceBps uint32updatedAt uint64sourceHash bytes32PolicyPurchasedandPolicyClaimedevent names and argument order.- Policy identifier rule:
tokenId == policyId. - Policy manager API shape:
buyPolicy(bytes32,uint128,uint256,uint64)triggerPayout(uint256)getPolicy(uint256)isActive(uint256)
Drift checks
- Flag interface signature mismatches between contracts and interfaces.
- Flag payout semantic mismatches across docs/contracts/tests.
- Flag ETH-versus-USDC assumption mismatches.
- Flag event type or ordering drift from locked spec.
- Flag stale addresses, wrong chain targets, or missing config linkage.
Output contract
Return:
Critical integration breaks(causes failed tx or invalid runtime behavior).Spec drift(not yet broken but no longer aligned).Decision-needed itemsrequiring team alignment.Patch planwith exact files to change.