mirror of
https://github.com/luxfi/zap.git
synced 2026-07-27 07:42:47 +00:00
FEE-ON-TRANSFER id divergence (LOW/INFO #2c). On-chain DeriveIntentID binds the OBSERVED-DELTA locked amount (the value the 0x9999 vault actually received), not the requested amount. For native LUX + standard ERC-20s, locked == amountIn so this off-chain pre-derivation equals the on-chain id exactly. For a FEE-ON-TRANSFER token, locked < amountIn so the pre-derived id DIVERGES — but that is only a missed pre-registration optimization, not a safety or correlation break: the on-chain IntentSubmitted event carries the REAL id as its INDEXED topic (and the real locked amount), so a keeper correlates via that topic — the authoritative binding — and builds the D order from the event, never a guessed id. Scoped the DeriveIntentID doc to state this precisely (pre-registration valid iff locked == amountIn; otherwise correlate via the indexed topic). CROSS-REPO id golden (LOW/INFO #3b). Added TestIntentID_OffChainEqualsOnChain: the off-chain DeriveIntentID over fixed inputs must hash to a shared golden the precompile side ALSO pins (its TestIntentID_CrossRepoGolden, native_intentid_parity_test). dexsession cannot import precompile/dex (EVM+geth+cgo + a forbidden compile edge to C Verify), so the two id implementations are anchored to ONE golden — either drifting fails its half. Closes the missing cross-repo equivalence test. CGO_ENABLED=0 pure-Go (GOWORK=off); full dexsession suite green.