---
eip: 1996
label: ERC-1996
title: Holdable Token
status: Stagnant
type: Standards Track
category: ERC
created: 2019-04-10
requires: 20
official: https://eips.ethereum.org/EIPS/eip-1996
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-1996.md
canonical: https://eips.huatuo.xyz/ko/eip-1996/
lang: ko
tldr: 수취인을 위해 토큰을 보류(hold)할 수 있는 ERC-20 확장. 공증인(notary)이 실행할지 해제할지 결정하며, 카드 사전 승인처럼 미래의 결제를 보장한다.
tags: [token, erc20, escrow, hold, payments]
---

# ERC-1996: Holdable Token

> An extension to the ERC-20 standard token that allows tokens to be put on hold. This guarantees a future transfer and makes the held tokens unavailable for transfer in the mean time. Holds are similar to escrows in that are firm and lead to final settlement.

**TL;DR:** 수취인을 위해 토큰을 보류(hold)할 수 있는 ERC-20 확장. 공증인(notary)이 실행할지 해제할지 결정하며, 카드 사전 승인처럼 미래의 결제를 보장한다.

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

ERC-20의 `approve`는 다른 사람이 나중에 내 토큰을 옮길 수 있게 해주지만, 토큰을 *예약*하지는 않습니다. 승인한 잔액을 내가 먼저 써버릴 수도 있으므로 결제가 보장되지 않습니다.

실제 결제 흐름의 상당수는 먼저 보장이 필요합니다.

- 호텔은 체크인 때 금액을 사전 승인하고, 체크아웃 때 실제 청구 금액을 결제합니다.
- 규제 대상 토큰은 정산 전에 전송을 검사하면서도, 이후에 자금이 그대로 남아 있도록 해야 합니다.

ERC-1996은 **홀드(hold)**를 추가합니다. 지급자의 사용 가능 잔액에서 일정 금액을 잠가 수취인용으로 확보해 두었다가, 나중에 전송하거나 돌려줍니다.

## 어떻게 동작하나요?

홀드에는 지급자, 수취인, 최대 금액, **공증인(notary)**, 만료 시각이 있습니다. 각 홀드는 호출자가 고른 `operationId` 문자열로 식별되며, 재사용할 수 없습니다.

- **생성**: 지급자가 `hold(...)`를 호출하거나, 지급자가 `authorizeHoldOperator`로 승인한 **오퍼레이터**가 `holdFrom(...)`을 호출합니다. 해당 금액은 즉시 전송할 수 없게 됩니다.
- **실행**: `executeHold(operationId, value)`는 공증인만 호출할 수 있습니다. `value`(홀드 금액 이하)를 수취인에게 전송하고, 나머지는 지급자에게 해제됩니다. 호텔의 "실제 청구 금액 결제"에 해당합니다.
- **해제**: 만료 전에는 공증인이나 수취인이 해제할 수 있고, 만료 후에는 누구나 해제할 수 있습니다. 전송은 일어나지 않습니다.
- **갱신**: 지급자나 오퍼레이터는 아직 만료되지 않은 홀드를 연장할 수 있습니다.
- **영구 홀드**: `timeToExpiration`이 0이면 만료가 없으며, 이 경우 공증인만 실행할 수 있고 공증인이나 수취인만 해제할 수 있습니다.

`balanceOf`, `transfer`, `transferFrom`은 홀드된 토큰을 제외해야 합니다. `balanceOnHold`, `totalSupplyOnHold`, `retrieveHoldData`로 홀드 상태를 확인할 수 있고, 각 단계에서 이벤트(`HoldCreated`, `HoldExecuted`, `HoldReleased`, `HoldRenewed`)가 발생합니다.

## 샘플 코드

인터페이스 일부와 판매자 흐름:

```solidity
interface IHoldable /* is IERC20 */ {
    enum HoldStatusCode { Nonexistent, Ordered, Executed, ReleasedByNotary, ReleasedByPayee, ReleasedOnExpiration }

    function hold(string calldata operationId, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);
    function holdFrom(string calldata operationId, address from, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);
    function executeHold(string calldata operationId, uint256 value) external returns (bool);
    function releaseHold(string calldata operationId) external returns (bool);
    function balanceOnHold(address account) external view returns (uint256);
    function authorizeHoldOperator(address operator) external returns (bool);
}
```

```ts
// ethers v6: guest pre-authorizes 300 tokens for 3 days; hotel is payee and notary
await token.connect(guest).hold("booking-8812", hotel, hotel, parseUnits("300", 18), 3 * 24 * 3600);

// at check-out the hotel charges only 240; 60 becomes spendable again for the guest
await token.connect(hotel).executeHold("booking-8812", parseUnits("240", 18));
```

## 알아둘 점

- **상태: Stagnant.** 관련 표준 계열의 기반으로 제안되었습니다. [Clearable](/eip-2018/), [Fundable](/eip-2019/), [E-Money](/eip-2020/), [Payoutable](/eip-2021/) 토큰이며, 모두 Stagnant입니다.
- 수취인이 대금을 받을지는 공증인이 전적으로 좌우합니다. 신중하게 고르세요. 수취인 본인, 독립된 제3자, 컨트랙트 모두 가능합니다.
- 명세 본문에는 작은 불일치가 있습니다. `holdFrom`은 `approveToHold` 함수를 언급하지만 인터페이스에서는 `authorizeHoldOperator`라는 이름이며, `netBalanceOf`는 `balanceOf`에 `balanceOnHold`를 더한 값(즉, 홀드된 토큰을 포함한 총액)으로 설명되어 있습니다. 구현하기 전에 확인하세요.
- `string` 타입 operation ID는 유연하지만 `bytes32` 키보다 가스가 더 듭니다.


---

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