BlackHartBlackHart

Contract Addresses

info

On-chain contracts are being deployed to Base. The API is live and available now.

Oracle reads will be gas-free (view functions only) once contracts are deployed.

Base
Chain
Deploying
Status
Pending
Verification

Deployed Contracts

hub
BRORegistry
Deploying...

Stable consumer address. Routes all reads to the current oracle implementation. Upgrades are timelocked (48h) with codehash verification.

visibility
BROOracle
Deploying...

Oracle implementation. Stores composite BRI, 12 per-dimension scores, and evidence hash per protocol. 3 storage slots per protocol.

api
REST API
https://oracle.blackhart.io/api/v1

Base URL for all REST endpoints.

code

Read Interface

Key read functions for on-chain and off-chain integrations. All view functions — zero gas for consumers.

IBROOracle + BRORegistry Interface
// IBROOracle — Read Interface
// Protocols are identified by human-readable string slugs (e.g. "aave-v3")

// Composite score + staleness
getScore(string slug)
  → (uint16 bri, uint8 forgeScale, uint64 updatedAt, bool isStale)

// Full score struct (all 12 dimensions + evidence hash)
getFullScore(string slug) → ProtocolScore

// Single dimension by index (0-11)
getDimension(string slug, uint8 dimensionIndex) → uint16

// Batch read for portfolio monitoring
batchGetScores(string[] slugs)
  → (uint16[] bris, uint8[] forgeScales, bool[] stale)

// Convenience staleness check
isStale(string slug) → bool

// ProtocolScore struct layout (3 storage slots):
//   bri (uint16)           — Composite score, 300-1000
//   forgeScale (uint8)     — 0=RAW .. 6=ADAMANTINE
//   updatedAt (uint64)     — Timestamp of last update
//   sequenceNumber (uint64)— Monotonic per protocol
//   exists (bool)          — Whether protocol has been scored
//   dimensions (uint16[12])— D1-D12, each 0-100
//   evidenceHash (bytes32) — SHA-256 digest of evidence (IPFS CIDv0 with 0x1220 prefix stripped)

// BRORegistry — Upgrade Management
// Consumers point to the registry, which routes to the active oracle
implementationAddress() → address
implementationCodehash() → bytes32
oracleVersion() → uint16
upgradeTimelock() → uint64  // 172,800 seconds (48 hours)
shield

Security Model

lock
Timelocked upgrades

Regular oracle upgrades go through a 48-hour timelock with codehash verification at both proposal and activation. The owner can perform an immediate emergency swap if the active oracle is compromised. Consumers can monitor pending upgrades and exit before activation.

hub
Registry indirection

Consumers point to the BRORegistry, which routes reads to the active oracle. The registry address never changes — only the underlying implementation.

verified_user
Interface validation

The registry validates that any proposed oracle implements the IBROOracle interface before accepting it. Prevents pointing to arbitrary contracts.

verified
Evidence pinned

Every score update includes an evidence hash linking to the full analysis that produced it. Scores are auditable, not trust-me assertions.

analytics
Per-dimension transparency

All 12 dimension scores are published on-chain. Consumers can read individual dimensions or the composite BRI.

emergency
Emergency downgrade

Any updater can immediately downgrade a compromised protocol's score with an evidence hash. When paused, only the owner can downgrade — updaters are locked out.