Skip to content

CAIP2 standard#479

Merged
volovyks merged 2 commits intodevelopfrom
serhii/chain-id
Aug 21, 2025
Merged

CAIP2 standard#479
volovyks merged 2 commits intodevelopfrom
serhii/chain-id

Conversation

@volovyks
Copy link
Copy Markdown
Contributor

  • Added CAIP2 as our standard for network identification (potentially a breaking change)
  • Removed our Roadmap from the repo; it is available on our website.
  • Min updates

jakmeier
jakmeier previously approved these changes Aug 14, 2025
Copy link
Copy Markdown
Contributor

@jakmeier jakmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

What are the breaking changes you had in mind?
Does this require changes to existing smart contracts (MPC contracts and/or user contracts)

@volovyks
Copy link
Copy Markdown
Contributor Author

@jakmeier chain_id is a part of our derivation path. You can check how it works here.

Using CAIP 2 for Ethereum would be a breaking change.

Also, we can use CAIP10. Again, a breaking change. In practice, it would mean going from {EPSILON_DERIVATION_PREFIX},{CHAIN_ID_ETHEREUM},{requester} to {EPSILON_DERIVATION_PREFIX}:{CHAIN_ID_ETHEREUM}:{requester}.

Note, our actual derivation path is {EPSILON_DERIVATION_PREFIX},{CHAIN_ID},{requester},{path}, where EPSILON_DERIVATION_PREFIX is sig.network v1.0.0 epsilon derivation and path is what the user passed in their call. I do not think that there is a standard that includes all these parameters.

@volovyks
Copy link
Copy Markdown
Contributor Author

volovyks commented Aug 19, 2025

Since we do not have a standard that includes both network type and network identifier, some networks had the same derivation path for testnet and mainnet networks. For example:

Ethereum (different derivation paths):

  • mainnet: 0x1
  • testnet: 0x115511

Solana (same derivation path):

  • mainnet: 0x800001f5
  • testnet: 0x800001f5

Now this issue will be fixed:

  • Solana Mainnet: solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
  • Solana Devnet: solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
  • Ethereum Mainnet: eip155:1
  • Ethereum Sepolia: eip155:11155111

But it requires some minor changes.

@volovyks
Copy link
Copy Markdown
Contributor Author

If we want to follow CAIP standards more closely, we can remove EPSILON_DERIVATION_PREFIX (sig.network v1.0.0 epsilon derivation), but my understanding is that this is where we may want to change the key version. cc @scafuro

@volovyks volovyks marked this pull request as ready for review August 20, 2025 14:18
@volovyks
Copy link
Copy Markdown
Contributor Author

I've updated the doc, mentioned CAIP-10, etc.
If we merge this, I will continue with updating our KDF logic.
cc @esaminu @jakmeier

@volovyks volovyks requested a review from jakmeier August 20, 2025 14:20
@volovyks volovyks merged commit 7664359 into develop Aug 21, 2025
3 checks passed
@volovyks volovyks deleted the serhii/chain-id branch August 21, 2025 12:45
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.

2 participants