---
eip: 6147
label: ERC-6147
title: Guard of NFT/SBT, an Extension of ERC-721
status: Final
type: Standards Track
category: ERC
created: 2022-12-07
requires: 165, 721
official: https://eips.ethereum.org/EIPS/eip-6147
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6147.md
canonical: https://eips.huatuo.xyz/eip-6147/
lang: en
tldr: An ERC-721 extension that adds a time-limited guard who alone can transfer the NFT while it is set, separating the right to hold a token from the right to move it.
tags: [nft, sbt, erc721, security, lending]
---

# ERC-6147: Guard of NFT/SBT, an Extension of ERC-721

> A new management role with an expiration date of NFT/SBT is defined, achieving the separation of transfer right and holding right.

**TL;DR:** An ERC-721 extension that adds a time-limited guard who alone can transfer the NFT while it is set, separating the right to hold a token from the right to move it.

## What problem does it solve?

With plain [ERC-721](/eip-721/), whoever controls the owner's key (or an approved operator) can move the NFT. That makes several common needs awkward:

- **Anti-theft**: keeping NFTs safe usually means moving them to a cold wallet, where they are hard to use.
- **Lending**: the borrower must lock the NFT in the lending contract and loses the ability to use it while the loan is open.
- **Soulbound tokens**: if an SBT holder loses their key there is no standard way to recover the token, and issuers (for example a university issuing diplomas) have no standard way to revoke one.

ERC-6147 splits the "holding right" from the "transfer right" by introducing a new role, the **guard**, with an expiry time.

## How it works

Each token can have a `guard` address and an `expires` timestamp. A guard is only valid before `expires`.

- **No guard (or expired):** owner, approved address and operators can set a guard with `changeGuard(tokenId, guard, expires)`. Transfers work like normal ERC-721. `guardInfo` returns `(address(0), 0)`.
- **Valid guard:** the owner, approved address and operators **cannot transfer the token** and cannot change the guard. Only the guard can:
  - `changeGuard` to a new guard or expiry,
  - `removeGuard` to give control back,
  - transfer the token, including `transferAndRemove(from, to, tokenId)` which transfers and clears the guard in one step.
- Burning a token deletes its guard. Every change emits `UpdateGuardLog`.
- `supportsInterface(0xb61d1057)` returns `true`.

The owner keeps ownership (and so any utility tied to `ownerOf`), while the guard controls movement. Example uses from the spec:

- Set your own cold wallet as guard: use the NFT from a hot wallet but a stolen hot key cannot move it.
- Set a lender as guard: keep using the NFT; on default the lender can transfer it.
- An SBT issuer sets itself as guard at mint: holders cannot transfer, but the issuer can recover or revoke.

## Sample code

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

interface IERC6147 {
    event UpdateGuardLog(uint256 indexed tokenId, address indexed newGuard, address oldGuard, uint64 expires);

    function changeGuard(uint256 tokenId, address newGuard, uint64 expires) external;
    function removeGuard(uint256 tokenId) external;
    function transferAndRemove(address from, address to, uint256 tokenId) external;
    function guardInfo(uint256 tokenId) external view returns (address, uint64);
}
```

A marketplace refusing to list guarded tokens:

```solidity
function list(address nft, uint256 tokenId, uint256 price) external {
    (address guard, ) = IERC6147(nft).guardInfo(tokenId);
    require(guard == address(0), "token is guarded");
    // ... create listing
}
```

Checking from ethers v6:

```ts
const nft = new Contract(addr, ["function guardInfo(uint256) view returns (address,uint64)"], provider);
const [guard, expires] = await nft.guardInfo(42n);
if (guard !== ZeroAddress) console.log(`guarded until ${new Date(Number(expires) * 1000)}`);
```

## Things to know

- **Status: Final.**
- Choose `expires` carefully. A short expiry limits the damage if the guard's key is lost (the owner regains control afterwards); a long one gives the guard (for example a lender) a stronger guarantee.
- While a guard is valid, existing `approve` / `setApprovalForAll` permissions are useless. Marketplaces that rely on operator approvals and signed listings should check `guardInfo` so they do not list tokens that cannot be delivered.
- The guard can be a contract, which lets you build social recovery, multisig control or lending logic on top.
- Related NFT extensions include [ERC-4907](/eip-4907/) (separate "user" role for rentals) and [ERC-5192](/eip-5192/) (minimal soulbound locking).


---

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