---
eip: 7806
label: ERC-7806
title: Minimal intent-centric EOA smart account
status: Draft
type: Standards Track
category: ERC
created: 2024-11-02
requires: 7702
official: https://eips.ethereum.org/EIPS/eip-7806
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7806.md
canonical: https://eips.huatuo.xyz/ko/eip-7806/
lang: ko
tldr: "EIP-7702로 코드를 위임하는 EOA를 위한 최소한의 스마트 계정 인터페이스. 소유자가 패킹된 인텐트에 서명하면 누구든 솔버나 릴레이어가 제출하고, 교체 가능한 \"standard\" 컨트랙트가 이를 검증하고 호출들로 풀어낸다."
tags: [account-abstraction, intents, eip-7702, eoa, gas-sponsorship, draft]
---

# ERC-7806: Minimal intent-centric EOA smart account

> Extensible intent-centric EOA smart account interface design to support batch execution, gas sponsorship and more other functionalities.

**TL;DR:** EIP-7702로 코드를 위임하는 EOA를 위한 최소한의 스마트 계정 인터페이스. 소유자가 패킹된 인텐트에 서명하면 누구든 솔버나 릴레이어가 제출하고, 교체 가능한 "standard" 컨트랙트가 이를 검증하고 호출들로 풀어낸다.

## 어떤 문제를 해결하나요?

계정 추상화는 일괄 처리, 가스 대납, 유연한 접근 제어를 가져옵니다. [ERC-4337](/eip-4337/)이 이를 제공하지만 구성 요소가 많고(계정, EntryPoint, paymaster, bundler, [ERC-6900](/eip-6900/)과 [ERC-7579](/eip-7579/) 같은 플러그인 표준), `UserOperation`당 가스가 비교적 높으며, 업그레이드에 조율이 필요하고, 실제로는 paymaster와 bundler에 의존하게 됩니다.

[EIP-7702](/eip-7702/)는 일반 EOA가 컨트랙트 코드를 가리키게 해 줍니다. ERC-7806은 이를 이용해 [ERC-7521](/eip-7521/)의 정신에 따라 EOA에 의도적으로 작은 **인텐트 중심** 스마트 계정 인터페이스를 줍니다. 사용자는 *무엇이 일어나야 하는지*에 서명하고, 솔버/릴레이어의 열린 시장이 이를 실행합니다. 이들은 ETH로 가스를 내고 계정에서 토큰으로 상환받을 수도 있습니다.

## 어떻게 동작하나요?

**UserIntent.** 다섯 개의 논리적 부분으로 이루어진 패킹된 `bytes` 덩어리입니다.

| 필드 | 의미 |
| --- | --- |
| `sender` | 인텐트의 대상이 되는 EOA |
| `standard` | 이 인텐트를 읽는 방법을 아는 `IStandard` 컨트랙트의 주소 |
| `header` | nonce나 만료 시각 같은 메타데이터로, standard가 해석 |
| `instructions` | 무엇을 할지. 예: `(to, value, calldata)` 항목이나 토큰 지출 한도 |
| `signatures` | standard가 검사하는 서명(반드시 모두 소유자의 것은 아님) |

권장 인코딩은 `sender (20) ‖ standard (20) ‖ three uint16 lengths ‖ header ‖ instructions ‖ signatures ‖ extra`이지만, 각 standard가 자체적으로 정의할 수도 있습니다.

**두 가지 인터페이스.**

- `IStandard.validateUserIntent(bytes) → bytes4`와 `IStandard.unpackOperations(bytes) → (bytes4, bytes[])`. standard가 검증 규칙을 가집니다. 간소화된 EntryPoint 같은 것입니다.
- `IAccount.executeUserIntent(bytes) → bytes`. EOA가 위임한 코드가 구현합니다. standard에게 검증과 풀어내기를 요청한 뒤 EOA로서 operation을 실행하므로, 하위 호출에서의 `msg.sender`는 EOA 자신이 됩니다.

**가스 추상화.** 누구든 트랜잭션을 제출할 수 있습니다. 인텐트는 계정에게 제출자(`tx.origin`)에게 어떤 토큰으로든 지급하라고 지시할 수 있으므로, 사용자는 가스를 위해 ETH를 가질 필요가 없습니다. 솔버는 여러 인텐트를 하나의 트랜잭션에 묶을 수도 있습니다.

재전송 방지는 전역적이지 **않습니다**. 어떤 인텐트는 반복 실행되도록 의도되었기 때문에 각 standard가 결정합니다(일회성 해시, nonce, 만료).

## 샘플 코드

단일 standard만 신뢰하는 최소한의 무상태 계정(Solidity, 설명용):

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IStandard {
    function validateUserIntent(bytes calldata intent) external view returns (bytes4);
    function unpackOperations(bytes calldata intent) external view returns (bytes4, bytes[] memory);
}

contract MinimalIntentAccount {
    bytes4 constant APPROVED = 0x00000001;
    IStandard public immutable standard; // code is shared; no per-EOA storage

    constructor(IStandard s) { standard = s; }

    function executeUserIntent(bytes calldata intent) external returns (bytes memory) {
        require(address(bytes20(intent[0:20])) == address(this), "wrong sender");
        require(address(bytes20(intent[20:40])) == address(standard), "unknown standard");

        (bytes4 code, bytes[] memory ops) = standard.unpackOperations(intent);
        require(code == APPROVED, "rejected");

        for (uint256 i; i < ops.length; ++i) {
            (address to, uint256 value, bytes memory data) = abi.decode(ops[i], (address, uint256, bytes));
            (bool ok, ) = to.call{value: value}(data);
            require(ok, "op failed");
        }
        return "";
    }
}
```

## 알아둘 점

- **상태: Draft.** 본문의 일부는 미완성입니다(예를 들어 권장되는 재진입 방어 목록이 비어 있습니다).
- 보안은 선택한 `IStandard`와 `IAccount` 코드에 달려 있습니다. 둘 다 공개되고 감사를 받아야 하며, EOA 소유자는 신뢰할 수 있는 구현에만 위임해야 합니다.
- 무상태 계정 코드를 강력히 권장합니다. 위임된 EOA는 가리키는 코드가 무엇이든 그 사이에서 스토리지를 공유하므로, 저장된 상태가 충돌하거나 악용될 수 있기 때문입니다.
- 명세의 레퍼런스 구현은 설명용입니다. 그대로 배포하지 말고 신중하게 검토하세요.
- EOA의 개인 키는 여전히 완전한 제어권을 가집니다. 위임을 해제하면 모든 스마트 계정 동작이 비활성화됩니다.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-7806
