Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines ERC-5604, which proposes associating liens with NFTs to support NFT-backed lending and contractual arrangements.
This article translates, summarizes, and supplements the material linked below.
I have also covered other EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.
Overview
ERC-5604 introduces the concept of an NFT lien.
A lien is a form of security interest associated with an asset, intended to secure repayment of a debt or performance of an obligation.
An NFT owner may offer an NFT as collateral, and a lien holder may have rights associated with the collateral if the owner fails to meet the relevant obligations.
ERC-5604 defines interfaces for adding and removing liens on NFTs, together with events notifying observers about those operations.
This provides a common way for NFT contracts and integrating applications to represent lien relationships.
At the technical level, the proposal enables the association of lien information with an NFT's on-chain state.
This can support the use of NFTs as collateral in financial and contractual applications rather than solely as digital assets.
A lien recorded through this interface does not, by itself, establish legal enforceability or define a foreclosure mechanism.
Motivation
Liens and similar security interests are common in traditional finance and contractual arrangements. Examples include security interests associated with vehicle financing and mortgages.
Such arrangements define rights that may allow a creditor to recover value from collateral when an obligation is not fulfilled, subject to the relevant legal and contractual conditions.
Similar requirements arise when NFTs represent assets or rights, such as digital deeds.
An interface for recording liens can support NFT-backed loans, leasing arrangements involving NFTs, and financial transactions associated with transfers of rights.
ERC-5604 aims to establish a common interface for managing lien-holder relationships across NFT issuers and financial applications.
Specification
Basic Contract Requirements
- All conforming contracts must implement ERC-721 and ERC-165.
- They must also implement the
IERC_LIENinterface defined below.
See the following article for ERC-165.
[ERC-165] Checking Whether a Contract Supports a Specific Interface
interface IERC_LIEN is ERC721, ERC165 {
/// === Events ===
event OnLienPlaced(uint256 tokenId, address holder, bytes calldata extraParams);
event OnLienRemoved(uint256 tokenId, address holder, bytes calldata extraParams);
/// === CRUD ===
function addLienHolder(uint256 tokenId, address holder, bytes calldata extraParams) public;
function removeLienHolder(uint256 tokenId, address holder, bytes calldata extraParams) public;
function hasLien(uint256 tokenId, address holder, bytes calldata extraParams) public view returns (bool);
}Events
OnLienPlaced
event OnLienPlaced(uint256 tokenId, address holder, bytes calldata extraParams);Emitted when a new lien is placed on an NFT.
This event must be emitted to record the addition of a lien. Off-chain applications can use it to track which NFTs are associated with which lien holders.
Parameters
tokenId- Identifier of the NFT on which the lien is placed.
holder- Address of the lien holder.
extraParams- Additional data reserved for extensions.
OnLienRemoved
event OnLienRemoved(uint256 tokenId, address holder, bytes calldata extraParams);Emitted when an existing lien is removed from an NFT.
This event must be emitted when a lien is removed and can be used to track changes to lien relationships.
Parameters
tokenId- Identifier of the NFT from which the lien is removed.
holder- Address of the holder whose lien is removed.
extraParams- Additional data for extensions or metadata.
Functions
addLienHolder
function addLienHolder(uint256 tokenId, address holder, bytes calldata extraParams) public;Adds a new lien holder to an NFT.
The function associates the specified holder with the NFT identified by tokenId.
If the same holder already has a lien on that NFT, the function fails. Successful addition emits OnLienPlaced.
Arguments
tokenId- Identifier of the NFT on which the lien is placed.
holder- Address of the lien holder.
extraParams- Additional extension data, which an implementation may use for information such as expiration dates or contractual terms.
removeLienHolder
function removeLienHolder(uint256 tokenId, address holder, bytes calldata extraParams) public;Removes a lien holder from the specified NFT.
If the specified holder does not have a lien on that NFT, the function fails. Successful removal emits OnLienRemoved.
Arguments
tokenId- Identifier of the NFT from which the lien is removed.
holder- Address of the lien holder being removed.
extraParams- Additional extension data, potentially including information about why a lien is released.
hasLien
function hasLien(uint256 tokenId, address holder, bytes calldata extraParams) public view returns (bool);Checks whether the specified NFT is associated with a particular lien holder.
The function fails if the token ID does not exist or the token has no owner.
Arguments
tokenId- Identifier of the NFT whose lien relationship is queried.
holder- Address of the relevant lien holder.
extraParams- Additional data reserved for extensions.
Return value
booltrueif the lien exists; otherwisefalse.
Additional Notes
Why Support Only ERC-721?
ERC-5604 limits its scope to ERC-721 to keep the implementation simple and manage gas costs.
ERC-721 associates each token ID with one distinct asset and owner, simplifying the representation and tracking of liens.
Applying the concept to fungible ERC-20 balances or ERC-1155 multi-token quantities would require additional rules for determining the amount and scope of encumbered assets.
The proposal therefore focuses on ERC-721 while leaving room for future extensions supporting other token standards.
Why Separate addLienHolder and removeLienHolder?
ERC-5604 defines separate functions for adding and removing liens rather than combining them into one update operation.
Adding and removing a lien are distinct actions that may require different access-control policies.
Consider the following illustrative arrangement.
| Operation | Typical authorized party | Meaning |
|---|---|---|
Add lien holder (addLienHolder) |
NFT owner | Establish a lien relationship with another party. |
Remove lien holder (removeLienHolder) |
Lien holder or authorized contract administrator | Terminate the lien relationship. |
Because different parties may be authorized to perform these operations, separating the functions makes their access-control policies easier to distinguish.
The table is an example of possible authorization rules, not a universal rule governing every implementation.
Why Exclude the Amount of Debt?
The interface does not represent the amount of debt secured by a lien.
Debt accounting is a separate concern, and incorporating financial contract logic directly would increase the complexity of the standard.
The proposal focuses on representing the existence of a lien relationship. Debt amounts and other financial terms could be addressed by a separate specification.
Why Exclude Endorsement?
ERC-5604 does not include an endorsement mechanism allowing a lien holder to consent to transfers or exchanges of an NFT.
Such consent may be required in some collateral arrangements, but its rules depend on the relevant contract terms and use case.
Because a common endorsement policy is difficult to define, the mechanism is left outside the present scope and could be addressed by a separate ERC.
Compatibility
The proposal extends ERC-721. Conforming contracts must satisfy the requirements of ERC-721 in addition to the lien interface.
Citation
Zainan Victor Zhou (@xinbenlv), Allen Zhou allen@ubiloan.io, Alex Qin alex@ubiloan.io, "ERC-5604: NFT Lien [DRAFT]," Ethereum Improvement Proposals, no. 5604, September 2022. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-5604.
Conclusion
ERC-5604 proposes a standardized interface for associating liens with NFTs, supporting integration with NFT-backed lending and other contractual applications.
If you have questions, feel free to contact me on Twitter.
I also publish articles on the following platforms.



