---
eip: 7444
label: ERC-7444
title: Time Locks Maturity
status: Draft
type: Standards Track
category: ERC
created: 2023-06-05
requires: 165
official: https://eips.ethereum.org/EIPS/eip-7444
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7444.md
canonical: https://eips.huatuo.xyz/eip-7444/
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]
---

# ERC-7444: Time Locks Maturity

> Interface for conveying the date upon which a time-locked system becomes unlocked

**TL;DR:** 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.

## What problem does it solve?

Time 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.

ERC-7444 standardises the single piece of information they all need: the maturity date.

## How it works

A compliant contract supports [ERC-165](/eip-165/) and implements:

```solidity
function getMaturity(bytes32 id) external view returns (uint256 maturity);
```

- `id` identifies a specific lock. How IDs are derived is up to the implementation (a hash, a token ID cast to `bytes32`, etc.).
- `maturity` is a Unix timestamp in seconds, the same unit as `block.timestamp`.
- For singleton contracts that lock one fungible asset with a single schedule, `id` should be ignored, and callers should pass `0x0`.

The standard can be bolted onto existing NFT-based lock systems by deploying a separate contract that answers `getMaturity` for them.

The 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.

## Sample code

A minimal locker that implements the interface:

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

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IERC7444 {
    function getMaturity(bytes32 id) external view returns (uint256 maturity);
}

contract SimpleLocker is IERC7444 {
    struct Lock { address owner; uint256 amount; uint256 maturity; }

    IERC20 public immutable token;
    mapping(bytes32 => Lock) public locks;
    uint256 private nonce;

    constructor(IERC20 _token) { token = _token; }

    function deposit(uint256 amount, uint256 period) external returns (bytes32 id) {
        id = keccak256(abi.encode(msg.sender, nonce++));
        locks[id] = Lock(msg.sender, amount, block.timestamp + period);
        require(token.transferFrom(msg.sender, address(this), amount), "transfer");
    }

    function withdraw(bytes32 id) external {
        Lock memory l = locks[id];
        require(msg.sender == l.owner, "owner");
        require(block.timestamp >= l.maturity, "locked");
        delete locks[id];
        require(token.transfer(msg.sender, l.amount), "transfer");
    }

    function getMaturity(bytes32 id) external view returns (uint256) {
        return locks[id].maturity;
    }

    function supportsInterface(bytes4 i) external pure returns (bool) {
        return i == type(IERC7444).interfaceId || i == 0x01ffc9a7; // ERC-165
    }
}
```

## Things to know

- Status is **Draft**.
- Some protocols let a lock be extended. `getMaturity` only reports the current value, so check it right before trading or lending against a position.
- 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.
- 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.


---

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