FIP-8: Verifications for Contract Wallets #109
Replies: 4 comments 7 replies
-
Verifications require producing a claim with an Ethereum address and providing a signature from the same address in the We should extend the specification to support EIP-1271 verifications so that smart contract wallets can be verified correctly. |
Beta Was this translation helpful? Give feedback.
-
Zain from OP Labs suggested using a SIWE message as the claim in a Twitter conversation. Pros:
Cons:
|
Beta Was this translation helpful? Give feedback.
-
Does this mean that until this FIP is finalised, setting a smart contract custody address is not possible? |
Beta Was this translation helpful? Give feedback.
-
A PR implementing this in hubs is ready to go here: farcasterxyz/hub-monorepo#1449 One small update from the implementation: we are using the EIP-6492 standard for contract signature verification. This is a signature wrapper standard that is backwards compatible with EIP-1271 signatures and forwards compatible with verifying signatures from counterfactual smart wallets. Clients like Viem already use this for contract signature verification. The consequence is that valid contract signatures will include both EIP-1271 signatures from smart contract wallets and signatures in the EIP-6492 wrapper format. |
Beta Was this translation helpful? Give feedback.
-
Title: Verifications for Contract Wallets
Type: Implementation FIP
Authors: @horsefacts, @sanjay, @eulerlagrange.eth
Abstract
A proposal to extend verifications to support smart contract signatures.
Problem
Verifications require producing a claim with an Ethereum EOA address and providing an ECDSA signature in the
VerificationAddEthAddressBody
. This doesn't work for smart contract addresses, where the signing address is not the same as the address being verified.We should extend the protocol specification to support ERC-1271 verifications so that smart contract wallets can be verified correctly.
Specification
Extend
VerificationAddEthAddressBody
to add two additional fields,verification_type
andchain_id
:Type
EOA
:verification_type
must be0
.chain_id
must be0
.Type
Contract
:verification_type
must be1
.chain_id
must be1
or10
.chainId
in the domain separator. (This is not required forEOA
signatures)eth_signature
must be ≤ 256 bytes.eth_call
to an EIP-6492 universal validator contract, providing the EIP-712 typedData hash of theVerificationClaim
as thebytes32 _hash
parameter. EIP-6492 defines a wrapper format for verifying contract signatures from undeployed counterfactual contracts compatible with ERC-1271. Tools like Viem already use the 6492 format for smart contract signature verification.VerificationRemove
message according to their own security policy.As an example of future extensibility, we might further extend verifications to use an onchain registry like delegate.xyz. The following is just an example and will not be implemented as part of this FIP.
Type
'DelegateV2'
:verification_type
must be2
.chain_id
must be1
or10
.eth_signature
must be a signature from the custody address accepting the delegation.eth_call
to the delegate.xyz contract onchainId
to retrieve active delegations.DelegateAll
revocation events.Rationale
Design goals:
Why is there a limit on the length of contract signatures?
Unlike offchain ECDSA signatures, which are 65 bytes long, ERC-1271 and 6492 don't enforce a maximum length on smart contract signatures. This means a malicious contract signer could grief or DoS hubs, by forcing them to store very long signatures. 256 bytes should be sufficient for most contract wallet and smart contract use cases, and we can increase max length in the future if necessary.
Why are smart contract verifications only available on OP and Ethereum mainnet?
Since hubs need to perform a call to verify smart contract signatures, they need access to an RPC provider for the network where the smart contract is deployed: one provider per chain. Hubs already support RPC connections to OP mainnet and Ethereum mainnet.
We expect that OP and Ethereum mainnet verifications will be sufficient for most use cases in the near future and don’t want to require hubs to support additional networks right now. We may revisit this decision: nothing in this design precludes adding additional networks.
Release
Include the proposed changes after protocol release
2023.10.04
.Beta Was this translation helpful? Give feedback.
All reactions