[WIP] [Grant Proposal] Secure and User-Friendly EIP712Macro Relay Network

Per Superfluid tokenomics, Superfluid Community has 30% SUP distributing to the DAO members through SUP campaigns, 5% SUP reserved for grants.

Abstract

This grant proposal specifies a system that combines Superfluid macro, its EIP-712 variant, and signature relaying network to enhance the signing security for Superfluid applications.

How users will see this feature in a few sentences:

  1. Zero-user-transaction: User only signs signatures, never signs transactions.
  2. WYSIWYA: Signature contains readable information, with internationalization support: What You See is What You Agree
  3. Trustless Signature has security context, so that the trust assumption to the signature relaying network is LOW or NONE
  4. Incentivized Incentives are included so that denial of service from the relaying network is minimized, too.

Motivation

Let’s face it: Ethereum’s signing culture starts from a far from ideal place: signing a blob of hex data with mostly unidentifiable addresses is NOT A SECURE PRACTICE. The recent ByBit catastrophe is further evidence that this is an endemic of signing malpractices.

Making Ethereum community-wide changes is not easy, but Superfluid is not shy about inventing its own method before everyone else. Notably, the Superfluid macro system has an EIP-712 variant that I believe is instrumental to the ideal solution to the high signing security.

Rationale

Superfluid protocol is a feature-rich protocol, its transaction signature is hard to parse for signing confidently. This is not an unique problem to Superfluid, but Superfluid macro can provide a good tool for enhance signing security.

Specification

(TODO.)

Relevant topics:

  • Superfluid macro,
  • EIP-712,
  • Secure relying with ENS reverse registrar integration,
  • ENS reverse registrar in wallets.

Timeline

  • Complete specification: March.
  • Call for takers: April.
  • Applying for grants: After SUP transferability vote pass.
8 Likes

Always in favor of proposals that enhance security. Improving signing practices is a crucial step for both user experience and overall trust in the ecosystem. Looking forward to seeing how this develops.

5 Likes

It makes sense! EIP712 makes signing transactions safer, improves phishing risks, and keeps things simple by handling gas fees. It seems like a solid and simple step to grow securely right now. Thanks for proposing it.

5 Likes

Superfluid Macro Registry on Base

SuperfluidMacroRegistry8453 prototype

// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.20;

import "@ensdomains/ens-contracts/contracts/utils/NameEncoder.sol";

// FQN: {macroName}.{rootName}
interface ISuperfluidMacroRegistry {
    function registerMacro(address macroAddress, string calldata rootName, string calldata macroName) external;
    function authenticateMacro(address macroAddress, string calldata rootName, string calldata macroName) external view returns (bool);
}


/**
 * Interface for the legacy (ETH-only) addr function.
 */
interface IAddrResolver {
    event AddrChanged(bytes32 indexed node, address a);

    /**
     * Returns the address associated with an ENS node.
     * @param node The ENS node to query.
     * @return The associated address.
     */
    function addr(bytes32 node) external view returns (address payable);
}

interface IENS {
    function resolver(bytes32 node) external view returns (address);

    // ...
}

// @dev For Base L2 (8453)
contract SuperfluidMacroRegistry8453 is ISuperfluidMacroRegistry {
    IENS public registry = IENS(0xB94704422c2a1E396835A571837Aa5AE53285a95);
    mapping (string baseName => mapping (string macroName => address)) private _macroAddresses;

    function registerMacro(address macroAddress, string calldata baseName, string calldata macroName) override external {
        (, bytes32 nameNode) = NameEncoder.dnsEncodeName(baseName);
        require( IAddrResolver(registry.resolver(nameNode)).addr(nameNode)  == msg.sender
               , "Not the owner of the baseName");
        _macroAddresses[baseName][macroName] = macroAddress;
    }

    function authenticateMacro(address macroAddress, string calldata baseName, string calldata macroName) override external view returns (bool) {
        return _macroAddresses[baseName][macroName] == macroAddress;
    }

}
5 Likes