docs: TIP-1018 — Cross-Chain Deterministic Address Derivation#2751
Open
docs: TIP-1018 — Cross-Chain Deterministic Address Derivation#2751
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019c6e4f-32f7-73ce-a979-6f3ada33ade2 Co-authored-by: Amp <amp@ampcode.com>
- derive_v2_address: CREATE2-based address from passkey coords + index - derive_v2_address_default: convenience wrapper with protocol constants - recover_p256_address: disambiguates v1/v2 via from_hint - Constants: CROSS_CHAIN_ACCOUNT_FACTORY_ADDRESS, CROSS_CHAIN_ACCOUNT_INIT_CODE_HASH (placeholders) - 10 unit tests covering determinism, index variation, factory/initCode sensitivity, CREATE2 spec compliance, and v1/v2 disambiguation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TIP for modifying P256/WebAuthn address derivation to use CREATE2-compatible addresses, enabling cross-chain fund recovery.
Motivation
Users send funds to their Tempo address on other chains (Base, Ethereum) and lose them permanently. Current derivation
keccak256(pubKeyX || pubKeyY)[12:]has no meaning on other chains.Design
salt = keccak256(pubKeyX, pubKeyY, index), identical address on all EVM chainsEdge Cases Covered
Context
Supersedes: #2451 (ref impl)
Prompted by: georgios