All projects

Solidity Guardrail

AI agent that designs, audits, and deploys Chainlink-secured smart contracts from plain English.

CRE & AI DeFi & Tokenization Risk & Compliance

What it is

It works as a multi-stage pipeline. A web app collects user intent, then a workflow engine (or Chainlink CRE path) interprets that intent, rejects speculative/memecoin-style requests, and produces a protocol design plan. Nuance: the Solidity text is generated by an OpenAI model, while Chainlink provides the live oracle context and on-chain service layer around generation (Data Feeds, Automation, Functions, with optional CCIP/VRF). The AI generator creates Solidity from the plan with security patterns like pausing, ownership controls, kill switches, and safe defaults. The code is compiled with auto-fix retries for common generation errors, then deployed through the project’s deployment flow so contracts can use real market data and automated risk actions on-chain.
The problem it solves is the gap between “idea” and “safe on-chain execution.” Today, deploying custom contracts is slow, error-prone, and requires deep smart contract expertise. Guardrail Factory reduces that complexity by combining AI generation with deterministic policy checks and Chainlink-backed runtime protections, so teams can ship faster without skipping security and compliance guardrails.

How it Works

Built with:

  1. apps/web (Next.js 14 + TypeScript): UI and API routes (/api/generate, /api/verify, etc.).
  2. workflow (TypeScript runner + Chainlink CRE workflows): orchestration engine for intent parsing, safety checks, generation, compile, and deploy steps.
  3. packages/spec (@guardrail/spec): shared validation/policy layer (including anti-meme/spec checks).
  4. contracts (Foundry/Solidity): on-chain protocol contracts and deployment scripts.
    End-to-end flow:
  5. User writes intent in plain English.
  6. Workflow validates and risk-screens intent.
  7. It pulls Chainlink context (e.g., price feed data) and builds a design plan.
  8. OpenAI generates Solidity from that plan.
  9. solc-js compiles it with auto-fix retries for common generation errors.
  10. Contract is deployed via the deployment pipeline, with Chainlink services integrated (Data Feeds, Automation, Functions, optional CCIP/VRF).
    So: OpenAI handles code generation; Chainlink provides CRE orchestration + oracle/service integrations around it.

Links

Created by

  • Muhammad Zulhilmi Bin Rahmat