ERC-3475 · Final · ERC · 2021-04-05
ERC-3475: Abstract Storage Bonds
A token standard for bonds and other obligations: each class/nonce pair is its own token type with on-chain metadata, supply tracking and batch issue, transfer and redeem.
What problem does it solve?
Liquidity provider shares and similar claims are usually plain ERC-20 tokens. That works for a single fungible position, but a bond has more structure: an issuing condition, a maturity, redemption rules, and possibly many tranches issued at different times. Encoding that in ERC-20 means one contract per tranche and metadata held off-chain.
ERC-3475 defines one contract that can hold many bond types, each with its own metadata and supply figures that any wallet or exchange can read through the same interface.
How it works
- Class (
classId): a bond type, for example "6-month fixed". Classes have metadata such as symbol or risk information. - Nonce (
nonceId): an issuance within a class, for example a particular issue date. Each(classId, nonceId)pair has its own balances, supply and metadata. Units within a nonce are fungible. - Batch operations take an array of
Transaction { classId, nonceId, _amount }, so one call can move several bond types:issue(to, txs),redeem(from, txs),burn(from, txs): restricted to the issuing entity (the spec calls it the "Bank");transferFrom(from, to, txs),transferAllowanceFrom(from, to, txs);approve(spender, txs)per class/nonce, andsetApprovalFor(operator, approved)for operators.
- Supply views per class/nonce:
totalSupply,activeSupply,redeemedSupply,burnedSupply, plusbalanceOf(account, classId, nonceId). - Maturity:
getProgress(classId, nonceId)returns progress achieved and remaining toward redemption (time, liquidity, or whatever the issuer defines). - Abstract metadata:
classMetadata/nonceMetadatadescribe fields (title,_type,description), andclassValues/nonceValuesreturn the values in a genericValuesstruct (string, uint, address, bool, bytes). This avoids a fixed storage layout. - Events:
Issue,Redeem,Transfer,ApprovalFor, and a burn event.
Sample code
Core types and a few functions:
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.0;
interface IERC3475Core {
struct Transaction { uint256 classId; uint256 nonceId; uint256 _amount; }
struct Metadata { string title; string _type; string description; }
struct Values { string stringValue; uint uintValue; address addressValue; bool boolValue; bytes bytesValue; }
event Transfer(address indexed _operator, address indexed _from, address indexed _to, Transaction[] _transactions);
function transferFrom(address _from, address _to, Transaction[] calldata _transactions) external;
function balanceOf(address _account, uint256 classId, uint256 nonceId) external view returns (uint256);
function activeSupply(uint256 classId, uint256 nonceId) external view returns (uint256);
function getProgress(uint256 classId, uint256 nonceId)
external view returns (uint256 progressAchieved, uint256 progressRemaining);
}
Moving two tranches in one call (ethers v6):
await bond.transferFrom(me, buyer, [
{ classId: 1n, nonceId: 14n, _amount: 500n },
{ classId: 1n, nonceId: 15n, _amount: 200n },
]);
Things to know
- Status: Final.
- Despite listing ERC-20, ERC-721 and ERC-1155 as requirements, it is a separate interface: ERC-20 or ERC-1155 wallets cannot display or transfer these bonds without explicit support.
- The specification text has inconsistencies between its examples, parameter names and comments (for instance the class/nonce values and amounts in examples do not always match the calls shown, and some signatures differ between the docstring and the function). Check a reference implementation rather than the prose alone.
- Metadata schemas are defined in an accompanying
Metadata.mdasset rather than in the main spec text. issue,redeemandburnare privileged. Holders depend on the issuer's contract enforcing maturity conditions correctly; the standard only says redemption must happen after those conditions are met.