// veenoo.agent_
TECHNICAL REFERENCE · v0.1.0

Risk homeostasis
for autonomous Solana agents.

This page documents the code that is actually shipped with Veenoo: a dependency-free policy engine, deterministic decision commitments, and a simulation-first Solana execution boundary.

NETWORKSolana
POLICYRisk Homeostasis 0.1
TESTS8 passing
CA / PROGRAMTBA
Implementation status

The policy and execution-boundary modules below are real, importable code and their full tests are published beside them. No mainnet program address or token contract is claimed yet; those identifiers remain TBA. The engine can evaluate snapshots today, while transaction instructions must be supplied by the integrating Solana program or protocol.

01

System design

Four boundaries, one auditable decision.

01

Observe

Receive timestamped weights, returns, volatility, liquidity, drawdown and the SOL execution reserve.

→
02

Constrain

Reject malformed states, stale data, unsafe concentration and impossible allocation limits.

→
03

Decide

Measure pressure, select SEEK / BALANCE / DEFEND / DORMANT, then cap turnover and weights.

→
04

Execute

Commit the decision, sign a Solana transaction, simulate it, and only then broadcast and confirm.

CONTROL STATES
SEEK
Operating range is healthy; improve structure within the turnover budget.
BALANCE
Pressure is elevated; rebalance toward lower-risk and liquid assets.
DEFEND
Drawdown or aggregate pressure crossed a hard boundary; stable assets receive defensive priority.
DORMANT
Snapshot is stale or SOL reserve is too low; produce no orders and block RPC execution.
HARD INVARIANTS
  • Portfolio weights must sum to exactly 1 within 1e-6.
  • Each target is projected onto a capped probability simplex.
  • Total L1 turnover cannot exceed maxTurnover.
  • Low reserve or stale input always wins over opportunity.
  • Every decision can be chained with a SHA-256 commitment.
  • Simulation failure prevents transaction broadcast.
02

Contract

Small inputs. Explicit outputs.

SNAPSHOT INPUT
{
  timestampMs: number,
  reserveSol: number,
  drawdown: number,       // 0..1
  assets: [{
    symbol: string,
    weight: number,       // sum = 1
    return1d: number,
    volatility: number,
    liquidityUsd: number
  }]
}
DECISION OUTPUT
{
  policyVersion: string,
  mode: "SEEK" | "BALANCE" |
        "DEFEND" | "DORMANT",
  reasons: string[],
  pressure: number,
  turnover: number,
  targets: { symbol, weight }[],
  orders: { symbol, deltaWeight }[]
}
ExportPurposeRuntime
evaluatePolicy()Validates a snapshot and returns a bounded allocation decision.Synchronous
commitDecision()Hashes previous commitment + snapshot + decision using canonical JSON and SHA-256.Web Crypto
verifyDecisionCommitment()Recomputes and compares a published decision commitment.Web Crypto
simulateAndSend()Signs, simulates, broadcasts and confirms a web3.js-compatible Solana transaction.Async RPC
03

Live module

Run the published core in your browser.

The button imports /code/veenoo-core.mjs directly. The result below is generated by that module, not hard-coded into this page.

Raise drawdown above 12% to trigger DEFEND. Move reserve below 0.05 SOL to force DORMANT.

Loading policy module…
04

Integration

Use the modules without a build step.

curl -O https://veenoo.fun/code/veenoo-core.mjs
curl -O https://veenoo.fun/code/solana-executor.mjs
node --test veenoo-core.test.mjs solana-executor.test.mjs
MINIMAL USAGE
import { evaluatePolicy, commitDecision } from "./veenoo-core.mjs";
import { simulateAndSend } from "./solana-executor.mjs";

const decision = evaluatePolicy(snapshot, {
  maxAssetWeight: 0.55,
  maxTurnover: 0.20,
  minReserveSol: 0.05
});

const commitment = await commitDecision(previousCommitment, snapshot, decision);

// transaction contains real instructions created by your Solana integration.
const receipt = await simulateAndSend({
  connection,
  wallet,
  transaction,
  decision,
  commitment
});
05

Published source

The page and executable files are the same code.

These panels fetch the deployed modules verbatim. Download links point to those exact files.

POLICY COREveenoo-core.mjs
Download
Loading source…
SOLANA EXECUTORsolana-executor.mjs
Download
Loading source…
AUTOMATED TESTS8 assertions across two suites
Core testsExecutor tests
PASS input validation · operating states · hard turnover cap · SOL reserve shutdown · deterministic commitments · RPC ordering · simulation failure gate
06

Security boundary

What this release does not pretend to do.

No price oracle

The core consumes normalized snapshots. Production deployments must authenticate feeds, enforce confidence limits and reject stale oracle slots before evaluation.

No instruction builder

The executor accepts a populated transaction. Venue-specific swap instructions and slippage rules belong in a separately audited adapter.

No mainnet identity yet

CA and program ID remain TBA. Until published and verified, no address should be treated as an official Veenoo contract.