EIP-5639: Delegation Registry

This is the discussion thread for EIP 5639: Delegation Registry, which allows for d elegation of permissions for safer and more convenient signing operations.

EIP found here:

3 Likes

I really appreciate the thoughtfulness and work thatā€™s gone into the deployed protocol and the EIP - Iā€™ve been playing around with the project the past few days to see what it would be like to compose into a project Iā€™m working on.

Iā€™d encourage supporting EIP-2771 meta-transactions so that users can create or revoke delegations gas free.

My Context

Iā€™m building in the gaming space. Weā€™re using a project from Audius named Hedgehog to offer users a persistent burner wallet.

Users can then delegate permission from a primary EOA to the burner wallet so that burner address can ā€œuseā€ the primary EOA NFTs in games. The burner wallet uses private keys in browser to sign messages for our meta-transaction stack, so users can take game moves without any wallet popup.

We currently use our own very simple delegation protocol - delegations are stored on chain so that our protocol can verify delegation.

I see a lot of value in composing a global registry for this delegation, and kept our version very simple in the hopes something like this would come along. Iā€™ve updated our protocol to use the same interface - should that be standardized through this EIP, weā€™d be able to easily swap out spec-compliant registry providers, but again see so much value in composing the global registry.

Meta-Transaction Support

A blocker for us using delegate.cash or another protocol based on this EIP is that there is not support for meta-transactions when creating or revoking delegation. A delegation transaction would be the only transaction in our entire experience that requires a user to pay for gas. We are building cross-chain tooling, so will be doing delegations on L2s where gas tokens may be frustrating to acquire.

I think the delegate.cash team is mixing the concepts of off-chain registry and meta-transaction support? Iā€™m not suggesting off-chain storage of delegations, and believe that adding this support helps possible adoption without sacrificing anything and with minimal overhead.

Example

I spiked out what this would look like and addressed some of the signature pushback from the project README in a pull request on my fork - Adds meta-transaction support to DelegationRegistry by sbauch Ā· Pull Request #1 Ā· 0xEssential/delegation-registry-meta-tx Ā· GitHub

Perhaps this is a moot point given delegate.cash having been deployed already, and Iā€™m not sure it makes a ton of sense for an EIP to specify supporting meta-transactions. But it just feels like something that is 99% what we need off the shelf, and would hate to roll our own for that 1%, so figured a conversation couldnā€™t hurt - apologies if this isnā€™t the right place for it.

1 Like

Is there any reason why the addresses for delegation events are not indexed to ease searching of logs?

i.e.

    /// @notice Emitted when a user delegates their entire wallet
    event DelegateForAll(address vault, address delegate, bool value);

    /// @notice Emitted when a user delegates a specific contract
    event DelegateForContract(address vault, address delegate, address contract_, bool value);

    /// @notice Emitted when a user delegates a specific token
    event DelegateForToken(address vault, address delegate, address contract_, uint256 tokenId, bool value);

    /// @notice Emitted when a user revokes all delegations
    event RevokeAllDelegates(address vault);

    /// @notice Emitted when a user revoes all delegations for a given delegate
    event RevokeDelegate(address vault, address delegate);

Should be

    /// @notice Emitted when a user delegates their entire wallet
    event DelegateForAll(address indexed vault, address indexed delegate, bool value);

    /// @notice Emitted when a user delegates a specific contract
    event DelegateForContract(address indexed vault, address indexed delegate, address indexed contract_, bool value);

    /// @notice Emitted when a user delegates a specific token
    event DelegateForToken(address indexed vault, address indexed delegate, address indexed contract_, uint256 tokenId, bool value);

    /// @notice Emitted when a user revokes all delegations
    event RevokeAllDelegates(address indexed vault);

    /// @notice Emitted when a user revoes all delegations for a given delegate
    event RevokeDelegate(address indexed vault, address indexed delegate);
2 Likes