Skip to content

[evm]: Select UserOpHash instead of solver address in solver selection #816

@seunlanlege

Description

@seunlanlege

Background

Currently, solver selection authorizes a solver address — the session key signs SelectSolver(bytes32 commitment, address solver), and fillOrder checks msg.sender == stored solver. This means the session key's authorization is bound to a solver identity, but not to the specific UserOperation being executed.

Proposed Change

Replace address solver with bytes32 userOpHash in the SelectSolver EIP-712 struct. The session key would sign over the specific UserOperation hash, creating a tighter binding — a solver couldn't reuse a session signature with different calldata or gas parameters.

Blockers

  1. fillOrder needs to verify the currently executing userOpHash against the stored value. IEntryPoint.getCurrentUserOpHash() is only available in EntryPoint v0.9.

  2. Circle paymaster support is still limited to v0.7 & v0.8

Action

Revisit when upgrading to EntryPoint v0.9.

Affected Files

  • evm/src/apps/intentsv2/IntentsBase.solSELECT_SOLVER_TYPEHASH, _select
  • evm/src/apps/IntentGatewayV2.solfillOrder solver check
  • evm/src/utils/SolverAccount.solvalidateUserOp
  • sdk/packages/core/contracts/apps/IntentGatewayV2.solSelectOptions struct
  • sdk/packages/sdk/src/protocols/intents/CryptoUtils.tssignSolverSelection
  • sdk/packages/sdk/src/protocols/intents/BidManager.tsselectBid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions