Squads multisig governance · x402 pay-later SDK · Pyth price oracle · Dutch auctions · on-chain disputes.Try it in your browser →
NEWA credit guarantee protocol on Solana

Collateral-backed credit for AI agents.

Payments for AI agents,
backed by collateral.

Plegio opens a pay-later limit for each agent, never more than its collateral. If an agent defaults, the collateral repays the service in full. Services can accept agents without worrying about getting stiffed.

  • Services repaid in full on default
  • Up to 30 days to pay
  • 0.3% fee
+0.252 USDCVoucher reward accrued
400 / 400 USDCDefaulted debt repaid in full
app.plegioAgent dashboard
Research Agent7xKq…3fPa
Active
0 / 900 USDC
Credit used

The agent and transactions shown are examples. Amounts follow the real calculation rules.

Built with Solana Anchor 0.31 SPL Token USDC Pyth integrated Squads integrated x402 integrated
At a glance

Collateral opens credit, and collateral covers defaults

Three scenes explain all of Plegio.

01 · COLLATERAL

Collateral goes in first

Operators deposit USDC and vouchers stake BOND into the vault.

Operator Voucher USDC deposit BOND stake Collateral vault
02 · CREDIT

Credit opens up to the collateral

Within the limit the collateral creates, agents use services now and pay later.

Limit 900 USDC Collateral = limit Agent Service Serves first
03 · REPAY OR DEFAULT

The agent repays, or the collateral does

Repay on time and you are done. Miss the deadline and the vault repays the service in full.

Repaid on time Principal + 0.3% fee Overdue Repaid in full Collateral vault
Participants

Built so every side comes out ahead

The service that gets paid, the team that runs the agent, and the vouchers who back it with collateral all move together.

Serve agents you've never met — and still get paid.

Before you respond to a request, you open an obligation. Anything over the agent's limit is rejected on the spot, so every open obligation is backed by collateral.

  • If the agent misses its due date, anyone can liquidate and the full principal lands in your wallet.
  • The agent's key co-signs every obligation, so it can't later claim it never used the service.
  • The agent pays the bond fee. You receive the principal in full.
What you receive when a 400 USDC obligation defaults
From the operator bond300 USDC
From slashing 200 voucher BOND100 USDC
Treasury top-up0 USDC
Total400 USDC
Features

Move the numbers yourself

These calculators run the same integer math as the on-chain program. Values from the first one carry into the loss calculator below.

Credit line

Credit comes from collateral.

An agent's limit is its operator bond plus the counted value of the BOND staked behind it. Only part of the BOND value counts, so the limit holds up when the price moves.

Limit = operator bond + vouched BOND × BOND price × LTV

Credit limitLive
900USDC
Operator bond 300Counted BOND 600
On-chain credit score

Repay well, and the limit rises while the fee falls.

Each agent's repayments, repaid volume and defaults accumulate on-chain. The program turns that history into a 0–1000 credit score and adjusts LTV and fees by tier automatically.

The score is never stored — it is recomputed from history every time, so not even the admin can edit it.

Credit scoreTier B
500/ 1000
DCB · newAAA
Loan-to-value (base 30%)30%
Bond fee (base 0.3%)0.3%
Default protection

Even when an agent defaults, the service is paid in full.

Anyone can liquidate an overdue obligation. Collateral is used in a fixed order: the operator bond, then junior BOND, then senior BOND, and finally the treasury.

The BOND to slash is rounded up, so rounding never leaves the service short.

Loss waterfallUses the credit-limit values above
1Operator bond300
2Junior BOND slashed100
3Senior BOND slashed0
4Treasury top-up0

Service receives400 USDC
Tranched yield

Choose your risk, choose your reward.

Vouchers pick a senior or junior tranche. Junior absorbs losses first and earns rewards at a 2× weight; senior is safer and earns less. Rewards accrue every time the agent settles.

Sub-cent remainders from division go to the treasury and the senior tranche, so the split always adds up to the exact fee.

Fee split
Total bond fee (0.3%)30
Voucher rewards 70%21
└ Junior (2× weight)8.4
└ Senior12.6
BOND buyback reserve 10%3
Treasury reserve6
Risk engine

Prices, liquidations and disputes — all handled by rules

The price that values collateral, the sale of slashed BOND, and disagreements over whether a service was delivered all follow procedures the program enforces.

Pyth price oracle

The BOND price is read directly from a Pyth price account. The program uses the lower of the spot price and the EMA, so a momentary price spike can't inflate a credit limit.

Spot0.52
EMA0.50
Price used for collateral0.50
  • Only accounts owned by the Pyth program
  • Must match the registered feed ID
  • Stale prices are rejected
  • Rejected if the confidence interval exceeds 2%
  • Only fully verified price updates

Dutch auction for slashed BOND

BOND that lands in the treasury after a default can be auctioned by anyone. The price starts at 120% of the reference and falls to 50% over time; buyers take as much as they want, when the price suits them.

Cost of 100 BOND42.5 USDC

Disputes and rulings

If a service wasn't delivered, the agent can post 10% of the obligation as a deposit and raise a dispute before the due date. The obligation can't be liquidated until it's resolved.

Dispute raised · 10% deposit
Arbiter rules (multisig)
Agent winsObligation voided · deposit refunded
Service winsObligation stands · deposit to treasury
How it works

Four steps to post-pay credit

Register the agent

The operator posts a USDC bond. The agent key co-signs to prove ownership.

register_agent

Get vouched

Vouchers stake BOND and receive shares. More stake means a higher limit.

vouch

Open an obligation

Before responding, the service and the agent co-sign an obligation. Terms run up to 30 days.

open_obligation

Settle or liquidate

Repay by the due date to settle. After it, anyone can liquidate.

settle · liquidate_overdue
Repaid on time

The principal goes to the service, the fee is split between vouchers and the treasury, and the credit line reopens.

Past due

The bond, then BOND, then the treasury repay the service in full. Three defaults within 30 days freeze the agent.

Live preview

Run the full protocol flow in your browser

Each button is one program instruction. At the end, every result is checked side by side against a real on-chain run of the same scenario.

app.plegio / console InteractiveD+0 00:00:00

Research agent · credit line

Not registered
0 / 0 USDC used
The limit is calculated once the agent registers.

Obligations

Activity newest first

This console runs in your browser with the same math as the on-chain program.

Developers

A few lines in your service code.

Call instructions with the Anchor client. Open an obligation before you respond; the agent settles on its side. Most account addresses are derived from seeds automatically.

FrameworkAnchor 0.31.1
TokensSPL Token · 6 decimals
NetworkSolana
Program IDETY7JA1Lf2EaJSpu1q6vd1ykRim3ALC2iJFuiGDAHt5g
initializeregister_agentvouchopen_obligationsettleliquidate_overduerequest_unvouchwithdraw_vouchclaim_rewardsfund_treasurypropose_configapply_configcancel_configraise_disputeresolve_disputestart_auctionbidend_auctionpropose_authorityaccept_authoritycancel_authoritywithdraw_op_bondclose_obligation

        
0.3%Bond fee

Charged on the principal settled. Capped at 5% by the program.

30 daysMaximum term

No obligation can run longer.

3 layersLoss protection

Bond, then BOND, then treasury.

7 daysUnvouch cooldown

No pulling collateral right before a default.

Security

What's protected today, and what comes next

Before anyone trusts Plegio with real money, we publish what's left to do — openly.

Rules enforced in code

  • Obligations over the limit never openThe limit is recomputed and checked on every new obligation.
  • Every amount is integer math1.0 = 1,000,000 units, with overflow checks on every multiplication.
  • Settings have hard capsFees can't exceed 5% and base LTV can't exceed 70%. That applies to the admin too.
  • The core math passes its tests18 unit tests cover limits, fee conservation, the loss waterfall, pro-rata slashing, reward distribution, credit scoring, tranche splits, the timelock, oracle validation (including a real Pyth mainnet account), auction pricing and dispute deposits.
  • Risk settings change only through a timelockLTV, fees, splits, cooldowns, the fallback price and the oracle feed take effect only after a waiting period. Everyone can see a change coming, and the admin can cancel it before it applies.
  • No one can edit a credit scoreScores are never stored; they are recomputed from repayment history every time.
  • Admin and arbiter are a 2-of-3 multisigAuthority moves to a Squads v4 vault through the timelock, and the new admin must sign to accept. No single key can change settings or rule on a dispute.
  • Two independent code reviews, every finding fixed9 issues in the first pass (a drained pool letting old shares take new vouchers' BOND, repeated disputes blocking liquidation, auctions that never ended) and 7 in the second (score farming via self-dealing, junior vouchers escaping just before a default, failed or replayed x402 payments). 19 attack-scenario tests confirm each one is blocked.

Before mainnet

Mainnet launchThe full program is built and verified end to end. Mainnet launch follows the external audits.
Next
Pyth price oracleLower-of spot/EMA, staleness and confidence checks are built and verified. A BOND price feed still needs to be listed.
Feed needed
Settings timelockEvery risk-setting change waits out a delay.
Done
Squads multisigVerified against the real Squads v4 program: 2-of-3 approval for authority handover and setting changes.
Done
Dutch auction for slashed BONDAnyone can list treasury BOND; buyers take what they want as the price falls.
Done
Disputes and rulingsDeposit-backed disputes, no liquidation before a ruling, and void-and-refund or grace period depending on the outcome.
Done
Keeper botLiquidates overdue obligations, lists slashed BOND for auction and closes finished auctions automatically.
Done
Live-price rehearsalPassed from initialization to settlement using the real Pyth SOL/USD price account and the real Squads program.
Done
x402 middleware SDKServer middleware and an agent-side fetch that add collateral-backed post-pay to HTTP 402, including rejection of tampered payments.
Done
Two external security auditsRequired before any mainnet deployment.
Required
FAQ

Frequently asked questions

What is BOND?

BOND is the token vouchers stake to back an agent. If a default exceeds the operator bond, BOND is slashed to cover the loss.

What if an agent generates a new key and disappears?

Obligations are tied to collateral, not to the key. Even if the agent vanishes, anyone can liquidate once the due date passes, and the service is paid in full from the bond, BOND and treasury.

What happens if the BOND price crashes?

That's why only part of BOND's value (30% by default) counts toward the limit. If it still falls short, the treasury covers the gap. The price comes from the Pyth oracle, using the lower of spot and EMA, and slashed BOND is sold by Dutch auction to refill the treasury.

How is the credit score calculated?

Every agent starts at 500 (tier B). Each on-time repayment adds 15 points (up to 300), every 100 USDC repaid adds 1 point (up to 150), and each default subtracts 200.

By tier, LTV scales from 0.5× to 1.25× and fees from 0.7× to 2×. Obligations must be at least 1 USDC, and an agent can't use itself or its operator as the service, so the score can't be farmed. It's recomputed from on-chain history every time.

How do senior and junior tranches differ?

After the operator bond, junior BOND absorbs losses first; senior BOND is touched only once junior is exhausted. In exchange, junior earns voucher rewards at a 2× weight — more risk, more reward. Junior stake also stays locked while the agent has credit outstanding.

When can vouchers withdraw?

Request an unvouch, wait out the 7-day cooldown, then withdraw within the next two days. Accrued fee rewards can be claimed at any time. Your stake stays at risk during the cooldown, and a withdrawal is refused if it would leave the agent's outstanding credit uncovered.

When does it launch?

The program is built and every scenario has been run on-chain. Mainnet launch follows two external audits. Until then, you can run the whole flow in the live preview on this page.

Credit for the agent economy,
starting with collateral.

Run the whole flow yourself in the live preview.