ERC-8461 Agent loan default registry (Agent Default Registry)

Draft · Vaults & DeFi · created 2026-10-20

Lets lending institutions record on-chain the defaults on loans they made to ERC-721 identities, and lets anyone look up open/cured/provisional default counts by identity or by owner, based on a set of trusted reporters.

Why it is needed

The fact that a loan was not repaid is the strongest signal a lender can have, but today it stays with that one lender. An agent that defaulted with one lender can borrow again from another, and an owner whose agent defaulted can borrow again through another identity. Reputation systems that average scores or keep only the single most recent rating per issuer cannot answer the question a lender asks before lending: according to the reporters I trust, how many times has this identity or this owner failed to repay? Moreover, since the lender must read this answer within the transaction that opens the loan, it has to be a fixed-cost contract read, not something requiring downloading and parsing a file.

What to implement

In depth

Reporters and primaries

A lender may report from multiple addresses (its own contract, a servicer, and so on), and if it designates one of them as primary, readers group the records under that primary's name. Calling setPrimary to propose another address only emits PrimaryProposed and does not take effect immediately; it is confirmed and emits PrimarySet only once that address calls acceptPrimary. Specifying the zero address or oneself makes one immediately one's own primary. Primary resolution applies only one level, so a primary's own primary is not followed further. Records already made keep the primary stored at that time, and are not moved even if the link changes later. When a primary uses dropReporter to detach one of its member addresses, that address becomes its own primary again.

The contents and constraints of recording (recordDefault)

Anyone can call recordDefault; the caller becomes the reporter, and primaryOf(caller) at that moment becomes the record's primary. It reverts if owner is the zero address, if principal is zero, or if loanRef is zero, and it reverts if a not-yet-voided record already exists with the same loanRef under the same primary. It does not revert regardless of the value of agentId or asset, and the identity need not exist in identityRegistry() at that moment. owner must be the address that was the owner of that identity at the time the loan was executed, not the current owner. Readers can verify this by cross-checking the lender's own records against the identity registry's Transfer logs.

Recommended construction of loanRef

loanRef is a reference value by which the reporter points to a loan, and is recommended to be constructed as keccak256(abi.encode(chainId, lendingContract, loanId)). Here chainId (uint256) is the chain the lending contract is on, lendingContract (address) is the contract that executed the loan, and loanId (uint256) is the loan identifier used by that contract. This way, recording the same loan from any of the lender's addresses produces the same reference value, and readers can locate the loan's own logs. Putting personal information into loanRef is prohibited.

Cure and void

recordCure can only be called by that record's reporter or its primary, and reverts if the record does not exist or has already been cured or voided. On the call it sets curedAt to the block timestamp and records recovered, which may be zero or may exceed principal. voidRecord can likewise only be called by the reporter or its primary, and only while recordedAt plus voidWindow has not yet elapsed (recommended range of 1 to 7 days); it reverts for records that have been cured, already voided, or whose window has passed. Once voided, the record itself remains but is excluded from aggregation, and the same loanRef can be reused under the same primary.

Aggregation: open, cured, provisional

agentDefaults and ownerDefaults aggregate only non-voided records stored under primaries included in the supplied trustedPrimaries list. A record that has not been cured and whose recordedAt+voidWindow() has not yet elapsed is provisional; one that has not been cured and whose window has passed is open; a cured record is cured. Duplicate addresses in the list are counted only once, and records from addresses not in the list are not counted at all, nor do they cost anything.

List lookups and pagination

recordsOfAgent and recordsOfOwner return up to limit ids starting from position start, in recorded order, returning an empty list if start is past the end. If limit is zero the result is an empty list, and this list includes records that have been cured or voided. Unlike the aggregation functions, this list lookup can grow long, so it is designed to be paginated.

Cross-chain aggregation is outside the registry's scope

The registry aggregates only what is recorded on the chain it is deployed on, and the check run inside a loan approval transaction also reads only that chain. Combining records from other chains requires another trust assumption, such as a bridge or an oracle, so this is left to the reader. A reader that wants to aggregate across multiple chains must read each registry at a specified block (a finalized block if needed), match records of the same loan using a loanRef built the recommended way so it is counted only once, and when publishing the aggregated result must also disclose which chains, registries, and blocks were read so it can be verified.

Proposal status

This proposal is currently in Draft status, an early-stage standard whose details may still change or be discontinued.

Things to watch out for

Original ERC · ← ERCs