{"eip":7444,"title":"Time Locks Maturity","description":"Interface for conveying the date upon which a time-locked system becomes unlocked","authors":["Thanh Trinh (@thanhtrinh2003) \u003cthanh@revest.finance\u003e","Joshua Weintraub (@jhweintraub) \u003cjosh@revest.finance\u003e","Rob Montgomery (@RobAnon) \u003crob@revest.finance\u003e"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2023-06-05","requires":[165],"discussionsTo":"https://ethereum-magicians.org/t/eip-idea-timelock-maturity/15321","repo":"ERCs","label":"ERC-7444","officialUrl":"https://eips.ethereum.org/EIPS/eip-7444","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7444.md","url":"https://eips.huatuo.xyz/eip-7444/","tldr":{"en":"A one-function interface, getMaturity(id), that tells anyone the Unix timestamp at which a time-locked position unlocks, so locked assets can be valued and traded consistently.","ja":"関数 1 つのインターフェース getMaturity(id)。タイムロックされたポジションがいつアンロックされるかを Unix タイムスタンプで誰にでも教え、ロックされた資産を一貫して評価・取引できるようにする。","ko":"함수 하나짜리 인터페이스 getMaturity(id). 타임락이 걸린 포지션이 언제 잠금 해제되는지 Unix 타임스탬프로 누구에게나 알려 주어, 잠긴 자산을 일관되게 평가하고 거래할 수 있게 한다.","zh":"一个只有一个函数的接口 getMaturity(id)，让任何人都能获知被时间锁定的头寸解锁的 Unix 时间戳，使锁定资产可以被一致地估值和交易。"},"tags":["defi","timelock","vesting","interface"],"explainers":{"en":{"lang":"en","tldr":"A one-function interface, getMaturity(id), that tells anyone the Unix timestamp at which a time-locked position unlocks, so locked assets can be valued and traded consistently.","tags":["defi","timelock","vesting","interface"],"related":[165,721,1155,20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7444/","markdown":"## What problem does it solve?\n\nTime locks are everywhere in DeFi: vesting schedules, vote-escrowed tokens, locked liquidity, bonds. Very often the right to a locked position is itself transferable, for example as an [ERC-721](/eip-721/) or [ERC-1155](/eip-1155/) token. To price such a position you need to know when it unlocks, because its value depends heavily on time remaining. Today every protocol exposes that date differently, if at all, so marketplaces, lending protocols and valuation tools must write custom code for each one.\n\nERC-7444 standardises the single piece of information they all need: the maturity date.\n\n## How it works\n\nA compliant contract supports [ERC-165](/eip-165/) and implements:\n\n```solidity\nfunction getMaturity(bytes32 id) external view returns (uint256 maturity);\n```\n\n- `id` identifies a specific lock. How IDs are derived is up to the implementation (a hash, a token ID cast to `bytes32`, etc.).\n- `maturity` is a Unix timestamp in seconds, the same unit as `block.timestamp`.\n- For singleton contracts that lock one fungible asset with a single schedule, `id` should be ignored, and callers should pass `0x0`.\n\nThe standard can be bolted onto existing NFT-based lock systems by deploying a separate contract that answers `getMaturity` for them.\n\nThe rationale points out that time to maturity is a key input in option-style pricing models such as Black-Scholes, which is why a common way to read it matters.\n\n## Sample code\n\nA minimal locker that implements the interface:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface IERC7444 {\n    function getMaturity(bytes32 id) external view returns (uint256 maturity);\n}\n\ncontract SimpleLocker is IERC7444 {\n    struct Lock { address owner; uint256 amount; uint256 maturity; }\n\n    IERC20 public immutable token;\n    mapping(bytes32 =\u003e Lock) public locks;\n    uint256 private nonce;\n\n    constructor(IERC20 _token) { token = _token; }\n\n    function deposit(uint256 amount, uint256 period) external returns (bytes32 id) {\n        id = keccak256(abi.encode(msg.sender, nonce++));\n        locks[id] = Lock(msg.sender, amount, block.timestamp + period);\n        require(token.transferFrom(msg.sender, address(this), amount), \"transfer\");\n    }\n\n    function withdraw(bytes32 id) external {\n        Lock memory l = locks[id];\n        require(msg.sender == l.owner, \"owner\");\n        require(block.timestamp \u003e= l.maturity, \"locked\");\n        delete locks[id];\n        require(token.transfer(msg.sender, l.amount), \"transfer\");\n    }\n\n    function getMaturity(bytes32 id) external view returns (uint256) {\n        return locks[id].maturity;\n    }\n\n    function supportsInterface(bytes4 i) external pure returns (bool) {\n        return i == type(IERC7444).interfaceId || i == 0x01ffc9a7; // ERC-165\n    }\n}\n```\n\n## Things to know\n\n- Status is **Draft**.\n- Some protocols let a lock be extended. `getMaturity` only reports the current value, so check it right before trading or lending against a position.\n- The reference implementation in the spec text has typos and an inverted maturity check in `withdraw`; treat it as illustrative and do not copy it directly.\n- A return value of `0` usually means the ID does not exist, but the spec does not define this, so do not rely on it across implementations.\n"},"ja":{"lang":"ja","tldr":"関数 1 つのインターフェース getMaturity(id)。タイムロックされたポジションがいつアンロックされるかを Unix タイムスタンプで誰にでも教え、ロックされた資産を一貫して評価・取引できるようにする。","tags":["defi","timelock","vesting","interface"],"related":[165,721,1155,20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7444/","markdown":"## 何を解決するのか\n\nタイムロックは DeFi のあらゆる場所にあります。ベスティングスケジュール、投票用にエスクローされたトークン、ロックされた流動性、債券などです。ロックされたポジションの権利自体が、たとえば [ERC-721](/eip-721/) や [ERC-1155](/eip-1155/) トークンとして譲渡可能であることも非常によくあります。そうしたポジションの価格を付けるには、いつアンロックされるかを知る必要があります。価値が残り時間に大きく左右されるからです。現状では、プロトコルごとにその日付の公開方法が異なり、そもそも公開していない場合もあるため、マーケットプレイス、レンディングプロトコル、評価ツールは、それぞれに専用のコードを書かなければなりません。\n\nERC-7444 は、それらすべてが必要とする唯一の情報、つまり満期日を標準化します。\n\n## 仕組み\n\n準拠するコントラクトは [ERC-165](/eip-165/) に対応し、次を実装します。\n\n```solidity\nfunction getMaturity(bytes32 id) external view returns (uint256 maturity);\n```\n\n- `id` は特定のロックを識別します。ID の導出方法は実装に任されています（ハッシュ、`bytes32` にキャストしたトークン ID など）。\n- `maturity` は秒単位の Unix タイムスタンプで、`block.timestamp` と同じ単位です。\n- 1 つの代替可能資産を単一のスケジュールでロックするシングルトンコントラクトでは、`id` は無視すべきで、呼び出し側は `0x0` を渡すべきです。\n\nこの標準は、既存の NFT ベースのロックシステムに対して `getMaturity` に答える別のコントラクトをデプロイすることで、後付けできます。\n\n根拠の節では、満期までの時間が Black-Scholes のようなオプション型の価格モデルの重要な入力であり、だからこそ共通の読み取り方法が重要だと指摘しています。\n\n## サンプルコード\n\nこのインターフェースを実装する最小限のロッカー:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface IERC7444 {\n    function getMaturity(bytes32 id) external view returns (uint256 maturity);\n}\n\ncontract SimpleLocker is IERC7444 {\n    struct Lock { address owner; uint256 amount; uint256 maturity; }\n\n    IERC20 public immutable token;\n    mapping(bytes32 =\u003e Lock) public locks;\n    uint256 private nonce;\n\n    constructor(IERC20 _token) { token = _token; }\n\n    function deposit(uint256 amount, uint256 period) external returns (bytes32 id) {\n        id = keccak256(abi.encode(msg.sender, nonce++));\n        locks[id] = Lock(msg.sender, amount, block.timestamp + period);\n        require(token.transferFrom(msg.sender, address(this), amount), \"transfer\");\n    }\n\n    function withdraw(bytes32 id) external {\n        Lock memory l = locks[id];\n        require(msg.sender == l.owner, \"owner\");\n        require(block.timestamp \u003e= l.maturity, \"locked\");\n        delete locks[id];\n        require(token.transfer(msg.sender, l.amount), \"transfer\");\n    }\n\n    function getMaturity(bytes32 id) external view returns (uint256) {\n        return locks[id].maturity;\n    }\n\n    function supportsInterface(bytes4 i) external pure returns (bool) {\n        return i == type(IERC7444).interfaceId || i == 0x01ffc9a7; // ERC-165\n    }\n}\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** です。\n- プロトコルによってはロックを延長できます。`getMaturity` は現在の値しか返さないため、ポジションを取引したり担保に貸し出したりする直前に確認してください。\n- 仕様の文章にあるリファレンス実装には誤字があり、`withdraw` の満期チェックが逆になっています。説明用と考え、そのままコピーしないでください。\n- 戻り値 `0` は通常、その ID が存在しないことを意味しますが、仕様は定義していないため、実装をまたいで頼らないでください。\n"},"ko":{"lang":"ko","tldr":"함수 하나짜리 인터페이스 getMaturity(id). 타임락이 걸린 포지션이 언제 잠금 해제되는지 Unix 타임스탬프로 누구에게나 알려 주어, 잠긴 자산을 일관되게 평가하고 거래할 수 있게 한다.","tags":["defi","timelock","vesting","interface"],"related":[165,721,1155,20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7444/","markdown":"## 어떤 문제를 해결하나요?\n\n타임락은 DeFi 곳곳에 있습니다. 베스팅 일정, 투표용으로 예치된 토큰, 잠긴 유동성, 채권 등입니다. 잠긴 포지션에 대한 권리 자체가 예를 들어 [ERC-721](/eip-721/)이나 [ERC-1155](/eip-1155/) 토큰으로 양도 가능한 경우가 매우 많습니다. 이런 포지션의 가격을 매기려면 언제 잠금이 풀리는지 알아야 합니다. 가치가 남은 시간에 크게 좌우되기 때문입니다. 현재는 프로토콜마다 그 날짜를 노출하는 방식이 제각각이고 아예 노출하지 않는 경우도 있어서, 마켓플레이스, 대출 프로토콜, 가치 평가 도구는 각각에 대해 맞춤 코드를 작성해야 합니다.\n\nERC-7444는 이들이 모두 필요로 하는 단 하나의 정보, 즉 만기일을 표준화합니다.\n\n## 어떻게 동작하나요?\n\n규격을 따르는 컨트랙트는 [ERC-165](/eip-165/)를 지원하고 다음을 구현합니다.\n\n```solidity\nfunction getMaturity(bytes32 id) external view returns (uint256 maturity);\n```\n\n- `id`는 특정 락 하나를 식별합니다. ID를 만드는 방식은 구현에 맡겨집니다(해시, `bytes32`로 캐스팅한 토큰 ID 등).\n- `maturity`는 초 단위 Unix 타임스탬프이며 `block.timestamp`와 같은 단위입니다.\n- 하나의 대체 가능 자산을 단일 일정으로 잠그는 싱글톤 컨트랙트에서는 `id`를 무시해야 하며 호출자는 `0x0`을 전달해야 합니다.\n\n기존 NFT 기반 락 시스템에 대해서는 `getMaturity`에 응답하는 별도의 컨트랙트를 배포해 이 표준을 덧붙일 수 있습니다.\n\n근거 부분에서는 만기까지의 시간이 Black-Scholes 같은 옵션형 가격 모델의 핵심 입력값이라는 점을 짚으며, 그래서 이를 읽는 공통된 방법이 중요하다고 설명합니다.\n\n## 샘플 코드\n\n이 인터페이스를 구현하는 최소한의 락커:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface IERC7444 {\n    function getMaturity(bytes32 id) external view returns (uint256 maturity);\n}\n\ncontract SimpleLocker is IERC7444 {\n    struct Lock { address owner; uint256 amount; uint256 maturity; }\n\n    IERC20 public immutable token;\n    mapping(bytes32 =\u003e Lock) public locks;\n    uint256 private nonce;\n\n    constructor(IERC20 _token) { token = _token; }\n\n    function deposit(uint256 amount, uint256 period) external returns (bytes32 id) {\n        id = keccak256(abi.encode(msg.sender, nonce++));\n        locks[id] = Lock(msg.sender, amount, block.timestamp + period);\n        require(token.transferFrom(msg.sender, address(this), amount), \"transfer\");\n    }\n\n    function withdraw(bytes32 id) external {\n        Lock memory l = locks[id];\n        require(msg.sender == l.owner, \"owner\");\n        require(block.timestamp \u003e= l.maturity, \"locked\");\n        delete locks[id];\n        require(token.transfer(msg.sender, l.amount), \"transfer\");\n    }\n\n    function getMaturity(bytes32 id) external view returns (uint256) {\n        return locks[id].maturity;\n    }\n\n    function supportsInterface(bytes4 i) external pure returns (bool) {\n        return i == type(IERC7444).interfaceId || i == 0x01ffc9a7; // ERC-165\n    }\n}\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**입니다.\n- 일부 프로토콜은 락 연장을 허용합니다. `getMaturity`는 현재 값만 알려 주므로, 포지션을 거래하거나 이를 담보로 대출하기 직전에 확인하세요.\n- 명세 본문의 참조 구현에는 오타가 있고 `withdraw`의 만기 확인이 거꾸로 되어 있습니다. 설명용으로만 보고 그대로 복사하지 마세요.\n- 반환값 `0`은 보통 해당 ID가 존재하지 않음을 뜻하지만 명세가 이를 정의하지 않으므로 구현 간에 의존하지 마세요.\n"},"zh":{"lang":"zh","tldr":"一个只有一个函数的接口 getMaturity(id)，让任何人都能获知被时间锁定的头寸解锁的 Unix 时间戳，使锁定资产可以被一致地估值和交易。","tags":["defi","timelock","vesting","interface"],"related":[165,721,1155,20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7444/","markdown":"## 它解决什么问题？\n\n时间锁在 DeFi 中无处不在：归属（vesting）计划、投票托管代币、锁定的流动性、债券。锁定头寸的权利本身往往可以转让，例如以 [ERC-721](/eip-721/) 或 [ERC-1155](/eip-1155/) 代币的形式。要为这样的头寸定价，你需要知道它何时解锁，因为它的价值在很大程度上取决于剩余时间。如今每个协议公开这个日期的方式各不相同，甚至根本不公开，因此市场、借贷协议和估值工具必须为每一个协议编写定制代码。\n\nERC-7444 把它们都需要的那一条信息标准化：到期日。\n\n## 它如何运作\n\n符合规范的合约支持 [ERC-165](/eip-165/) 并实现：\n\n```solidity\nfunction getMaturity(bytes32 id) external view returns (uint256 maturity);\n```\n\n- `id` 标识某一个具体的锁。ID 如何生成由实现决定（哈希、转换为 `bytes32` 的代币 ID 等）。\n- `maturity` 是以秒为单位的 Unix 时间戳，与 `block.timestamp` 的单位相同。\n- 对于以单一计划锁定一种同质化资产的单例合约，应忽略 `id`，调用者应传入 `0x0`。\n\n可以通过部署一个单独的合约来为现有基于 NFT 的锁定系统回答 `getMaturity`，从而把该标准附加到它们上面。\n\n其设计理由指出，距到期时间是 Black-Scholes 等期权式定价模型的关键输入，这就是为什么需要一种通用的读取方式。\n\n## 示例代码\n\n一个实现该接口的最小锁仓合约：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ninterface IERC7444 {\n    function getMaturity(bytes32 id) external view returns (uint256 maturity);\n}\n\ncontract SimpleLocker is IERC7444 {\n    struct Lock { address owner; uint256 amount; uint256 maturity; }\n\n    IERC20 public immutable token;\n    mapping(bytes32 =\u003e Lock) public locks;\n    uint256 private nonce;\n\n    constructor(IERC20 _token) { token = _token; }\n\n    function deposit(uint256 amount, uint256 period) external returns (bytes32 id) {\n        id = keccak256(abi.encode(msg.sender, nonce++));\n        locks[id] = Lock(msg.sender, amount, block.timestamp + period);\n        require(token.transferFrom(msg.sender, address(this), amount), \"transfer\");\n    }\n\n    function withdraw(bytes32 id) external {\n        Lock memory l = locks[id];\n        require(msg.sender == l.owner, \"owner\");\n        require(block.timestamp \u003e= l.maturity, \"locked\");\n        delete locks[id];\n        require(token.transfer(msg.sender, l.amount), \"transfer\");\n    }\n\n    function getMaturity(bytes32 id) external view returns (uint256) {\n        return locks[id].maturity;\n    }\n\n    function supportsInterface(bytes4 i) external pure returns (bool) {\n        return i == type(IERC7444).interfaceId || i == 0x01ffc9a7; // ERC-165\n    }\n}\n```\n\n## 需要注意\n\n- 状态为 **Draft**。\n- 有些协议允许延长锁定。`getMaturity` 只报告当前值，因此在交易或以头寸为抵押借贷之前，请先检查它。\n- 规范文本中的参考实现有拼写错误，并且 `withdraw` 中的到期检查写反了；请把它当作示意，不要直接复制。\n- 返回值 `0` 通常表示该 ID 不存在，但规范并未定义这一点，因此不要在不同实现之间依赖它。\n"}}}
