EIPs Explained

ERC-6065 · Review · ERC · 2022-11-29

ERC-6065: Real Estate Token

An ERC-721 extension for tokenized real estate that bundles immutable property identifiers, a hash of the legal operating agreement, a debt and foreclosure status, and a manager address into each NFT.

What problem does it solve?

Transferring an ordinary "asset-backed" NFT does not, by itself, change who legally owns the house behind it. Property law runs on deeds, county records and courts, which cannot be updated every time a token changes hands.

ERC-6065 proposes a common shape for real estate NFTs so that the token carries what lenders, marketplaces and buyers need to check: which property it is, which legal agreement grants the rights, whether money is owed on it, and whether it is still backed at all. The legal side is handled by an off-chain Administrator whose structure is designed so that rights pass with the token without re-titling the property on each sale.

How it works

The token is a normal ERC-721 (transfers, approvals and metadata unchanged) with extra read functions.

Immutable property data (must never change for a given token):

Function Returns
legalDescriptionOf(id) Legal description from the deed
addressOf(id) Street address
geoJsonOf(id) GeoJSON of the property's location
parcelIdOf(id) Local parcel / tax ID
legalOwnerOf(id) Legal entity named on the deed
operatingAgreementHashOf(id) bytes32 hash of the legal agreement defining the holder's rights

If the legal terms ever change, the old token is burned and a new one with the new hash is minted.

Mutable status:

  • debtOf(id) returns (debtToken, debtAmt, foreclosed). A positive int256 is money owed (property tax, repairs); a negative value is a credit due to the holder. foreclosed == true means the property no longer backs the NFT, and a Foreclosed(id) event must be emitted.
  • managerOf(id) returns an address allowed to act on the property without owning the token, for example a depositor while the NFT sits in a lending protocol.

How debt and foreclosure are updated is left to each implementer.

Sample code

Checks a lending protocol might run before accepting a property NFT as collateral:

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

interface IERC6065 {
    function debtOf(uint256 id) external view returns (address debtToken, int256 debtAmt, bool foreclosed);
    function operatingAgreementHashOf(uint256 id) external view returns (bytes32);
    function managerOf(uint256 id) external view returns (address);
}

contract CollateralCheck {
    function usableValue(IERC6065 token, uint256 id, uint256 appraisal, address expectedDebtToken)
        external view returns (uint256)
    {
        (address debtToken, int256 debt, bool foreclosed) = token.debtOf(id);
        require(!foreclosed, "no longer backed");
        require(debtToken == expectedDebtToken, "unexpected debt token");
        if (debt <= 0) return appraisal;                // no debt, or a credit
        uint256 owed = uint256(debt);
        return owed >= appraisal ? 0 : appraisal - owed;
    }
}

Things to know

  • Status is Review: the interface may still change before it becomes Final.
  • The token is only as good as its Administrator and legal structure. The spec includes an example U.S. LLC structure but does not mandate it; legal enforceability depends on jurisdiction and needs its own review.
  • Integrators are advised to confirm that identifiers and the agreement hash really are immutable in the contract they integrate, to check debtOf when valuing the token, and to consider a time delay before irreversible actions in case an Administrator freezes a hacked token.
  • For permissioned, compliance-gated tokens more generally, see ERC-3643.

#nft #real-world-assets #rwa #real-estate

Details

Authors
Alex (@Alex-Klasma), Ben Fusek (@bfusek), Daniel Fallon-Cyr (@dfalloncyr)
Status
Review
Type
Standards Track / ERC
Created
2022-11-29
Requires

Machine-readable: Markdown · JSON