Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article covers ERC7715, a proposal for granting DApps execution permissions so that they can submit transactions on behalf of users.

This explanation translates, summarizes, and expands on the following specification.

I have also written about other EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.

Overview

ERC7715 defines a new JSON-RPC method called wallet_grantPermissions, which allows a decentralized application (DApp) to request specific permissions from a wallet.

JSON-RPC is a common remote procedure call mechanism through which DApps and wallets communicate. It is already widely used in Ethereum wallet integrations.

ERC7715 aims to standardize a mechanism that lets wallets authorize operations under specific conditions without requiring the user to sign each transaction personally.

This makes operations that were previously difficult to implement possible.

Two intended use cases

Executing transactions without an active wallet connection

With ERC7715, transactions can be executed within previously authorized limits even when the user does not have their wallet connected at all times.

This enables use cases such as the following.

Use case Description
Subscriptions Recurring payments can be executed without user interaction.
Recurring investments and automated investing Investments can be executed automatically according to predefined rules.
Limit orders Trades can execute automatically once price conditions are met.

Traditionally, transactions could not be submitted while the wallet was disconnected. ERC7715 addresses this restriction at a fundamental level.

Permission-scoped wallet connections

ERC7715 allows a wallet to grant a DApp limited permissions (scopes), such as a particular operation, a particular contract, or a specific period.

As a result, the DApp can execute transactions only within the granted scope. Compared with the conventional approach of granting full permissions at all times, this improves both security and usability.

Motivation

approve-flow.png https://eips.ethereum.org/EIPS/eip-7715#signer--permission-types

The conventional wallet approval flow

Many DApps currently operate as follows.

  1. The user performs an action in the DApp.
  2. The wallet displays a pop-up for each action.
  3. The user reviews the transaction and signs it.
  4. The transaction is submitted.

This approach is simple, but it has clear drawbacks.

User experience problems

Applications involving frequent interactions, particularly games and social DApps, require wallet approval for every action.

This leads to the following problems.

  • Frequent interruptions to the user's workflow.
  • User fatigue and a greater likelihood of abandonment.
Inability to act when the wallet is disconnected

With the current approach, transactions cannot be submitted unless the wallet is connected.

Consequently, functionality that is commonplace in Web2 cannot be implemented.

  • Scheduled execution
  • Conditional execution
  • Background processing

This restriction significantly limits DApp design.

Challenges in AA (Account Abstraction)

AA (Account Abstraction) is an approach in which account behavior can be defined flexibly through smart contracts rather than through an EOA (a conventional account controlled by a single private key).

Session keys are commonly used in the context of AA.

What is a session key?

A session key has the following characteristics.

  • Temporarily valid
  • Restricted to specific operations

Examples include the following.

  • Limited to game actions
  • Restricted to a particular contract
  • Configured with an expiration time
Vendor dependence

Session key implementations currently differ across wallets and services.

As a result, a DApp cannot request permissions through a uniform interface and must handle each wallet separately. This reduces the scalability of the ecosystem as a whole.

What ERC7715 aims to address

ERC7715 standardizes the following.

  • How permissions are requested
  • The interface through which wallets approve permissions

DApps can therefore request permissions without accounting for differences in wallet implementations. The intended result is that wallets can manage permissions securely and the user experience improves significantly.

As a result, DApps can offer an experience similar to Web2 while retaining Web3 security.

Specification

wallet_grantPermissions

ERC7715 defines the wallet_grantPermissions JSON-RPC method so that a DApp can request permission from a wallet to execute operations on behalf of the user within a specified scope.

Here, a permission authorizes an action, such as submitting a transaction, subject to limits on its duration or scope.

Permission schema

Type definitions

The params of wallet_grantPermissions is an array of PermissionRequest objects, allowing multiple chains or permissions to be requested together.

ts
type PermissionRequest = {
  chainId: Hex; // hex-encoding of uint256
  address?: Address;
  expiry: number; // unix timestamp
  signer: {
    type: string; // enum defined by ERCs
    data: Record<string, any>;
  };
  permissions: {
    type: string; // enum defined by ERCs
    data: Record<string, any>;
  }[];
}[];

The fields and related terminology are explained below.

Field meanings
Name Field Required Description
Chain ID chainId Yes Specifies the EIP155 chainId. The request applies to the specified chain, and subsequent addresses and other values are interpreted in that chain's context.
Target account address No The account to which the permission applies (the user's account). If a wallet is already connected and exposes multiple accounts, this field clarifies which account is authorizing the permission. If omitted, the user is expected to choose an account in the wallet.
Expiration time expiry Yes The Unix timestamp (in seconds) at which the session expires. Under ERC7715, the session must expire by this time.
Signer signer Yes Represents the entity that will execute actions under the permission. It may identify a key or account, or the wallet may handle session management itself.
List of permissions permissions Yes An array describing the actions that the signer may execute on behalf of the target account.

For more about EIP155, see the following article.

[EIP155] Preventing Replay Attacks Across Ethereum Networks

"Hex-encoding of uint256" means expressing a uint256 (an integer from 0 to 2^256-1) in hexadecimal with a 0x prefix. The specification uses chainId: Hex, but the example contains the numeric value 123. Implementations need to align on whether to send the requested hexadecimal encoding or match the format accepted by the wallet. The specification intends hexadecimal.

Example request

In ERC7715, an array of PermissionRequest objects is passed in the params of wallet_grantPermissions.

The example grants a specific account permission to transfer a native token (a currency such as ETH), subject to an allowance and an expiration time.

js
[
  {
    chainId: 123,
    address: '0x...',
    expiry: 1577840461,
    signer: {
      type: 'account',
      data: {
        address:'0x016562aA41A8697720ce0943F003141f5dEAe006',
      }
    },
    permissions: [
      {
        type: 'native-token-transfer',
        data: {
          allowance: '0x1DCD6500'
        }
      }
    ],
  }
]

The allowance generally represents a maximum amount, but ERC7715 leaves the exact semantics to the "Permissions" section. Here it is described only as a value in the permission's data that appears to represent a limit.

Response specification

Type definitions

The return value (result) is an array of PermissionResponse objects based on the request, with additional information.

ts
type PermissionResponse = PermissionRequest & {
  context: Hex;
  accountMeta?: {
    factory: `0x${string}`;
    factoryData: `0x${string}`;
  };
  signerMeta?: {
    // 7679 userOp building
    userOpBuilder?: `0x${string}`;
    // 7710 delegation
    delegationManager?: `0x${string}`;
  };
};
Why the response may differ from the request

ERC7715 explicitly states that the response includes all the parameters of the original request, but that the returned values are not guaranteed to match the requested values.

In other words, the DApp must treat the returned values, rather than the requested values, as authoritative. For example, the expiration time may be extended or shortened, or the allowance may be adjusted.

context

The context functions like an identifier for the granted permission or set of permissions. It allows the permission to be referenced when revoking it (using wallet_revokePermissions, discussed below) or submitting a userOp, and may contain data beyond identification information.

The context MAY also contain a context defined by ERC7679 or ERC7710.

For more about ERC7679, see the following article.

[ERC7679] Standardizing ERC4337 UserOperations

A userOp is a User Operation used in ERC4337. It is an execution request with a format distinct from a conventional transaction and is common in AA.

For more about ERC4337, see the following article.

[ERC4337] Implementing AA Without Protocol Changes

accountMeta

accountMeta is optional, but if present, both factory and factoryData are required and must be returned in the format specified by ERC4337. Either both fields are present or neither is.

The important requirements are as follows.

  • If the account has not yet been deployed, the wallet must return accountMeta.
  • In that case, the DApp MUST call the factory contract with factoryData as calldata to deploy the account.

The factory is the contract that creates the account, and factoryData is the data (calldata) required for the call. calldata is the input data passed when calling a contract.

signerMeta

signerMeta is additional information that may be required depending on the account type.

Expected signer.type signerMeta requirement Purpose
wallet Not required The wallet handles session management, so no additional metadata is required.
key or keys userOpBuilder required User operation construction information defined by ERC7679 is required.
account delegationManager required Information required for delegation management under ERC7710.

For more about ERC7679, see the following article.

[ERC7679] Standardizing ERC4337 UserOperations

For more about ERC7710, see the following article.

[ERC7710] Securely Delegating Permissions Through Smart Contracts

Delegation is the concept of allowing one account to authorize another entity to execute operations on its behalf.

Errors (invalid requests or rejection)

If the request is malformed or the wallet cannot or does not wish to grant permissions, it must return an error using a code defined by ERC1193.

For more about ERC1193, see the following article.

[ERC1193] Understanding the Ethereum Provider API

ERC1193 defines standard error formats for Ethereum providers, such as window.ethereum in browsers.

Example wallet_grantPermissions response

The response is a PermissionResponse array. The following differences stand out in the example.

  • expiry is moved to a later time than requested (1577840461 → 1577850000).
  • allowance is increased.
  • context is added.
js
[
  {
    // original request with modifications
    chainId: 123,
    address: '0x...',
    expiry: 1577850000,
    signer: {
      type: 'account',
      data: {
        address:'0x016562aA41A8697720ce0943F003141f5dEAe006',
      }
    },
    permissions: [
      {
        type: 'native-token-transfer',
        data: {
          allowance: '0x1DCD65000000'
        }
      },
    ],
    // response-specific fields
    context: "0x0x016562aA41A8697720ce0943F003141f5dEAe0060000771577157715"
  }
]

This example illustrates why a DApp should not assume that its request was granted exactly as submitted, but should use the expiry and allowance returned by the wallet.

wallet_revokePermissions

ERC7715 also defines a method called wallet_revokePermissions for revoking granted permissions. When the DApp calls this method, the wallet returns an empty response upon success.

Request specification

The params has the following format.

ts
type RevokePermissionsRequestParams = {
  permissionContext: "0x{string}";
};

permissionContext is used to pass the context returned in the wallet_grantPermissions response. In other words, context identifies which permission to revoke.

Response specification

On success, the result is empty.

ts
type RevokePermissionsResponseResult = {};

Because an empty response indicates success, DApp implementations commonly treat the absence of an error as successful revocation.

Overall flow

The following diagram illustrates the grant and revoke flow.

sequenceDiagram
  participant DApp
  participant Wallet
  participant Chain as Blockchain

  DApp->>Wallet: wallet_grantPermissions(params: PermissionRequest[])
  Wallet-->>DApp: PermissionResponse[] (context, returned values may differ)

  alt accountMeta returned (account not deployed)
    DApp->>Chain: Call factory(factoryData) to deploy account
  end

  Note over DApp,Wallet: DApp treats returned expiry and permissions as authoritative

  DApp->>Wallet: wallet_revokePermissions({permissionContext: context})
  Wallet-->>DApp: {} (empty response)

Signer and Permission types

ERC7715 defines several commonly expected signer and permission types so that a DApp can tell the wallet which entity may act (Signer) and what it may do (Permission).

The defined types are representative examples expected to be commonly used, not an exhaustive list. New types can emerge as wallets evolve. A type is valid if both the DApp and wallet support it.

However, problems arise if the same type name refers to different concepts. For example, a DApp might request type: "key" with one meaning, while the wallet approves type: "key" with a different meaning. To prevent this mismatch, signer and permission type names must be unique. New types should be specified as revisions to ERC7715 or in a separate ERC.

Signers

A Signer identifies the entity that will execute operations using the permission. ERC7715 defines four representative types.

Type definitions
ts
// A wallet is the signer for these permissions
// `data` is not necessary for this signer type as the wallet is both the signer and grantor of these permissions
type WalletSigner = {
  type: "wallet";
  data: {};
};

// The types of keys that are supported for the following `key` and `keys` signer types.
type KeyType = "secp256r1" | "secp256k1" | "ed25519" | "schnorr";

// A signer representing a single key.
// "Key" types are explicitly secp256r1 (p256) or secp256k1, and the public keys are hex-encoded.
type KeySigner = {
  type: "key";
  data: {
    type: KeyType;
    publicKey: `0x${string}`;
  };
};

// A signer representing a multisig signer.
// Each element of `publicKeys` are all explicitly the same `KeyType`, and the public keys are hex-encoded.
type MultiKeySigner = {
  type: "keys";
  data: {
    keys: {
      type: KeyType;
      publicKey: `0x${string}`;
    }[];
  };
};

// An account that can be granted with permissions as in ERC-7710.
type AccountSigner = {
  type: "account";
  data: {
    address: `0x${string}`;
  };
};
Signer type type Contents of data When to use it
Wallet as signer "wallet" {} (not required) The wallet manages both signing and permission grants. The DApp does not need to hold a key, and the session is wallet-managed.
Single key "key" type (key type) and publicKey A session is represented by a single key. The public key is hexadecimal with a 0x prefix.
Multiple keys (multisig-like) "keys" An array of public keys with the same KeyType Multiple keys represent the signer. Each array element must have the same key type.
Account "account" address (account address) Used when permissions are represented as delegation under ERC7710.

The terms appearing in KeyType have the following meanings.

Term Description
secp256k1 The elliptic curve key commonly used by Ethereum EOAs.
secp256r1 (p256) The p256 family, commonly encountered in WebAuthn and passkeys.
ed25519 A representative EdDSA scheme, also widely used in other chains and systems.
schnorr Refers to the Schnorr signature scheme; the curve and other details are not fixed here.

Permissions

A Permission defines what the session or signer may do on the user's behalf. ERC7715 defines representative types for transfers and limits on session resource consumption.

Type definitions
ts
// Native token transfer, e.g. ETH on Ethereum
type NativeTokenTransferPermission = {
  type: "native-token-transfer";
  data: {
    allowance: "0x..."; // hex value
  };
};

// ERC20 token transfer
type ERC20TokenTransferPermission = {
  type: "erc20-token-transfer";
  data: {
    address: "0x..."; // erc20 contract
    allowance: "0x..."; // hex value
  };
};

// ERC721 token transfer
type ERC721TokenTransferPermission = {
  type: "erc721-token-transfer";
  data: {
    address: "0x..."; // erc721 contract
    tokenIds: "0x..."[]; // hex value array
  };
};

// ERC1155 token transfer
type ERC1155TokenTransferPermission = {
  type: "erc1155-token-transfer";
  data: {
    address: "0x..."; // erc1155 contract
    allowances: {
      [tokenId: string]: "0x..."; // hex value
    };
  };
};

// The maximum gas limit spent in the session in total
type GasLimitPermission = {
  type: "gas-limit";
  data: {
    limit: "0x..."; // hex value
  };
};

// The number of calls the session can make in total
type CallLimitPermission = {
  type: "call-limit";
  data: {
    count: number;
  };
};

// The number of calls the session can make during each interval
type RateLimitPermission = {
  type: "rate-limit";
  data: {
    count: number; // the number of times during each interval
    interval: number; // in seconds
  };
};
Permission type type Authorized operation Meaning of data
Native token transfer "native-token-transfer" Transfer of a native currency such as Ethereum's ETH allowance is a hexadecimal maximum value.
ERC20 token transfer "erc20-token-transfer" Transfer of a specified ERC20 token address is the ERC20 contract, and allowance is the limit.
ERC721 token transfer "erc721-token-transfer" Transfer of specified ERC721 NFTs address is the ERC721 contract, and tokenIds is an array of authorized token IDs.
ERC1155 token transfer "erc1155-token-transfer" Transfer of specified ERC1155 tokens address is the ERC1155 contract, and allowances maps each token ID to its limit.
Gas limit "gas-limit" Limits the total gas that may be consumed over the session limit is a hexadecimal maximum value.
Call limit "call-limit" Limits the total number of calls permitted over the session count is the number of calls.
Rate limit "rate-limit" Limits the number of calls permitted per interval Up to count calls per interval (in seconds).

For more about ERC20, see the following article.

[ERC20] A Beginner's Guide to ERC20

For more about ERC721, see the following article.

[ERC721] A Beginner's Guide to ERC721

For more about ERC1155, see the following article.

[ERC1155] A Beginner's Guide to ERC1155

Wallet-managed sessions

When the Signer has type: "wallet", the wallet itself manages the session.

If the wallet approves the request, ERC7715 requires it to accept ERC5792 wallet_sendCalls with the permissions capability. The capability may also include permissionsContext.

wallet_sendCalls submits multiple calls together. Passing capabilities.permissions.context indicates that the calls should execute under the permissions of this session.

Example
js
[
  {
    version: "1.0",
    chainId: "0x01",
    from: "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    calls: [
      {
        to: "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
        value: "0x9184e72a",
        data: "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
      },
      {
        to: "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
        value: "0x182183",
        data: "0xfbadbaf01",
      },
    ],
    capabilities: {
      permissions: {
        context: "<permissionContext>",
      },
    },
  },
];
Expected wallet behavior

Upon receiving this request, the wallet must send the call in accordance with the requested permissions. It should not ask the user for additional transaction confirmation.

The permissionsContext is treated as a permission identifier of the same kind as the context returned by wallet_grantPermissions in the previous section.

The following diagram illustrates the flow.

sequenceDiagram
  participant DApp
  participant Wallet
  participant Chain as Blockchain

  DApp->>Wallet: wallet_grantPermissions(signer.type="wallet")
  Wallet-->>DApp: Return context / permissionsContext

  DApp->>Wallet: wallet_sendCalls (include capabilities.permissions.context)
  Wallet->>Chain: Send calls according to permissions (MUST)
  Note over Wallet: Do not request additional confirmation (SHOULD NOT)

Capabilities

If a wallet supports ERC5792, it is recommended that it respond to wallet_getCapabilities using the permissions key.

The wallet also SHOULD include supported signer and permission types in the response, enabling the DApp to determine the wallet's capabilities in advance.

Example wallet_getCapabilities
json
{
  "0x123": {
    "permissions": {
      "supported": true,
      "signerTypes": ["keys", "account"],
      "keyTypes": ["secp256k1", "secp256r1"],
      "permissionTypes": ["erc20-token-transfer", "erc721-token-transfer"]
    }
  }
}

For each chain (for example, "0x123"), the response indicates whether permissions is supported and which signerTypes, permissionTypes, and keyTypes are available.

Using CAIP-25

If the wallet uses CAIP25 authorization, it is recommended to include a permissions key in sessionProperties, along with additional keys listing supported types as comma-separated strings.

For more about CAIP25, see the following article.

[ACP25] AppError for Immediate Notification of Request Failures

CAIP25 can be understood as a framework for representing wallet session permissions and properties as metadata.

Here is an example.

json
{
  "sessionProperties": {
    "permissions": "true",
    "signerTypes": "keys,account",
    "permissionTypes": "erc20-token-transfer,erc721-token-transfer"
  }
}

Submitting transactions using a session

The following sections describe how to actually submit transactions after permissions have been granted. ERC7715 presents two main paths.

  • ERC7679 The path using a key or keys signer (constructing an ERC4337 userOp).
  • ERC7710 The path using an account signer (redeeming the delegation to execute an operation).

ERC7679

When signer.type is key or keys, the wallet_grantPermissions response is expected to include the following.

  • permissionsContext (the permission context, treated as serving the same role as the preceding context).
  • signerMeta.userOpBuilder (the contract address of the UserOp Builder).

The DApp uses these values to construct an ERC4337 userOp through the mechanism provided by ERC7679.

All methods of the ERC7679 UserOp Builder contract also accept bytes calldata context. This is described as equivalent to the permissionsContext returned by wallet_grantPermissions.

Example userOp signature format
js
const getSignature = async ({
  address,
  userOp,
  permissionsContext,
}: GetSignatureArgs) => {
  return readContract(config, {
    abi: BUILDER_CONTRACT_ABI,
    address: BUILDER_CONTRACT_ADDRESS,
    functionName: "getSignature",
    args: [address, userOp, permissionsContext],
  });
};

In this example, the permissionsContext is passed to getSignature on the Builder contract to create a signature associated with the session permissions.

erc7679-flow.png https://eips.ethereum.org/EIPS/eip-7715#signer--permission-types

flowchart LR
  A[DApp: wallet_grantPermissions] --> B[Wallet: return permissionsContext and userOpBuilder]
  B --> C[DApp: construct userOp]
  C --> D[DApp: pass context to userOpBuilder to create signature]
  D --> E[Submit UserOp under ERC-4337]

ERC-7710

When signer.type is account, the returned data can be redeemed using the ERC7710 interface.

The idea is straightforward: the recipient of the permission asks the user's account to issue and execute a particular message. Whether this involves a transfer or a userOp, the recipient can choose the payment or relay infrastructure.

Specifically, the following function is called on permissions.signerMeta.delegationManager.

  • redeemDelegation(bytes calldata _data, Action calldata _action)

Pass permissions.permissionsContext as _data. _action represents the operation to be executed by the user's account.

Action struct
js
struct Action {
    address to;
    uint256 value;
    bytes data;
}

to is the target of the call, value is the amount to transfer, and data is calldata.

Pseudocode example
js
// Alice requests a permission from Bob
const permissionsResponse = await bob.request({
  method: 'wallet_grantPermissions',
  params: [{
    address: bob.address,
    chainId: 123,
    signer: {
      type: 'account',
      data: {
        id: alice.address
      }
    },
    permissions: [
      {
        type: 'native-token-transfer',
        data: {
          allowance: '0x0DE0B6B3A7640000'
        },
      },
      {
        type: 'gas-limit';
        data: {
          limit: '0x0186A0',
        },
      },
    ],
    expiry: Math.floor(Date.now() / 1000) + 3600 // 1 hour from now
  }]
});

// Extract the permissionsContext and delegationManager
const permissionsContext = permissionsResponse.permissionsContext;
const delegationManager = permissionsResponse.signerMeta.delegationManager;

// Alice forms the action she wants Bob's account to take
const action = {
  to: alice.address,
  value: '0x06F05B59D3B20000'
  data: '0x'
};

// Alice sends the transaction by calling redeemDelegation on Bob's account
const tx = await bob.sendTransaction({
  to: delegationManager,
  data: bob.interface.encodeFunctionData('redeemDelegation', [
    permissionsContext,
    action
  ])
});

This example shows Alice receiving a permission from Bob and causing Bob's account to transfer funds to her (Alice). The permission includes native-token-transfer and gas-limit, and its expiry restricts it to one hour.

Note that the Signer type definition uses { address: ... } for data, while this example uses id. Implementations need to align the key name and the data they pass with the specification. The source uses inconsistent notation here.

The following diagram illustrates the flow.

sequenceDiagram
  participant Alice
  participant BobWallet as Bob's Wallet/Provider
  participant DelegationManager
  participant Chain as Blockchain

  Alice->>BobWallet: wallet_grantPermissions(signer.type="account")
  BobWallet-->>Alice: Return permissionsContext and signerMeta.delegationManager

  Alice->>DelegationManager: redeemDelegation(permissionsContext, Action)
  DelegationManager->>Chain: Bob's account executes Action

Additional considerations

ERC7715 aims to overcome the limitations of the conventional transaction flow: propose a transaction, approve it, then submit it. Although intuitive at first glance, this flow heavily constrains both DApp design and the user experience.

A major restriction is that transactions cannot be submitted when the user is offline. If the wallet is disconnected and the user is not present, the DApp cannot submit transactions on the user's behalf. This prevents scheduled execution such as subscriptions and conditional execution such as automated trading.

Another limitation is the need for user approval of every operation. In DApps involving many actions, such as games, frequent wallet pop-ups and approvals interrupt the experience. Interactions that ought to be smooth turn into a continuous sequence of signing requests.

ERC7715 lets DApps request permissions from wallets and execute operations on the user's behalf within the granted scope. This addresses both the requirement for the user to be online and the requirement for approval of each operation.

permissionsContext

ERC7715 standardizes interactions between the DApp and the wallet, but does not specify how the wallet enforces permissions. Different wallets may implement permissions differently.

This presents a problem for DApps. A DApp needs to construct a transaction or userOp that reflects the permissions granted by the wallet. If the enforcement mechanism differs across wallets, the DApp needs information from the wallet to construct that request.

For this purpose, ERC7715 provides permissionsContext.

Properties of permissionsContext

permissionsContext is an opaque string whose contents a DApp may not be able to interpret. The DApp should therefore generally pass the value provided by the wallet to subsequent calls without assuming its meaning.

This opacity matters because the wallet can encode information appropriate to its permission mechanism. ERC7715 identifies three particular uses.

Three intended uses
Intended scheme Where the DApp uses permissionsContext Purpose
Using ERC7679 The context argument when interacting with a UserOp Builder Embeds the identity of this permission session when constructing a userOp.
Using ERC7710 The _data argument of the delegation manager Passed unchanged as data for redeeming a delegation through methods such as redeemDelegation.
Using in-app sessions The session identifier in ERC5792 wallet_sendCalls Identifies which session permissions should govern execution of wallet_sendCalls.

In-app sessions refer to a pattern in which the DApp maintains its own notion of a session and simply tells the wallet which session to use for submission.

The following diagram illustrates the flow of permissionsContext.

flowchart TB
  A[DApp: wallet_grantPermissions] --> B[Wallet: return permissionsContext]

  B --> C1[ERC-7679: pass as UserOp Builder context]
  B --> C2[ERC-7710: pass as delegationManager _data]
  B --> C3[ERC-5792: pass as wallet_sendCalls session identifier]

Non-exhaustive list of Signer and Permission types

ERC7715 does not exhaustively define signer and permission types because new types are expected to emerge as wallet technology evolves. Future use cases will require new permissions and signing entities, making an open list more practical than a closed one.

The DApp and wallet must both support a type for it to work. A type recognized by only one side cannot be used.

Avoiding name collisions

The proposal also describes considering a requirement for UUIDs to avoid collisions between type names. UUIDs would make duplicate type names less likely.

However, ERC7715 ultimately chose a simpler approach. The type of a signer or permission must be defined in an ERC. Publishing types as ERCs makes name collisions easier to avoid and gives implementers a common reference.

Compatibility

A wallet that does not support ERC7715 is recommended to return an error when wallet_grantPermissions is called.

A practical DApp implementation can therefore attempt wallet_grantPermissions and fall back to the conventional flow (signing each transaction) if an error is returned.

The expectation is that unsupported requests should fail explicitly rather than be silently ignored. This makes it easier for the DApp to detect a lack of support.

Security

Because ERC7715 enables execution on behalf of users, an improper design may grant excessively powerful and dangerous permissions.

Restricting permission scope

DApps should request only the permissions they need and set a reasonable expiration time. The aim is to avoid long-lived permissions that allow unrestricted operations.

Wallets must also enforce permissions correctly. Ultimately, users must trust their wallet implementation, and permission enforcement is treated as part of that implementation.

The boundary of responsibility is clear: even if a DApp intends to restrict its permissions, those restrictions are ineffective if the wallet enforces them incorrectly. Conversely, correct wallet enforcement makes operations beyond the DApp's requested scope less likely.

The principles of permission scoping can be summarized as follows.

Party Expected behavior
DApp Requests the minimum necessary permission and chooses an expiry that is neither too short nor too long.
Wallet Correctly enforces the authorized scope. Permission enforcement is a direct measure of wallet quality.
Phishing attacks

A malicious DApp may impersonate a legitimate application and induce a user to grant broad permissions. This can be more serious than tricking the user into signing a single transaction, because broad permissions can be exploited repeatedly within their scope once granted.

ERC7715 therefore requires wallets to clearly display the requested permissions to users and warn them about dangerous permissions.

A clear display can reasonably be understood to include at least the following information.

  • Which operations are permitted (for example, transfers, transfers of specified tokens, or limits on the number of calls).
  • The scope (allowances, target contracts, and target token IDs).
  • How long the permissions remain valid (expiry).

References

Luka Isailovic (@lukaisailovic), Derek Rein (@arein), Dan Finlay (@danfinlay), Derek Chiang (@derekchiang), Fil Makarov (@filmakarov), Pedro Gomes (@pedrouid), Conner Swenberg (@ilikesymmetry), Lukas Rosario (@lukasrosario), "ERC-7715: Grant Permissions from Wallets [DRAFT]," Ethereum Improvement Proposals, no. 7715, May 2024. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7715.

Conclusion

This article covered ERC7715, which proposes a mechanism for wallets to grant DApps execution permissions and allow them to submit transactions on behalf of users. I hope it helped clarify how the mechanism works.

If you have questions, feel free to reach out via Twitter DM.

Twitter @cardene777

I also publish on the following platforms.