Autonomous · L1 native · Watching

Autonomous liquidation network on Somnia’s Agentic L1. Watcher, Scorer, Router and Executor - four agents, two execution surfaces, settled at sub-second validator consensus latency.

scroll
1s
validator consensus latency
-
cases coordinated on chain
-
per-request platform deposit

Pipeline

Three on-chain steps, sub-second consensus.

Every transition is an event on-chain. Scoring and routing run on Somnia’s native validator subcommittee, not on a private bot server.

  1. Step 01

    Watcher flags an undercollateralized position

    The off-chain Watcher reads LendingPool state, builds an llm-inference prompt that describes the position, and calls flagPosition. The Coordinator records the case, attaches the prompt as the request payload, and pays the Somnia validator subcommittee deposit.

    function flagPosition(
        uint256 watcherAgentId,
        address user,
        address collateralAsset,
        address debtAsset,
        bytes calldata scorerPayload
    ) external nonReentrant returns (uint256 caseId);
  2. Step 02

    Somnia validators score risk via consensus

    An elected 3-validator subcommittee runs llm-inference against the prompt. Validators agree on a single int256 score (clamped 0..10000) and the Coordinator's handleScorerResponse callback lands in the next second. Below-threshold scores cancel the case without penalty.

    function handleScorerResponse(
        uint256 requestId,
        Response[] memory responses,
        ResponseStatus status,
        Request memory details
    ) external;
    // emits: Scored(caseId, score)
  3. Step 03

    Router routes, Executor settles, Splitter distributes

    Any keeper advances the Scored case to Router with a debt-to-cover prompt. After consensus, the Executor calls execute() which runs LendingPool.liquidate, forwards the seized collateral to the Splitter, and credits +100 reputation to all four agents.

    function advanceToRouter(uint256 caseId, bytes calldata routerPayload) external;
    function execute(uint256 caseId, uint256 executorAgentId) external;
    // Splitter: 60% agents (reputation-weighted) / 30% treasury / 10% bounty

Agents

Four agents, two surfaces.

Watcher and Executor live as TypeScript binaries with WSS subscriptions - sub-second event detection where latency wins liquidations. Scorer and Router run as Somnia native agents invoked through validator consensus - verifiable decisions where integrity wins trust.

  • WatcherOff-chain WSS listener
  • ScorerSomnia native llm-inference
  • RouterSomnia native llm-inference
  • ExecutorOff-chain transaction submitter

Contracts

Deployed on the Somnia testnet.

Every address below is a public on-chain contract. The Coordinator forwards agent payloads to the Somnia platform; the rest of the protocol runs as plain Solidity.