Skip to content

Comments

docs: TIP-1018 — Cross-Chain Deterministic Address Derivation#2751

Open
gakonst wants to merge 2 commits intomainfrom
georgios/tip-1018-cross-chain-address-derivation
Open

docs: TIP-1018 — Cross-Chain Deterministic Address Derivation#2751
gakonst wants to merge 2 commits intomainfrom
georgios/tip-1018-cross-chain-address-derivation

Conversation

@gakonst
Copy link
Contributor

@gakonst gakonst commented Feb 18, 2026

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

  • Versioned accounts: v1 (legacy) stays forever, v2 (CREATE2) for new accounts
  • No forced migration: existing accounts are unaffected
  • CREATE2 formula: salt = keccak256(pubKeyX, pubKeyY, index), identical address on all EVM chains
  • CrossChainAccount: pure-Solidity P-256/WebAuthn wallet (Solady), no chain-specific precompiles
  • Atomic deploy+init: factory deploys and initializes in one call, prevents front-running

Edge Cases Covered

  • Cross-chain signature replay (chainId in EIP-712 domain)
  • Front-running deployment (attacker just pays gas for the user)
  • InitCode drift across chains (frozen compiler config)
  • Migration path for v1 → v2 (opt-in, explicit asset transfer)
  • Key rotation without address change
  • Multiple wallets per passkey via index parameter
  • Interaction with TIP-1000 account creation cost
  • EIP-7702 delegation concerns

Context

Supersedes: #2451 (ref impl)

Prompted by: georgios

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant