ONCHAIN ON ROBINHOOD

HexRail Oracle

A small Solidity contract, coming to Robinhood mainnet, that exposes the latest HexRail score for any address as a one-call staticcall. Designed for hook authors, vault factories, and any Robinhood contract that wants to read a HexRail signal onchain before it acts.

Deployment status

Live on Robinhood mainnet.

0x3afB3d63106eeB3575773C5fA13971d396cdB36e

Robinhood explorer — coming soon

What it returns

struct Score {
    uint8   score;     // 0..100 — heuristic, NOT a safety guarantee
    bytes32 easUid;    // backing EAS attestation UID on Robinhood
    uint64  timestamp; // when this score was determined
    uint32  chainId;   // native chain of the scanned contract
}

function scoreOf(address target) external view returns (Score memory);

Reader convention: timestamp == 0 means “never scored by HexRail” — not “score of zero.” Treat the two cases differently.

Reference consumer

HexRailGateRegistry

Reference consumer of the oracle, coming to Robinhood mainnet alongside it. Wraps the oracle with an immutable policy (minScore, reviewCeiling, maxStaleness) and exposes both strict and lenient gates. Drop into a vault deposit, a swap router, or an allowlist registry in one line.

Address — coming soon

interface IHexRailGate {
    function isAllowed(address token)         external view returns (bool);
    function isNotBlocked(address token)      external view returns (bool);
    function requireAllowed(address token)    external view;       // strict revert
    function requireNotBlocked(address token) external view;       // lenient revert
}

IHexRailGate constant GATE = IHexRailGate(GATE_ADDRESS);   // address published at launch

function deposit(address token, uint256 amount) external {
    GATE.requireNotBlocked(token);   // reverts only on BLOCKED; UNKNOWN/STALE soft-pass
    // ... rest of deposit
}
Deploying soon

Drop-in Uniswap v4 hook check

One-line revert-on-block, with sensible defaults. Soft-passes on unknown tokens and stale scores. Full reference implementation in packages/contracts/src/HexRailGateHook.sol.

import {HexRailOracle}  from "hexrail/HexRailOracle.sol";
import {HexRailGateLib} from "hexrail/HexRailGateLib.sol";

contract MyHook is BaseHook {
    HexRailOracle constant HEXRAIL = HexRailOracle(0x3afB3d63106eeB3575773C5fA13971d396cdB36e);

    function _beforeSwap(
        address, PoolKey calldata key, IPoolManager.SwapParams calldata, bytes calldata
    ) internal override returns (bytes4, BeforeSwapDelta, uint24) {
        HexRailGateLib.requireNotBlocked(HEXRAIL, Currency.unwrap(key.currency0), 55, 7 days);
        HexRailGateLib.requireNotBlocked(HEXRAIL, Currency.unwrap(key.currency1), 55, 7 days);
        return (BaseHook.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0);
    }
}

Threshold guidance

Recommended

minScore = 55

Blocks D / F grades. Leaves room for routers, proxies, big DeFi.

Recommended

maxStaleness = 7 days

Soft-pass entries older than this so keeper lag doesn't trap pools.

Optional

reviewCeiling = 80

Emit a review event (no revert) for scores in the 55–79 band.

Warning — do not over-gate

Several canonical Robinhood contracts score in the review band or below: Aerodrome Router (D, 61), Universal Router (F, 51), Aave V3 Pool (C, 72). That's because they expose admin power, upgradeability, or complexity — features, not vulnerabilities. Low grade does not mean malicious. If you set minScore above 55, you will block legitimate routes. Test against the contracts in your real trading paths before deploying with strict thresholds.

What this isn't

  • Not an audit. A score is a HexRail static-analysis heuristic. Use it as one input.
  • Not a price feed. No market data. Code signal only.
  • Not real-time. Updated on paid scans (any caller) and on the weekly keeper run for the canonical seed list.
  • Not policy. HexRail publishes the data. The hook deployer picks the thresholds + the revert decision.
  • Not append-only. Newer scans overwrite older ones. Full history lives on EAS, queryable by recipient address.

Want to integrate?

Open-source reference contracts on GitHub. Foundry tests included. Or call the HTTP Guard API for the same signal off-chain.