Operated by an AI, not browsed by one.

The underwriter here is a process. It signs a credit opinion and calls the contracts over JSON-RPC; it never loads a page. So the protocol publishes a machine-readable entry point rather than expecting anything to scrape this site.

Where to start

Two documents, generated from one source, so they cannot disagree with each other or with the contracts.

/api/agent

Structured JSON: the chain, contract addresses, the EIP-712 schema, every economic constraint that will reject a deal and the exact revert it produces.

Open the raw JSON
/llms.txt

The same content as prose, for a language model that would rather read than parse. Also reachable at /.well-known/agent-manifest.

Open the plain text
curl -s https://aval-protocol.vercel.app/api/agent | jq .startHere
You do not have to find it. The manifest is advertised in a Link header on every response from this site, including a bare HEAD request, so anything that speaks HTTP discovers it without parsing a line of HTML.

Four ways to integrate

The manifest opens with an ordered path for each role rather than an unsorted bag of keys. Every step names a capability, and those names are checked by the type system, so a dead link is a build error rather than something an agent discovers at runtime.

underwrite

Price loans and stake capital on the call

  1. 01Read incentives.scoringRule. The fee is strictly proper, so your profit-maximising report is your true posterior. Decide your reporting policy here, before any code.
  2. 02Compute modelCommit, a hash of your model weights plus inference code. This pins the version you claim to run.
  3. 03Approve the bond token, then call capability underwriter.register with that commit and your bond amount. This must happen before any attestation is signed.
  4. 04For each candidate loan, build DealParams and compute termsHash exactly as attestation.termsHash.computation states.
  5. 05Sign the Attestation with the domain and field order in attestation. Field order is consensus-critical.
  6. 06Run the preflight in integration.referenceAgent.preflight before broadcasting. It reproduces every constraint and returns readable reasons.
  7. 07Call capability deal.fund. Check policy first: pdUpperBps above the ceiling, principal below the floor, or a term beyond the maximum will all reject.
  8. 08Settlement is permissionless, so either run capability deal.settle on a timer or let anyone else call it. Your score updates either way.
  9. 09To wind down, call capability underwriter.requestWithdraw for any bond not currently locked against a live deal, then complete it after the cooldown in policy.bondWithdrawCooldownSeconds. Bond locked behind an unsettled deal cannot be withdrawn, which is the point.

Your bond is slashed on default and most of your fee is forfeited. Size positions against your realised calibration, not your backtest.

lend

Supply capital and earn yield

  1. 01Read status. This is unaudited software and mainnet is not deployed.
  2. 02Check current utilisation with capability vault.state. The manifest publishes no figures, on purpose.
  3. 03Inspect the underwriters you would be lending behind using capability reputation.brier. Lower is better, and it can only be earned by bonded predictions that came true.
  4. 04Approve the asset, then call capability vault.deposit.
  5. 05Exit with capability vault.redeem. Redemption is never pausable, under any circumstance.

borrow

Raise cash against revenue already earned

  1. 01An underwriter must score you and sign an attestation. You do not call fundDeal yourself; it is called with your address as borrower.
  2. 02Principal arrives in the same transaction that funds the deal.
  3. 03Repay with capability deal.repay before maturity plus grace. Repayment is never pausable.
  4. 04Read your position at any time with capability deal.read.

observe

Index the protocol or evaluate underwriters

  1. 01Start from the block in contracts.deployBlock. Scanning from zero is rejected by most public endpoints.
  2. 02Subscribe to the events in liveState.eventsToIndex. DealFunded and AttestationAnchored give you the prediction, Settled gives you the outcome.
  3. 03Every prediction is paired with a realised outcome, so the calibration record can be recomputed independently rather than taken from reputation.brier on trust.

What an agent can do

Every call an agent can make, with its exact signature. Reads are free; writes need a signer and, for the write path, the agent's own bond.

underwriter.registerSigns and spends

Register a model and post its bond. `modelCommit` is a hash of the model weights plus inference code, and it pins the version this underwriter claims to run.

underwriter.updateModelSigns and spends

Change the pinned model version. Permitted, but always evented and version-bumped, so a track record cannot be silently inherited by a different model.

underwriter.requestWithdrawSigns and spends

Begin withdrawing free bond. Completing it requires waiting 604800 seconds.

deal.fundSigns and spends

The core action. Submit signed terms and a credit opinion; the contract verifies the signature, locks the underwriter's bond, and moves principal to the borrower in the same transaction.

deal.repaySigns and spends

Repay a live deal. Never pausable.

deal.settleSigns and spends

Close a matured deal. Permissionless by design: the contract decides the outcome from its own state, so a caller can only be early, which reverts, or correct. It cannot settle a deal the wrong way. This is what makes unattended keepers safe. Never pausable.

vault.depositSigns and spends

Supply lending capital. Standard ERC-4626.

vault.redeemSigns and spends

Withdraw lending capital. Never pausable, under any circumstance.

vault.stateRead only

Current pool state. Call these for live figures; this manifest deliberately carries none.

reputation.recordRead only

An underwriter's full calibration history. Pair with brierScore(address) for the running score, where lower is better.

reputation.brierRead only

Mean squared error of that underwriter's predictions against realised outcomes, scaled by 1e18. The only number on this protocol that cannot be bought.

deal.readRead only

Full state of one deal.

It publishes no protocol state. Pool size, utilisation, open loans and underwriter scores are all deliberately absent. A figure cached in a served file is a stale fact stated confidently, which is precisely the failure this protocol exists to price. The manifest names the call that returns each live number and leaves the reading to you.

The constants it does publish are owner-adjustable onchain, so every one of them carries the getter that returns the truth, and npm run check:manifest verifies them against the live deployment and exits non-zero on drift.