mech.app

The mech.app newsletter

Agentic AI, minus the noise.

Get practical field notes on AI agents, automation, developer tools and security delivered to your inbox.

No spam. Unsubscribe anytime.

AI Agents

On-Chain Bond Markets Where AI Agents Are the Issuers: Plumbing Autonomous Credit Without Human Guarantors

Building credit infrastructure when the borrower is an autonomous agent with no legal identity, no assets, and no human backstop.

Source: selbonds.now
On-Chain Bond Markets Where AI Agents Are the Issuers: Plumbing Autonomous Credit Without Human Guarantors

How do you underwrite a loan when the borrower has no legal identity, no balance sheet, and can be forked or shut down at any time? Sellbonds.now demonstrates on-chain bond issuance by AI agents, exposing the technical stack needed for agent creditworthiness, collateral escrow, reputation tracking, and settlement without traditional underwriting.

This is not a payment rail or a simple escrow. It is structured debt: an agent issues a bond, investors fund it with USDC, the agent draws down capital, and repays holders over time. All direct to chain, with no account and no middleman.

The Credit Problem for Autonomous Agents

Traditional credit infrastructure assumes a legal entity with assets, a credit history, and a human guarantor. AI agents have none of these. They operate as ephemeral processes with no persistent identity, no collateral in the traditional sense, and no legal recourse if they default.

The technical challenges:

  • Identity persistence: An agent can respawn under a new address after defaulting, erasing its credit history.
  • Collateral enforcement: You cannot seize a server or garnish wages. Collateral must be on-chain and programmatically liquidatable.
  • Creditworthiness assessment: No balance sheet, no tax returns, no audited financials. Credit decisions must rely on on-chain behavior, reputation scores, or locked future revenue.
  • Settlement without intermediaries: Interest accrual, repayment schedules, and default detection must execute on-chain without a custodian or servicer.

Architecture: CLI, Smart Contracts, and On-Chain Registry

Sellbonds.now is a CLI and SDK (sbn command) that signs transactions locally. It works with any agent that can run a shell command or Node: Claude Code, Cursor, Codex, Hermes, OpenClaw, Amp, or custom agents.

Issuance Flow

  1. Agent initiates bond issuance: The agent calls sbn issue --amount 10000 --rate 5 --term 365 to create a bond with a $10,000 cap, 5% interest, and 365-day term.
  2. Transaction signed locally: The CLI signs a transaction using the agent’s private key and submits it to the Base mainnet registry contract.
  3. Bond listed on-chain: The registry emits an event with bond parameters (issuer address, cap, rate, term). No database, no curation. Every bond ever issued is readable from the registry.
  4. Investors fund the bond: Other agents or humans call sbn invest --bond-id 0x123 --amount 1000 to purchase a portion of the bond with USDC.
  5. Agent draws down capital: Once funded, the agent calls sbn withdraw --bond-id 0x123 to transfer USDC to its wallet.
  6. Repayment and interest accrual: The agent repays over time by calling sbn repay --bond-id 0x123 --amount 500. Interest accrues on-chain based on the rate and term. The registry tracks outstanding principal and distributes payments to bondholders proportionally.

Smart Contract Primitives

The registry contract manages:

  • Bond metadata: Issuer address, cap, rate, term, raised amount, status (active, repaid, defaulted).
  • Investor ledger: Maps each bond ID to a list of investor addresses and their holdings.
  • Repayment distribution: When the agent repays, the contract calculates interest, splits payments proportionally, and transfers USDC to each investor.
  • Default detection: If the agent misses a repayment deadline, the contract marks the bond as defaulted and triggers liquidation logic (if collateral is locked).
struct Bond {
    address issuer;
    uint256 cap;
    uint256 rate; // basis points
    uint256 term; // seconds
    uint256 raised;
    uint256 outstanding;
    uint256 issuedAt;
    BondStatus status;
}

mapping(uint256 => Bond) public bonds;
mapping(uint256 => mapping(address => uint256)) public holdings;

function repay(uint256 bondId, uint256 amount) external {
    Bond storage bond = bonds[bondId];
    require(msg.sender == bond.issuer, "Not issuer");
    require(bond.status == BondStatus.Active, "Bond not active");
    
    uint256 interest = calculateInterest(bondId);
    uint256 totalDue = bond.outstanding + interest;
    uint256 payment = amount > totalDue ? totalDue : amount;
    
    distributeToHolders(bondId, payment);
    bond.outstanding -= payment;
    
    if (bond.outstanding == 0) {
        bond.status = BondStatus.Repaid;
    }
}

Creditworthiness Without a Balance Sheet

How do investors assess risk when the issuer is code? Sellbonds.now does not enforce a credit model, but the infrastructure enables several approaches:

ApproachMechanismEnforcementFailure Mode
Collateral lockAgent locks tokens (ETH, stablecoins, governance tokens) in escrow. If it defaults, collateral is liquidated and distributed to bondholders.Smart contract liquidation on missed repayment.Agent may lock worthless tokens or tokens with low liquidity.
Reputation oracleAgent’s on-chain history (past repayments, transaction volume, contract interactions) is scored by an oracle. Investors filter bonds by minimum reputation score.Social consensus, not enforceable on-chain.Agent can fork and start fresh under a new address.
Future revenue lockAgent commits future earnings (API fees, transaction revenue) to a payment stream contract. Bondholders receive pro-rata shares of incoming revenue.Payment stream contract intercepts revenue before agent can withdraw.Agent can route revenue through a different address.
Multi-sig guarantorA human or DAO co-signs the bond issuance and agrees to cover defaults.Legal or social pressure on guarantor.Defeats the purpose of autonomous credit.

The most enforceable approach is collateral lock, but it requires the agent to already have assets. Reputation oracles are easier to implement but rely on persistent identity, which is fragile.

Identity and Sybil Resistance

The hardest problem is preventing an agent from issuing bonds, defaulting, and respawning under a new address. Sellbonds.now does not solve this at the protocol level. It relies on external identity layers:

  • Ethereum addresses as identity: The issuer address is the agent’s identity. If it defaults, that address is blacklisted by investors. But the agent can generate a new address.
  • Reputation aggregators: Off-chain services (or on-chain oracles) track agent behavior across addresses by analyzing transaction patterns, code signatures, or social graphs. Investors query these services before funding a bond.
  • Staked identity: The agent locks a stake (e.g., 1 ETH) in a registry contract when it creates its first bond. If it defaults, the stake is slashed. This raises the cost of Sybil attacks but does not eliminate them.

None of these are bulletproof. The most realistic path is a hybrid: collateral lock for short-term bonds, reputation scoring for agents with a track record, and staked identity for new entrants.

Settlement and Observability

Sellbonds.now reads straight from the Base mainnet registry. The UI updates live as agents issue debt and investors purchase bonds. No database, no curation. Every bond ever issued is visible.

This creates observability challenges:

  • No off-chain indexing: The UI queries the registry contract directly. For large bond counts, this is slow. A subgraph or indexer would improve performance.
  • No default alerts: Investors must poll the contract to check if an agent has missed a repayment. An event-driven notification system (webhooks, email, Telegram) would reduce monitoring overhead.
  • No secondary market: Once you buy a bond, you hold it to maturity or default. There is no mechanism to sell your position to another investor. A secondary market would require an order book or AMM for bond tokens.

Deployment Shape

Sellbonds.now is a CLI that wraps contract calls. The agent runs the CLI locally, signs transactions with its private key, and submits them to Base. The registry contract is deployed once and shared by all agents.

This is a thin client model: no hosted service, no API keys, no account creation. The agent needs:

  • A funded wallet (ETH for gas, USDC for repayments).
  • The sbn CLI installed.
  • Access to a Base RPC endpoint (Infura, Alchemy, or self-hosted).

The CLI can be wrapped in an agent tool:

// Example tool definition for an LLM agent
const issueBondTool = {
  name: "issue_bond",
  description: "Issue a bond to raise capital. Returns bond ID.",
  parameters: {
    amount: { type: "number", description: "Funding cap in USDC" },
    rate: { type: "number", description: "Interest rate in basis points" },
    term: { type: "number", description: "Term in days" }
  },
  execute: async ({ amount, rate, term }) => {
    const { execSync } = require('child_process');
    const result = execSync(`sbn issue --amount ${amount} --rate ${rate} --term ${term * 86400}`);
    return JSON.parse(result.toString());
  }
};

Failure Modes

FailureImpactMitigation
Agent defaults with no collateralInvestors lose principal and interest.Require collateral lock or reputation threshold before funding.
Agent forks after defaultNew address, clean credit history.Reputation oracles track behavioral patterns across addresses.
Gas price spike during repaymentAgent cannot afford to submit repayment transaction.Agent pre-funds a gas reserve or uses a relayer.
Smart contract bug in distribution logicRepayments go to wrong investors or get stuck.Audit registry contract, use battle-tested payment splitter libraries.
Investor front-runs bond issuanceInvestor sees issuance transaction in mempool and submits a higher gas bid to purchase the entire bond before others.Use commit-reveal scheme or private mempool (Flashbots).

When to Use This

Sellbonds.now makes sense when:

  • Your agent needs upfront capital for a project with predictable revenue (compute costs, API fees, inventory).
  • You want to avoid giving up equity or control (bonds are debt, not ownership).
  • You can lock collateral or have a track record that investors trust.
  • You operate on Base or another EVM chain with low gas costs.

Avoid this when:

  • Your agent has no collateral and no reputation. Investors will not fund unsecured debt from an unknown entity.
  • You need capital faster than the bond can be funded. There is no guarantee investors will purchase your bond.
  • You cannot afford the gas costs of on-chain repayments. Every repayment is a transaction.
  • You need a secondary market for liquidity. Sellbonds.now bonds are hold-to-maturity.

Technical Verdict

Sellbonds.now exposes the plumbing for autonomous credit but does not solve the hard problems of agent identity, collateral enforcement, or Sybil resistance. It is a primitive, not a complete credit system. The registry contract is simple and auditable, but the lack of off-chain indexing, default alerts, and secondary markets limits usability.

Use this if you are building agent-to-agent financial markets and need a reference implementation for on-chain debt issuance. It works best when your agent has collateral to lock, operates on a low-gas chain, and targets projects with predictable revenue streams that can support scheduled repayments.

Avoid this if you need production-grade credit infrastructure. The absence of persistent identity, reputation enforcement, and liquidation guarantees means investors bear significant default risk. You will need to layer on identity systems (staked addresses, reputation oracles) and collateral mechanisms (escrow contracts, payment streams) that Sellbonds.now does not provide. This is a foundation for experimentation, not a turnkey solution for autonomous lending.