Skip to content

Broken POLA: EIP-191 and EIP-712 message is different #260

@nksazonov

Description

@nksazonov

The forthcoming "Add support of EIP-191, EIP-712 ... message formats" improvement to Custody contract introduces an inconsistency that breaks the "principle of least astonishment".

Both EIP-191 and EIP-712 are defined via message being signed. In the implementation this message is a state hash for EIP-191, and a channel Id and some state fields for EIP-712. The latter is a characteristics of that EIP, which improves clarify for users in regards to the information they are signing.

For a developer unfamiliar with the codebase this can be confusing. Moreover, for contributors this can create an overhead complexity of remembering "why is so". Therefore, it is suggested to remove this conflict by using the same message in the EIP-191 context as in EIP-712.
To implement this, changes to all components are required:

  • in Smart Contract the Utils.sol need to support this
  • in FE and BE signing parties need to pass different values

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions