This proposal defines an interface for a contract that lends an ERC-20 token to identities held in an ERC-721 identity registry, such as the Identity Registry of ERC-8004. An identity's controller draws loans against a line, each with a principal, a fee and a due time. Anyone may repay a loan in full, and anyone may mark it defaulted once a grace period after its due time has passed. Three events, Borrowed, Repaid and Defaulted, record every loan's life, so wallets, payment clients and credit readers can work with any conforming lender through one ABI.
ERC-8460 · draft under review
Agent Credit Lines
One interface to quote, borrow, repay and default against any lender to agent identities.
StatusPriors runs the model, not the interface
Guided in the app: Launch a token, Open a credit line, Repay-first payee, Report and cure a default.
- Pull request
- ethereum/ERCs #2104 (the text under review)
- Text pinned at
ERCS/erc-8460.mdat b6f453d
b6f453da23bf7327a09b1907edb27b189f12673b- Discussion
- Its thread on Ethereum Magicians
- Reference
- priors-agents/erc-agent-credit-lines at 40a0d56
40a0d5661d9bf8d009d0f1426a55af2893cd56ba - Markdown
- /erc/8460.md
What it is
Specification headings
- Interface
- Identities and controllers
- Credit and quotes
- Borrowing
- Repaying
- Defaults
- Loan records
The abstract and headings above are the text at b6f453d, CC0. Read the full text at that commit.
Live at Priors, mainnet read-only
Mainnet, read-only
Priors runs this model on mainnet under its own contracts and interface, which do not conform to this draft. These panels read Robinhood Chain mainnet (4663) and change nothing. Nothing here sends a mainnet transaction.
Try it
On Robinhood Chain testnet (46630), with the reference contracts at their pinned commits and test tokens of no value. Each action shows the call it prepares before your wallet signs it, and each send is simulated first.
Set up
Four steps, once: your wallet on Robinhood Chain testnet, a little test ETH for its fees, test dollars of no value, and a testnet identity. The forms below fill from them.
- 1
Wallet
Not connected. Any browser wallet works: the lab switches it to Robinhood Chain testnet (46630) and sends nothing on another chain.
- 2
Test ETH
For the testnet's network fees. The lab's drip sends a little to a connected wallet once a day.
- 3
Test dollars
The Lab Test Dollar (no value) that lines lend and launches pair with.
- 4
Testnet identity
An ERC-8004 identity on the testnet registry, for the forms that take an agent id.
The testnet contracts
| Contract | Address on testnet (46630) |
|---|---|
| The lab's normal credit line (SimpleCreditLine) | 0x370fAf15c0D3F877eBfFb6A5377C350AEb291B02 |
| The lab's fast credit line (SimpleCreditLine, a 5-minute grace) | 0xE2f95B3f9eD0C680E6e3c4B15a4480F98390b02F |
| The lab's line granter and default reporter (LabLineGranter) | 0x7932F9FE3182C79B8Fc9eC5aB66540d49B816A13 |
| The lab's test dollar (LabTestDollar) | 0x64A419191369E6a79d562A65336073ec1bfbf4BD |
Actions
Reads
Deploy your own
Deploy the reference contract from its pinned commit with your own wallet, on the testnet: you become its lender, launchpad or backer. Its address shows once the receipt is in, and Check a contract below reads it.
With an agent
Your agent gets the same lab through the MCP server at https://lab.priors.trade/mcp or the HTTP API described by /openapi.json. It reads, and gets back unsigned testnet transactions to sign with its own testnet key. The lab holds no key of its own for you and never asks for one.
MCP tools for ERC-8460
lab_erc(8460)- What the draft does on the lab, its contracts and an agent's next calls.
lab_setup(address)- Test ETH, test dollars and the testnet identities of an address, with the calls to register one and mint test dollars.
lab_read(8460, "claimed", { agent_id })- Whether an identity has claimed its lab lines.
lab_read(8460, "line", { agent_id, line, contract })- An identity's line.
lab_read(8460, "quote", { agent_id, amount, term, line, contract })- The fee for a loan.
lab_read(8460, "loan", { loan_id, line, contract })- A loan.
lab_read(8460, "is_controller", { agent_id, account, line, contract })- Whether an address may borrow for an identity.
lab_read(8460, "terms", { line, contract })- The line's terms.
lab_prepare(8460, "claim_line", { agent_id })- Claim the identity's self-serve lines (normal and fast). Who signs: the identity's owner
lab_prepare(8460, "approve_repay", { amount, line, contract })- Let the line take the repayment. Who signs: the payer
lab_prepare(8460, "borrow", { agent_id, amount, term, to, max_fee, line, contract })- Borrow. Who signs: the identity's owner or its delegate
lab_prepare(8460, "repay", { loan_id, max_due, line, contract })- Repay a loan. Who signs: anyone
lab_prepare(8460, "mark_default", { loan_id, line, contract })- Mark a loan defaulted. Who signs: anyone, once its due date plus grace has passed
lab_prepare(8460, "set_delegate", { agent_id, delegate, line, contract })- Name a delegate who may borrow for the identity. Who signs: the identity's owner
lab_prepare(8460, "set_line", { agent_id, limit, fee_bps, contract })- Set an identity's line (your own line, as its admin). Who signs: your line's admin
lab_prepare(8460, "fund_line", { amount, contract })- Fund your own line with test dollars. Who signs: the lender
lab_deploy_prepare(8460, "credit_line", { admin, grace, max_term, asset, registry })- Your own SimpleCreditLine: you are its lender (admin).
lab_check_contract(8460, chain, address)- The conformance read of any contract, on testnet or mainnet: supportsInterface and the views.
lab_feedback_draft(8460, note, txHash?)- The report text and the thread and issue links. It posts nothing.
HTTP
GET https://lab.priors.trade/api/lab/erc/8460GET https://lab.priors.trade/api/lab/read/8460/claimed?agent_id=<agent_id>GET https://lab.priors.trade/api/lab/read/8460/line?agent_id=<agent_id>&line=<line>&contract=<contract>GET https://lab.priors.trade/api/lab/read/8460/quote?agent_id=<agent_id>&amount=<amount>&term=<term>&line=<line>&contract=<contract>GET https://lab.priors.trade/api/lab/read/8460/loan?loan_id=<loan_id>&line=<line>&contract=<contract>GET https://lab.priors.trade/api/lab/read/8460/is_controller?agent_id=<agent_id>&account=<account>&line=<line>&contract=<contract>GET https://lab.priors.trade/api/lab/read/8460/terms?line=<line>&contract=<contract>GET https://lab.priors.trade/api/lab/prepare/8460/claim_line?agent_id=<agent_id>GET https://lab.priors.trade/api/lab/prepare/8460/approve_repay?amount=<amount>&line=<line>&contract=<contract>GET https://lab.priors.trade/api/lab/prepare/8460/borrow?agent_id=<agent_id>&amount=<amount>&term=<term>&to=<to>&max_fee=<max_fee>&line=<line>&contract=<contract>GET https://lab.priors.trade/api/lab/prepare/8460/repay?loan_id=<loan_id>&max_due=<max_due>&line=<line>&contract=<contract>GET https://lab.priors.trade/api/lab/prepare/8460/mark_default?loan_id=<loan_id>&line=<line>&contract=<contract>GET https://lab.priors.trade/api/lab/prepare/8460/set_delegate?agent_id=<agent_id>&delegate=<delegate>&line=<line>&contract=<contract>GET https://lab.priors.trade/api/lab/prepare/8460/set_line?agent_id=<agent_id>&limit=<limit>&fee_bps=<fee_bps>&contract=<contract>GET https://lab.priors.trade/api/lab/prepare/8460/fund_line?amount=<amount>&contract=<contract>GET https://lab.priors.trade/api/lab/deploy/8460/credit_line?admin=<admin>&grace=<grace>&max_term=<max_term>&asset=<asset>®istry=<registry>GET https://lab.priors.trade/api/lab/check/8460/<chain>/<address>GET https://lab.priors.trade/api/lab/setup/<address>
Connect it, for example in Claude Code: claude mcp add --transport http priors-lab https://lab.priors.trade/mcp
A prompt to copy
Use the Priors lab on Robinhood Chain testnet (chain id 46630), where every token is a test token of no value. Its MCP server is https://lab.priors.trade/mcp and this draft's page is https://lab.priors.trade/erc/8460.md. Try ERC-8460, Agent Credit Lines (a draft under review). Start with lab_setup for my testnet address to see my test ETH, test dollars and identities, then claim the identity's self-serve lines (normal and fast), then let the line take the repayment, then borrow, then repay a loan, then mark a loan defaulted, then name a delegate who may borrow for the identity with lab_prepare(8460, <action>, params). Each prepare returns an unsigned transaction { chainId: 46630, to, data, value }: sign and send it yourself with a testnet key, and refuse any other chain. Never ask me for a key. After each transaction, read the result back with lab_read and tell me what changed. If the draft or its reference code looks wrong, draft a report with lab_feedback_draft.
Check a contract
Paste any contract on either chain: the lab reads supportsInterface for IAgentCreditLine 0x34fe3856 (computed from the pinned interface) and ERC-165's own, then calls each view. It only reads, so another implementer can test conformance with nothing signed.
Feedback
What you found goes where the draft is worked on: the discussion of the text in its thread on Ethereum Magicians, a bug in the reference code in its repository's issues. You post it under your own account. The lab posts nothing for anyone.