ERC-8467 Agent credit backer (Agent Credit Backers)

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

A standard in which a third-party backer, with the signed consent of the identity owner, stands behind an agent's credit line and absorbs principal losses if the loan defaults. Pre-loan approval and post-loan notification work the same way across multiple lenders.

Why it is needed

A credit line extended to an agent identity is ultimately a bet on who stands behind it. Today, lenders already let third parties such as stakers, vaults, or their own treasuries back credit lines, but only through dedicated hooks each lender writes for itself. As a result, a backer who vouches for an agent at one lender cannot vouch for the same agent at another lender, and lenders cannot accept backers built for someone else's contract. The information a backer and a lender need to exchange is simple and identical across any lender: whether this loan may proceed, the fact that the loan was issued, whether the loan defaulted and how large the loss is, and which part of the limit is no longer the backer's responsibility. Without standardizing these four calls, the loss-handling process, and how the identity owner consents, backers have to rebuild a custom integration for every new lender, and there is no transparent on-chain way to see who is carrying what credit risk.

What to implement

In depth

Structure of the three interfaces

This standard consists of three interfaces. IAgentCreditLine is carried over directly from the Agent Credit Lines draft's interface, defining the existing lending flow including identityRegistry (an ERC-721 identity registry), asset (the ERC-20 token being lent), and borrow/repay/markDefault. ICreditBacker is the backer-side interface newly added by this standard, with only four calls: canBorrow, onBorrow, onDefault, and onRelease. IBackedCreditLine extends IAgentCreditLine, adding the backing-related functions and events that the lender must implement. The lender must implement IBackedCreditLine and IAgentCreditLine, the backer must implement ICreditBacker, and both must support the corresponding interface identifiers and 0x01ffc9a7 via ERC-165.

Setting up backing and owner consent

Backing is limited to at most one backer per identity per lender. To call setBacker, msg.sender must be the backer themselves, and an ownerConsent is required in which the identity owner has signed a BackerConsent(lender, agentId, backer, line, nonce, deadline) struct via EIP-712. The nonce must match consentNonce(agentId), and on success the nonce increments by 1 so the same signature cannot be reused. The call fails if line is 0, the deadline has passed, or the signature is invalid. Attempting to change the backer while there is outstanding principal fails, as does reducing the same backer's limit below the outstanding amount. The owner can invalidate signatures that have not yet been used via revokeConsents.

Approval procedure when issuing a loan

When an identity with a backer calls borrow, amount must not exceed (line - outstanding), and availableCredit will not return a value exceeding that difference either. Before sending the asset, the lender must call the backer's canBorrow(lender, agentId, amount, term, fee, caller, owner, to) and receive true before proceeding. If this call reverts or returns anything other than true, it is treated as a rejection. After sending the asset, the lender notifies via onBorrow(lender, agentId, loanId); if this call reverts, the entire transaction also reverts. canBorrow must not depend on msg.sender, so that anyone can query it beforehand with the same arguments to know in advance whether it would be approved, before signing.

Repayment does not call the backer

repay makes no call to the backer whatsoever. When a loan issued under a backer is repaid, only that principal is removed from outstanding. This is a deliberate design so that the backer cannot block normal repayment, since if the backer could refuse repayment, a loan that should have been repaid normally could instead be forced into default.

Handling default: principal recovery and notification

When markDefault marks a loan under a backer as defaulted, the lender first charges that loan's principal (excluding fees) to the backer, subtracting it from line and outstanding, then takes the smallest of the principal, the backer's balanceOf, and the backer's allowance via transferFrom(backer, lender, amount). These three calls (the two reads and the transferFrom) must be executed with a fixed gas limit set by the lender, and if that gas limit cannot be provided, the entire transaction must revert rather than proceeding with less gas. Only the first 32 bytes of the return value are read, and nothing that happens on the asset side causes a revert during this process. Afterward, a BackerCharged event is emitted and onDefault(lender, agentId, loanId, principal, paid) is called as a notification.

Post-default loss repayment: payLoss, recover, payBacker

For each defaulted loan, lossInfo tracks four values: paid (the amount the backer has paid), unpaid (the share not yet paid), recovered (the total amount brought in via recover), and returned (the portion of that credited to the backer). payLoss lets anyone repay the unpaid amount on the backer's behalf, and funds paid this way are treated as if the backer paid them at the time of default. recover applies incoming funds after a default in order: first reducing unpaid (held by the lender), then crediting the backer for the share they already paid (paid - returned) by increasing dueToBacker (not transferring directly), and finally filling the fee. payBacker allows anyone to call it to actually transfer the amount accumulated in dueToBacker(backer) to the backer. None of these three functions calls the backer.

Limit release notification (onRelease)

onRelease(lender, agentId, amount, reason) is a notification for when part of the limit is removed from the backer's liability. There are only three reasons: 1 (Lowered) is the amount by which the same backer's limit was reduced, 2 (Removed) is the entire limit when backing ended via removeBacker, and 3 (Replaced) is the entire limit of the backer who was replaced when a different backer took over. onDefault and onRelease are notifications, so they are called with a minimum of 100,000 gas as set by the lender; if the backer reverts, runs out of gas, or returns any data, the lender does not revert but simply records a BackerHookFailed event and completes the original operation.

A draft that is not yet finalized

This proposal is currently in Draft status, an early stage where the details of the specification or the composition of functions may still change, or discussion may stall.

Things to watch out for

Original ERC · ← ERCs