---
eip: 3525
label: ERC-3525
title: Semi-Fungible Token
status: Final
type: Standards Track
category: ERC
created: 2020-12-01
requires: 20, 165, 721
official: https://eips.ethereum.org/EIPS/eip-3525
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-3525.md
canonical: https://eips.huatuo.xyz/eip-3525/
lang: en
tldr: "A semi-fungible token standard: ERC-721-compatible tokens that each carry a slot and a value, where value can be split and moved between tokens of the same slot like an ERC-20 balance."
tags: [token, semi-fungible, nft, erc721, defi]
---

# ERC-3525: Semi-Fungible Token

> Defines a specification where ERC-721 compatible tokens with the same SLOT and different IDs are fungible.

**TL;DR:** A semi-fungible token standard: ERC-721-compatible tokens that each carry a slot and a value, where value can be split and moved between tokens of the same slot like an ERC-20 balance.

## What problem does it solve?

Some assets are partly unique and partly quantitative. Think of a bond: every position in the same issue (same maturity, same coupon) is interchangeable by amount, but different issues are not. Vesting schedules, vouchers and other financial positions look similar.

- With [ERC-20](/eip-20/) you would need one contract per issue, which multiplies quickly.
- With [ERC-721](/eip-721/) each token is indivisible: you cannot send "half" of an NFT position.

ERC-3525 combines both. Each token is an ERC-721 NFT, so wallets and marketplaces can already display and transfer it, and each also holds an amount that can be split and merged.

## How it works

Every token is described by the triple `<ID, SLOT, VALUE>`:

- **ID** – the ERC-721 token ID; `ownerOf`, `transferFrom(from, to, tokenId)` and friends work as usual.
- **SLOT** – a category. Values in tokens with the **same slot** are fungible with each other.
- **VALUE** – a quantity, like an ERC-20 balance but held by the token rather than the address. `valueDecimals()` says how to display it (named this way to avoid clashing with ERC-20's `decimals()`).

New functions (ERC-165 interface ID `0xd5358140`):

| Function | Purpose |
| --- | --- |
| `balanceOf(tokenId)` | Value held by a token |
| `slotOf(tokenId)` | Its slot |
| `transferFrom(fromId, toId, value)` | Move value between two tokens of the same slot |
| `transferFrom(fromId, to, value)` | Move value to an address; the contract creates or picks a token of the same slot for `to` and returns its ID |
| `approve(tokenId, operator, value)` / `allowance(tokenId, operator)` | Value-level approvals |

Events `TransferValue`, `ApprovalValue` and `SlotChanged` sit alongside ERC-721's `Transfer`/`Approval`. Approvals stack in four levels: all tokens (`setApprovalForAll`), per slot (optional `setApprovalForSlot`), per token ID, and per value.

Instead of separate "safe" transfer functions, the contract **must** call `onERC3525Received` whenever the recipient is a contract that implements it, and revert unless it returns `0x009ce20b`. Optional extensions add slot enumeration and metadata (`contractURI`, `slotURI`), with on-chain JSON metadata recommended.

## Sample code

Splitting a position and sending part of it (ethers v6). The overloaded `transferFrom` must be called by full signature:

```ts
import { Contract, Wallet, JsonRpcProvider, parseUnits } from "ethers";

const abi = [
  "function valueDecimals() view returns (uint8)",
  "function balanceOf(uint256 tokenId) view returns (uint256)",
  "function slotOf(uint256 tokenId) view returns (uint256)",
  "function transferFrom(uint256 fromTokenId, address to, uint256 value) payable returns (uint256)",
  "event TransferValue(uint256 indexed _fromTokenId, uint256 indexed _toTokenId, uint256 _value)",
];
const signer = new Wallet(process.env.PRIVATE_KEY!, new JsonRpcProvider(process.env.RPC_URL));
const sft = new Contract(process.env.SFT!, abi, signer);

const tokenId = 42n;
const decimals = await sft.valueDecimals();
console.log("slot", await sft.slotOf(tokenId), "value", await sft.balanceOf(tokenId));

const tx = await sft["transferFrom(uint256,address,uint256)"](
  tokenId,
  "0x000000000000000000000000000000000000bEEF",
  parseUnits("250", decimals),
);
await tx.wait(); // recipient receives value in a token with the same slot
```

## Things to know

- Status: **Final**.
- Value approvals are separate from ERC-721 approvals. Approving a token ID lets the operator move its value, but approving its whole value does **not** let the operator transfer the token itself.
- Tools that only understand ERC-721 will show the NFT but not its value. Transferring the NFT with ERC-721 `transferFrom` moves the whole token, value included.
- Value transfers to an address may mint a new token ID, so the recipient's token count can grow.
- Compared with [ERC-1155](/eip-1155/), where amounts of an ID are fungible balances per address, here each holding is its own NFT with its own value.


---

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