GROPT Risk Engine is a pre-trade risk scoring module designed for automated trading systems.
It evaluates a token contract before execution and returns a structured decision:
allowcautionblock
GROPT runs a deterministic risk pipeline and outputs machine-readable JSON:
- Risk score (1–10)
- Policy decision (
allow | caution | block) - Rule-based signals (why the policy was chosen)
- Designed to be embedded in bots, routers, and pre-trade hooks
git clone https://github.com/groptlabs/gropt-risk.git
cd gropt-risk
npm installnode index.js <TOKEN_CA> jsonExample:
node index.js 0x1111111111111111111111111111111111111111 json{
"risk": {
"level": "CRITICAL",
"score": 1
},
"policy": "block",
"label": "TRASH",
"signals": [
{
"id": "NO_PAIRS",
"level": "CRITICAL"
}
]
}allow→ acceptable risk for executioncaution→ reduce size / require manual verificationblock→ do not execute
const { execFileSync } = require("node:child_process");
function groptRisk(ca) {
const output = execFileSync("node", ["index.js", ca, "json"], {
encoding: "utf8",
});
return JSON.parse(output);
}
const risk = groptRisk("0xTOKEN");
if (risk.policy === "block") {
throw new Error("GROPT blocked execution");
}- This repository contains the risk module.
- Runtime components (watchers, signal relays, bots) can consume this module via the CLI output.
- Stable JSON schema (versioned)
- Optional HTTP wrapper (local API)
- Expanded rule set & chain adapters
Never commit .env files or API keys.