PACTAby Fractal Neurons
Request a dossier
Pacta / Integrations / Vault factories
Integrations

Vault factories: control-plane tab, status badges and PactaSentinelGuard

Free building blocks for vault factories and curator tooling: a Control-Plane & Role Map tab from one static JSON file, embeddable status badges, and PactaSentinelGuard.sol, an on-chain tripwire that refuses cap increases for collateral without a healthy Pacta attestation and never blocks a decrease.

1. Control-Plane & Role Map tab (free, no key)

/api/v1/protocols.json (schema pacta.protocols.v1) lists every published protocol record: 90 protocols, of which 86 are Base-EAS-attested (evidenceBasis: "eas_attested", documentation compared) and 4 are RPC-observed only (evidenceBasis: "rpc_observed", documentationComparison: "not_assessed"). Each record carries the checksummed target and controller, every pinned surface with its block number and block hash, the badge URLs and ready-to-use preflightArgs.

JavaScript
const res = await fetch("https://pacta.wtf/api/v1/protocols.json");
const { protocols } = await res.json();
const p = protocols.find((x) => x.slug === "aave-v3-gho");
// p.badge.svg, p.evidenceBasis ("eas_attested" | "rpc_observed"), p.classification, p.controllerAddress,
// p.surfaces[i].blockNumber / blockHash, p.preflightArgs (for a live re-read)
badgeImg.src = p.badge.svg;            // render text with textContent, never innerHTML
statusCell.textContent = p.badge.label;

Show RPC-observed protocols as observed control planes only: never present them as aligned or as having a documentation delta. For a live re-read of any contract, call the free https://pacta-x402.pacta.workers.dev/v1/check/preflight with preflightArgs.

2. Control-plane status badges

Static: https://pacta.wtf/badges/<slug>.svg (rebuilt with the site). Live: https://pacta-x402.pacta.workers.dev/v1/badges/<slug>.svg (5-minute cache, CORS open). Three tiers, per protocol page:

BadgeProtocolsMeaning
Pacta Control Plane: Aligned · Base EAS50Every record is a Base-EAS-attested aligned baseline: on-chain state matches the documentation.
Pacta Control Plane: Parameter Delta36Base-EAS-attested; at least one surface differs from the documentation.
Pacta Control Plane: RPC-Observed4RPC-pinned only: control plane pinned at an archive block; documentation not assessed; not EAS-attested.
Markdown
[![Pacta Control Plane](https://pacta.wtf/badges/aave-v3-gho.svg)](https://pacta.wtf/protocols/aave-v3-gho/)

3. PactaSentinelGuard.sol: refuse unhealthy cap increases, never block a decrease

An MIT, zero-dependency, non-custodial Solidity ^0.8.24 contract (source and offline Foundry tests in packages/sentinel-guard; not audited, review before production use). A cap increase passes only if the collateral's binding resolves to:

  • a Sprint receipt in PactaCommitmentRegistry 0x35D2…d872 on Base with driftCount == 0 (the receipt covers the whole Sprint, so drift anywhere in it blocks increases);
  • a Base EAS attestation with the Pacta schema, made by the registry's current attester, not revoked or expired, younger than maxStaleness (default 30 days), whose payload matches the registry receipt.

Decreases, equal caps and zeroing always pass, so curators and sentinels can de-risk during an incident. Pacta deploys no shared instance: each curator deploys one on Base, where the registry and EAS live (vaults on other chains can run the same checks from an off-chain bot), and binds collateral with Sprint ids and UIDs from protocols.json. RPC-observed protocols have no attestation to bind, so an increase guarded for them always reverts.

Solidity
PactaSentinelGuard guard = new PactaSentinelGuard(
    0x35D21Bb4Df6586FE7759b5e57263ffeB3e1fd872, // PactaCommitmentRegistry (Base)
    0x4200000000000000000000000000000000000021, // EAS predeploy (Base)
    curatorSafe,                                // binds collateral
    0                                           // maxStaleness: 0 = 30 days (1 to 365 days)
);
guard.bind(collateral, sprintId, easUid);       // from protocols.json `sprints` / `baseEasUids`
guard.validateCapIncrease(collateral, currentCap, newCap); // reverts only on an unhealthy increase
PlatformCallWhere
Morpho Vault V2checkMorphoV2AbsoluteCapIncrease(vault, collateral, idData, newCap)Before a curator submits increaseAbsoluteCap. Reads absoluteCap(keccak256(idData)); decreaseAbsoluteCap and sentinel revoke are never gated.
Euler EVKcheckEulerCapsChange(evault, collateral, newSupplyCap, newBorrowCap)Before setCaps. AmountCap 0 means unlimited, so setting a cap to 0 counts as an increase; lowering a cap never needs the attestation.
Veda (BoringVault), Lagoon, Upshift, MellowvalidateCapIncrease(collateral, currentCap, newCap)In your cap-setting path: a manager or strategist module, a Safe transaction guard, or an off-chain approval bot.
Off-chain Sentinel botsattestationHealth(collateral)Poll the health state (it never reverts on a malformed attestation) and alert or de-risk.
Read-only on-chain analysis. Not investment advice. No partner integration is implied: these are open building blocks.Protocol records →