mirror of
https://github.com/luxfi/dex.git
synced 2026-09-24 00:26:31 +00:00
The cEVM home's taker is a 20-byte EVM address; the prior 16-byte AccountID would fold a 20-byte address lossily, so two distinct addresses sharing a leading 16-byte prefix could collide as one dexcore account and drain each other's resting-order proceeds (cross-user drain on the account axis). Widen AccountID to the full 32-byte injective settlement identity both homes map into without a lossy fold: the cEVM left-pads the 20-byte address (accountFromAddress), dchain left-pads its 16-byte wire user. 32 bytes is birthday-safe at 2^128 and injective for every real identity. matcherHint renders the full 32 account bytes as the matcher's User/UserID string — the hint is ONLY a matching collision handle, never authoritative for value (settlement resolves the taker from the explicit AccountID and the maker from the orderuser: row). Replaces the trimTrailingZeros round-trip (no longer needed: settlement never reads the hint back).