ERC-2615 · Stagnant · ERC · 2020-04-25
ERC-2615: Non-Fungible Token with mortgage and rental functions
A stagnant ERC-721 extension that splits an NFT into Owner, User (tenant) and Lien Holder roles, so NFTs can be rented out or mortgaged without escrow or security deposits.
What problem does it solve?
ERC-721 has a single role: the owner. That makes two common real-world arrangements awkward:
- Renting. To let someone use an NFT you must transfer it to them, and then you depend on them giving it back. Trustless rental therefore needs a security deposit.
- Mortgaging. To borrow against an NFT you must lock it in a lending contract. While it is in escrow, apps that serve "the owner" no longer recognise you, so you lose the NFT's utility.
ERC-2615 adds extra roles directly into the token so both can be done without moving custody.
How it works
Each item has three roles:
| Role | Can transfer Owner role | Can transfer User role |
|---|---|---|
| Lien Holder | yes | yes |
| Owner | yes | yes |
| User (tenant) | no | yes |
Applications are expected to grant usage rights to the userOf(itemId), not to the owner.
- Lien: the owner calls
approveLien(lender, itemId); the lending contract then callssetLien(itemId). If the loan defaults, the lien holder can take over the Owner role.revokeLienends it. - Tenant right: the owner calls
approveTenantRight(rentalContract, itemId); the rental contract callssetTenantRight(itemId)and moves the User role to the tenant. While the tenant right is set, the owner cannot take the User role back; the rental contract can revoke it if rent is not paid. - Separate
safeTransferOwner/safeTransferUserfunctions, approvals for each role, andbalanceOfOwner/balanceOfUserqueries. - An optional ERC-721 compatibility extension:
transferFrommoves both roles if no tenant right is set, or only the Owner role if one is.
The standard itself moves no money. Loan and rent payments, deadlines and penalties live in external mortgage or rental contracts.
Sample code
A rental contract flow using the ERC-2615 interface (simplified, no payment logic):
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface IERC2615 {
function ownerOf(uint256 itemId) external view returns (address);
function userOf(uint256 itemId) external view returns (address);
function setTenantRight(uint256 itemId) external;
function revokeTenantRight(uint256 itemId) external;
function safeTransferUser(address from, address to, uint256 itemId) external;
}
contract SimpleRental {
IERC2615 public immutable nft;
constructor(IERC2615 _nft) { nft = _nft; }
// Owner must first call nft.approveTenantRight(address(this), itemId)
// and approve this contract for the User role.
function startRental(uint256 itemId, address tenant) external {
require(msg.sender == nft.ownerOf(itemId), "not owner");
nft.setTenantRight(itemId); // owner can no longer reclaim use
nft.safeTransferUser(msg.sender, tenant, itemId); // tenant now has usage rights
}
}
Things to know
- Status: Stagnant. It was not finalised and has little tooling support.
- For rentals, ERC-4907 (Final) is the widely used alternative: it adds a single
userrole with an expiry to ERC-721, without the lien concept. - Because the external mortgage/rental contract controls liens and tenant rights, bugs in that contract directly translate into lost rights, as the spec's security section notes.
- The receiver hook in the spec is named
onERCXReceived, matching the name of its reference implementation repository ("ERC-X").