Skip to content

Reinstate EIP-712 Cosmos AnteHandler path #911

@dogemos

Description

@dogemos

Context

In Ethermint EVM, there used to be a path for handling ExtensionOptionsWeb3Tx as a normal Cosmos SDK tx, except that signature verification uses the Legacy EIP-712 representation (via an AnteHandler decorator). This was removed (prior to Evmos → Cosmos EVM transition) from the antehandler, and has caused significant issues with users not being able to use hardware wallet to sign, and therefore fragmentation across Cosmos SDK + EVM chains attempting to fix the issue in their own ways vs a standardized way.

Requested Change

We’d like to propose bringing the equivalent behavior back into cosmos/evm at:
ante/ante.go around this switch (currently missing the Web3Tx legacy EIP-712 handler):

case "/cosmos.evm.types.v1.ExtensionOptionsWeb3Tx":
  // Deprecated: Handle as normal Cosmos SDK tx, except signature is checked for Legacy EIP712 representation
  anteHandler = NewLegacyCosmosAnteHandlerEip712(options)

Rationale

1. “All Cosmos messages must be handled on the EVM contract side” is not scalable

For chains and apps, forcing every Cosmos-native message flow (staking, gov, bank sends, authz, feegrant, IBC, etc.) to be re-implemented as EVM contract calls doesn’t scale operationally or socially (audits, maintenance, divergent behaviors, long-tail bugs). It also makes hardware-wallet-friendly UX much harder in practice.

2. It pushes implementation burden to wallets (sometimes impossible)

If the chain doesn’t support a high-compat signing path, each wallet must implement chain-specific/custom signing logic for every chain/every message/etc. In cases where code is closed, it can be effectively impossible for wallets to support safely and consistently.

3. Legacy EIP-712 can coexist as a “high compatibility” fallback

EIP-712 doesn’t have to replace existing Cosmos sign modes. This can be an additional compatibility option that lets wallets say: “Use the cosmos/evm standard and your Ledger signing will work with Keplr (and others).” while allowing more complex/well integrated integrations to continue to exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions