Observe
Receive timestamped weights, returns, volatility, liquidity, drawdown and the SOL execution reserve.
// veenoo.agent_
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.
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.
System design
Receive timestamped weights, returns, volatility, liquidity, drawdown and the SOL execution reserve.
Reject malformed states, stale data, unsafe concentration and impossible allocation limits.
Measure pressure, select SEEK / BALANCE / DEFEND / DORMANT, then cap turnover and weights.
Commit the decision, sign a Solana transaction, simulate it, and only then broadcast and confirm.
maxTurnover.Contract
{
timestampMs: number,
reserveSol: number,
drawdown: number, // 0..1
assets: [{
symbol: string,
weight: number, // sum = 1
return1d: number,
volatility: number,
liquidityUsd: number
}]
}{
policyVersion: string,
mode: "SEEK" | "BALANCE" |
"DEFEND" | "DORMANT",
reasons: string[],
pressure: number,
turnover: number,
targets: { symbol, weight }[],
orders: { symbol, deltaWeight }[]
}| Export | Purpose | Runtime |
|---|---|---|
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 |
Live module
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…
Integration
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.mjsimport { 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
});Published source
These panels fetch the deployed modules verbatim. Download links point to those exact files.
Loading source…Loading source…Security boundary
The core consumes normalized snapshots. Production deployments must authenticate feeds, enforce confidence limits and reject stale oracle slots before evaluation.
The executor accepts a populated transaction. Venue-specific swap instructions and slippage rules belong in a separately audited adapter.
CA and program ID remain TBA. Until published and verified, no address should be treated as an official Veenoo contract.