{"eip":1996,"title":"Holdable Token","description":"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.","authors":["Julio Faura \u003cjulio@adhara.io\u003e","Fernando Paris \u003cfer@io.builders\u003e","Daniel Lehrner \u003cdaniel@io.builders\u003e"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2019-04-10","requires":[20],"discussionsTo":"https://github.com/ethereum/EIPs/issues/2103","repo":"ERCs","label":"ERC-1996","officialUrl":"https://eips.ethereum.org/EIPS/eip-1996","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-1996.md","url":"https://eips.huatuo.xyz/eip-1996/","tldr":{"en":"An ERC-20 extension that lets tokens be put on hold for a payee, with a notary deciding whether to execute or release, guaranteeing a future payment like a card pre-authorization.","ja":"受取人のためにトークンを保留（ホールド）できる ERC-20 拡張。公証人（notary）が実行か解放かを決め、カードのオーソリのように将来の支払いを保証する。","ko":"수취인을 위해 토큰을 보류(hold)할 수 있는 ERC-20 확장. 공증인(notary)이 실행할지 해제할지 결정하며, 카드 사전 승인처럼 미래의 결제를 보장한다.","zh":"一个 ERC-20 扩展，允许为收款方冻结（hold）代币，由公证人（notary）决定执行还是释放，像银行卡预授权一样保证未来的付款。"},"tags":["token","erc20","escrow","hold","payments"],"explainers":{"en":{"lang":"en","tldr":"An ERC-20 extension that lets tokens be put on hold for a payee, with a notary deciding whether to execute or release, guaranteeing a future payment like a card pre-authorization.","tags":["token","erc20","escrow","hold","payments"],"related":[20,2018,2019,2020,2021],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-1996/","markdown":"## What problem does it solve?\n\nERC-20's `approve` lets someone else move your tokens later, but it does not *reserve* them. You can still spend the approved balance, so the payment is not guaranteed.\n\nMany real payment flows need a guarantee first:\n\n- A hotel pre-authorizes an amount at check-in and charges the actual bill at check-out.\n- A regulated token must check a transfer before it settles, while making sure the funds are still there afterwards.\n\nERC-1996 adds **holds**: an amount is locked from the payer's spendable balance, earmarked for a payee, and later either transferred or returned.\n\n## How it works\n\nA hold has a payer, a payee, a maximum amount, a **notary** and an expiry. Each hold is identified by a caller-chosen `operationId` string, which must not be reused.\n\n- **Create**: `hold(...)` by the payer, or `holdFrom(...)` by an **operator** the payer has authorized with `authorizeHoldOperator`. The amount stops being transferable immediately.\n- **Execute**: only the notary can call `executeHold(operationId, value)`. It transfers `value` (at most the held amount) to the payee; any remainder is released back to the payer. This is the hotel's \"charge the actual bill\".\n- **Release**: before expiry, the notary or the payee can release; after expiry, anyone can. Nothing is transferred.\n- **Renew**: the payer or operator can extend a hold that has not yet expired.\n- **Perpetual holds**: a `timeToExpiration` of 0 means no expiry, so only the notary can execute, and only the notary or payee can release.\n\n`balanceOf`, `transfer` and `transferFrom` must exclude held tokens. `balanceOnHold`, `totalSupplyOnHold` and `retrieveHoldData` expose the held state, and each step emits an event (`HoldCreated`, `HoldExecuted`, `HoldReleased`, `HoldRenewed`).\n\n## Sample code\n\nPart of the interface, and a merchant flow:\n\n```solidity\ninterface IHoldable /* is IERC20 */ {\n    enum HoldStatusCode { Nonexistent, Ordered, Executed, ReleasedByNotary, ReleasedByPayee, ReleasedOnExpiration }\n\n    function hold(string calldata operationId, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\n    function holdFrom(string calldata operationId, address from, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\n    function executeHold(string calldata operationId, uint256 value) external returns (bool);\n    function releaseHold(string calldata operationId) external returns (bool);\n    function balanceOnHold(address account) external view returns (uint256);\n    function authorizeHoldOperator(address operator) external returns (bool);\n}\n```\n\n```ts\n// ethers v6: guest pre-authorizes 300 tokens for 3 days; hotel is payee and notary\nawait token.connect(guest).hold(\"booking-8812\", hotel, hotel, parseUnits(\"300\", 18), 3 * 24 * 3600);\n\n// at check-out the hotel charges only 240; 60 becomes spendable again for the guest\nawait token.connect(hotel).executeHold(\"booking-8812\", parseUnits(\"240\", 18));\n```\n\n## Things to know\n\n- **Status: Stagnant.** It was proposed as the base of a family of related standards: [Clearable](/eip-2018/), [Fundable](/eip-2019/), [E-Money](/eip-2020/) and [Payoutable](/eip-2021/) tokens, all also stagnant.\n- The notary has full control over whether the payee gets paid. Choose it with care; it can be the payee, an independent party or a contract.\n- The spec text has small inconsistencies: `holdFrom` refers to an `approveToHold` function, while the interface names it `authorizeHoldOperator`, and `netBalanceOf` is described as `balanceOf` plus `balanceOnHold` (that is, the total including held tokens). Clarify these before building.\n- Using `string` operation IDs is flexible but costs more gas than a `bytes32` key.\n"},"ja":{"lang":"ja","tldr":"受取人のためにトークンを保留（ホールド）できる ERC-20 拡張。公証人（notary）が実行か解放かを決め、カードのオーソリのように将来の支払いを保証する。","tags":["token","erc20","escrow","hold","payments"],"related":[20,2018,2019,2020,2021],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-1996/","markdown":"## 何を解決するのか\n\nERC-20 の `approve` は、他の誰かが後からあなたのトークンを動かせるようにしますが、トークンを*確保*はしません。承認した残高を自分で使い切ることもできるため、支払いは保証されません。\n\n実際の決済フローの多くは、先に保証が必要です。\n\n- ホテルはチェックイン時に金額をオーソリ（与信確保）し、チェックアウト時に実際の請求額を課金します。\n- 規制対象のトークンは、決済前に送金を検査しつつ、その後も資金が残っていることを確かめなければなりません。\n\nERC-1996 は **ホールド**を追加します。支払人が使える残高から一定額をロックして受取人向けに確保し、後でその額を送金するか、返却します。\n\n## 仕組み\n\nホールドには、支払人、受取人、上限額、**公証人（notary）**、有効期限があります。各ホールドは呼び出し側が選ぶ `operationId` 文字列で識別され、再利用はできません。\n\n- **作成**: 支払人が `hold(...)` を、または支払人が `authorizeHoldOperator` で承認した**オペレーター**が `holdFrom(...)` を呼びます。その額は直ちに送金不可になります。\n- **実行**: `executeHold(operationId, value)` を呼べるのは公証人だけです。`value`（ホールド額以下）を受取人へ送金し、残りは支払人へ解放します。これがホテルの「実際の請求額の課金」にあたります。\n- **解放**: 期限前は公証人または受取人が解放でき、期限後は誰でも解放できます。送金は行われません。\n- **更新**: 支払人またはオペレーターは、まだ期限が切れていないホールドの期限を延長できます。\n- **無期限ホールド**: `timeToExpiration` を 0 にすると期限なしとなり、実行できるのは公証人だけ、解放できるのは公証人か受取人だけです。\n\n`balanceOf`、`transfer`、`transferFrom` はホールド中のトークンを除外しなければなりません。`balanceOnHold`、`totalSupplyOnHold`、`retrieveHoldData` でホールドの状態を参照でき、各ステップでイベント（`HoldCreated`、`HoldExecuted`、`HoldReleased`、`HoldRenewed`）が発行されます。\n\n## サンプルコード\n\nインターフェースの一部と、事業者側のフロー:\n\n```solidity\ninterface IHoldable /* is IERC20 */ {\n    enum HoldStatusCode { Nonexistent, Ordered, Executed, ReleasedByNotary, ReleasedByPayee, ReleasedOnExpiration }\n\n    function hold(string calldata operationId, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\n    function holdFrom(string calldata operationId, address from, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\n    function executeHold(string calldata operationId, uint256 value) external returns (bool);\n    function releaseHold(string calldata operationId) external returns (bool);\n    function balanceOnHold(address account) external view returns (uint256);\n    function authorizeHoldOperator(address operator) external returns (bool);\n}\n```\n\n```ts\n// ethers v6: guest pre-authorizes 300 tokens for 3 days; hotel is payee and notary\nawait token.connect(guest).hold(\"booking-8812\", hotel, hotel, parseUnits(\"300\", 18), 3 * 24 * 3600);\n\n// at check-out the hotel charges only 240; 60 becomes spendable again for the guest\nawait token.connect(hotel).executeHold(\"booking-8812\", parseUnits(\"240\", 18));\n```\n\n## 知っておくべきこと\n\n- **ステータス: Stagnant。** 関連する一連の標準の基盤として提案されました。[Clearable](/eip-2018/)、[Fundable](/eip-2019/)、[E-Money](/eip-2020/)、[Payoutable](/eip-2021/) トークンで、いずれも Stagnant です。\n- 受取人に支払われるかどうかは、公証人がすべて握っています。慎重に選んでください。受取人自身、独立した第三者、コントラクトのいずれでも構いません。\n- 仕様の文面には小さな不整合があります。`holdFrom` は `approveToHold` 関数に言及していますが、インターフェース上は `authorizeHoldOperator` という名前です。また `netBalanceOf` は `balanceOf` と `balanceOnHold` の合計（つまりホールド中のトークンを含む総額）と説明されています。実装前に確認してください。\n- `string` 型の operation ID は柔軟ですが、`bytes32` キーよりもガス代がかかります。\n"},"ko":{"lang":"ko","tldr":"수취인을 위해 토큰을 보류(hold)할 수 있는 ERC-20 확장. 공증인(notary)이 실행할지 해제할지 결정하며, 카드 사전 승인처럼 미래의 결제를 보장한다.","tags":["token","erc20","escrow","hold","payments"],"related":[20,2018,2019,2020,2021],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-1996/","markdown":"## 어떤 문제를 해결하나요?\n\nERC-20의 `approve`는 다른 사람이 나중에 내 토큰을 옮길 수 있게 해주지만, 토큰을 *예약*하지는 않습니다. 승인한 잔액을 내가 먼저 써버릴 수도 있으므로 결제가 보장되지 않습니다.\n\n실제 결제 흐름의 상당수는 먼저 보장이 필요합니다.\n\n- 호텔은 체크인 때 금액을 사전 승인하고, 체크아웃 때 실제 청구 금액을 결제합니다.\n- 규제 대상 토큰은 정산 전에 전송을 검사하면서도, 이후에 자금이 그대로 남아 있도록 해야 합니다.\n\nERC-1996은 **홀드(hold)**를 추가합니다. 지급자의 사용 가능 잔액에서 일정 금액을 잠가 수취인용으로 확보해 두었다가, 나중에 전송하거나 돌려줍니다.\n\n## 어떻게 동작하나요?\n\n홀드에는 지급자, 수취인, 최대 금액, **공증인(notary)**, 만료 시각이 있습니다. 각 홀드는 호출자가 고른 `operationId` 문자열로 식별되며, 재사용할 수 없습니다.\n\n- **생성**: 지급자가 `hold(...)`를 호출하거나, 지급자가 `authorizeHoldOperator`로 승인한 **오퍼레이터**가 `holdFrom(...)`을 호출합니다. 해당 금액은 즉시 전송할 수 없게 됩니다.\n- **실행**: `executeHold(operationId, value)`는 공증인만 호출할 수 있습니다. `value`(홀드 금액 이하)를 수취인에게 전송하고, 나머지는 지급자에게 해제됩니다. 호텔의 \"실제 청구 금액 결제\"에 해당합니다.\n- **해제**: 만료 전에는 공증인이나 수취인이 해제할 수 있고, 만료 후에는 누구나 해제할 수 있습니다. 전송은 일어나지 않습니다.\n- **갱신**: 지급자나 오퍼레이터는 아직 만료되지 않은 홀드를 연장할 수 있습니다.\n- **영구 홀드**: `timeToExpiration`이 0이면 만료가 없으며, 이 경우 공증인만 실행할 수 있고 공증인이나 수취인만 해제할 수 있습니다.\n\n`balanceOf`, `transfer`, `transferFrom`은 홀드된 토큰을 제외해야 합니다. `balanceOnHold`, `totalSupplyOnHold`, `retrieveHoldData`로 홀드 상태를 확인할 수 있고, 각 단계에서 이벤트(`HoldCreated`, `HoldExecuted`, `HoldReleased`, `HoldRenewed`)가 발생합니다.\n\n## 샘플 코드\n\n인터페이스 일부와 판매자 흐름:\n\n```solidity\ninterface IHoldable /* is IERC20 */ {\n    enum HoldStatusCode { Nonexistent, Ordered, Executed, ReleasedByNotary, ReleasedByPayee, ReleasedOnExpiration }\n\n    function hold(string calldata operationId, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\n    function holdFrom(string calldata operationId, address from, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\n    function executeHold(string calldata operationId, uint256 value) external returns (bool);\n    function releaseHold(string calldata operationId) external returns (bool);\n    function balanceOnHold(address account) external view returns (uint256);\n    function authorizeHoldOperator(address operator) external returns (bool);\n}\n```\n\n```ts\n// ethers v6: guest pre-authorizes 300 tokens for 3 days; hotel is payee and notary\nawait token.connect(guest).hold(\"booking-8812\", hotel, hotel, parseUnits(\"300\", 18), 3 * 24 * 3600);\n\n// at check-out the hotel charges only 240; 60 becomes spendable again for the guest\nawait token.connect(hotel).executeHold(\"booking-8812\", parseUnits(\"240\", 18));\n```\n\n## 알아둘 점\n\n- **상태: Stagnant.** 관련 표준 계열의 기반으로 제안되었습니다. [Clearable](/eip-2018/), [Fundable](/eip-2019/), [E-Money](/eip-2020/), [Payoutable](/eip-2021/) 토큰이며, 모두 Stagnant입니다.\n- 수취인이 대금을 받을지는 공증인이 전적으로 좌우합니다. 신중하게 고르세요. 수취인 본인, 독립된 제3자, 컨트랙트 모두 가능합니다.\n- 명세 본문에는 작은 불일치가 있습니다. `holdFrom`은 `approveToHold` 함수를 언급하지만 인터페이스에서는 `authorizeHoldOperator`라는 이름이며, `netBalanceOf`는 `balanceOf`에 `balanceOnHold`를 더한 값(즉, 홀드된 토큰을 포함한 총액)으로 설명되어 있습니다. 구현하기 전에 확인하세요.\n- `string` 타입 operation ID는 유연하지만 `bytes32` 키보다 가스가 더 듭니다.\n"},"zh":{"lang":"zh","tldr":"一个 ERC-20 扩展，允许为收款方冻结（hold）代币，由公证人（notary）决定执行还是释放，像银行卡预授权一样保证未来的付款。","tags":["token","erc20","escrow","hold","payments"],"related":[20,2018,2019,2020,2021],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-1996/","markdown":"## 它解决什么问题？\n\nERC-20 的 `approve` 允许别人以后转走你的代币，但并不会*预留*它们。你仍然可以花掉已授权的余额，因此付款得不到保证。\n\n许多真实的支付流程都需要先有保证：\n\n- 酒店在入住时预授权一笔金额，退房时再按实际账单收费。\n- 受监管的代币必须在结算前检查转账，同时确保之后资金仍然在账上。\n\nERC-1996 增加了**冻结（hold）**：从付款方的可用余额中锁定一笔金额，指定给某个收款方，之后要么转出，要么退回。\n\n## 它如何运作\n\n一个 hold 包含付款方、收款方、最大金额、**公证人（notary）**和过期时间。每个 hold 由调用者自选的 `operationId` 字符串标识，不得重复使用。\n\n- **创建**：由付款方调用 `hold(...)`，或由付款方通过 `authorizeHoldOperator` 授权的**操作员**调用 `holdFrom(...)`。这笔金额立即不可转账。\n- **执行**：只有公证人可以调用 `executeHold(operationId, value)`。它把 `value`（不超过冻结金额）转给收款方，剩余部分释放回付款方。这就是酒店的\"按实际账单收费\"。\n- **释放**：过期前，公证人或收款方可以释放；过期后，任何人都可以释放。不发生任何转账。\n- **续期**：付款方或操作员可以延长尚未过期的 hold。\n- **永久 hold**：`timeToExpiration` 为 0 表示永不过期，此时只有公证人可以执行，只有公证人或收款方可以释放。\n\n`balanceOf`、`transfer` 和 `transferFrom` 必须排除被冻结的代币。`balanceOnHold`、`totalSupplyOnHold` 和 `retrieveHoldData` 公开冻结状态，每一步都会触发事件（`HoldCreated`、`HoldExecuted`、`HoldReleased`、`HoldRenewed`）。\n\n## 示例代码\n\n接口的一部分，以及一个商户流程：\n\n```solidity\ninterface IHoldable /* is IERC20 */ {\n    enum HoldStatusCode { Nonexistent, Ordered, Executed, ReleasedByNotary, ReleasedByPayee, ReleasedOnExpiration }\n\n    function hold(string calldata operationId, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\n    function holdFrom(string calldata operationId, address from, address to, address notary, uint256 value, uint256 timeToExpiration) external returns (bool);\n    function executeHold(string calldata operationId, uint256 value) external returns (bool);\n    function releaseHold(string calldata operationId) external returns (bool);\n    function balanceOnHold(address account) external view returns (uint256);\n    function authorizeHoldOperator(address operator) external returns (bool);\n}\n```\n\n```ts\n// ethers v6: guest pre-authorizes 300 tokens for 3 days; hotel is payee and notary\nawait token.connect(guest).hold(\"booking-8812\", hotel, hotel, parseUnits(\"300\", 18), 3 * 24 * 3600);\n\n// at check-out the hotel charges only 240; 60 becomes spendable again for the guest\nawait token.connect(hotel).executeHold(\"booking-8812\", parseUnits(\"240\", 18));\n```\n\n## 需要注意\n\n- **状态：Stagnant。** 它是作为一系列相关标准的基础提出的：[Clearable](/eip-2018/)、[Fundable](/eip-2019/)、[E-Money](/eip-2020/) 和 [Payoutable](/eip-2021/) 代币，这些也都是 Stagnant。\n- 收款方能否收到款项完全由公证人掌控。请谨慎选择；公证人可以是收款方、独立第三方或合约。\n- 规范文本存在一些小的不一致：`holdFrom` 提到了 `approveToHold` 函数，而接口中的名称是 `authorizeHoldOperator`；`netBalanceOf` 被描述为 `balanceOf` 加 `balanceOnHold`（即包含被冻结代币的总额）。构建之前请先澄清这些问题。\n- 使用 `string` 类型的 operation ID 很灵活，但比 `bytes32` 键消耗更多 gas。\n"}},"requiredBy":[2018,2020,2021]}
