Skip to content

Incentive: implement off-chain ERC-1271 verification for smart-account clients #1186

Closed

Description

@alpergundogdu

Disposition: IMPLEMENT (ADR 024).

verify_binding rejects any signature length != 65 (EOA-only) (crates/incentive/src/bind_sig.rs:146), so Safe/smart-account clients can't use the off-chain binding path at all.

Action: when the client's address has code, call IERC1271.isValidSignature and compare against the magic value; keep ecrecover for EOAs.


Filed from the ADR→implementation gap analysis. ADR edits must be made in place with no historical/tombstone text (no "planned but cut" sentences) per repo ADR convention.

Activity

  1. added
    prio:medium
    rust
    on Jul 15, 2026
  2. altanoruc commented on Jul 17, 2026

    @altanoruc
    Contributor

    Triage note for a later automated run: the action is prescriptive (add an ERC-1271 isValidSignature branch for contract accounts, keep ecrecover for EOAs), but dispatch is blocked on one structural decision. verify_binding (crates/incentive/src/bind_sig.rs:146) is currently signature-length-gated and synchronous, whereas IERC1271.isValidSignature requires an on-chain call — so this needs a provider/chain handle plumbed in and likely an async surface. Specify where the provider comes from and whether verify_binding becomes async (or grows a separate async path), since that shapes the whole change and it is security-critical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

prio:mediumrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions