Skip to content

disbitski/MintGuard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MintGuard

Policy-secured minting for tokenized assets, powered by Chainlink.

MintGuard is a product-grade minting console and smart contract system for guarding new token supply before it reaches circulation. It combines a polished fintech/cyberpunk web interface with Foundry contracts that route mint requests through programmable policy checks.

Browse the live app: disbitski.github.io/MintGuard

The result is a complete GitHub-ready project: a live GitHub Pages UI, working Solidity contracts, deployment scaffolding, and passing local tests.

Product Story

Minting new supply should not be a blind admin action.

MintGuard treats issuance as a controlled workflow:

  1. An operator requests a mint.
  2. The mint request is evaluated by a policy engine.
  3. Each policy checks a specific guardrail.
  4. The request is either approved or rejected with a clear reason.
  5. Approved requests mint new token supply.

The UI presents this as a product dashboard with reserve telemetry, policy health, scenario mode, and decision receipts.

Live App

MintGuard is live on GitHub Pages:

https://disbitski.github.io/MintGuard/

What MintGuard Includes

  • Light and dark theme product UI.
  • Scenario mode for healthy, stale feed, reserve limit, paused issuance, and velocity cap states.
  • Mint console with operator, recipient, and amount inputs.
  • Decision receipts that show Allowed or PolicyRejected.
  • Policy health center showing every guardrail in the mint chain.
  • Reserve telemetry panel with feed age and backed capacity.
  • Foundry contracts for token issuance and policy-controlled minting.
  • A deployment script and .env.example.
  • Seven passing Solidity tests.

Contract Architecture

flowchart LR
  Operator["Issuer Operator"] --> Vault["MintGuardVault"]
  Vault --> Engine["PolicyEngine"]
  Engine --> Authorized["AuthorizedOperatorPolicy"]
  Engine --> Pause["PausePolicy"]
  Engine --> Reserve["ReserveMintPolicy"]
  Engine --> MaxMint["MaxMintPolicy"]
  Engine --> Velocity["RollingVolumePolicy"]
  Reserve --> Feed["Reserve Feed"]
  Engine --> Vault
  Vault --> Token["MintGuardToken"]
Loading

The policy chain is deliberately restrictive:

  1. Authorized Operator checks whether the caller can request supply.
  2. Pause Guard blocks issuance during emergency or maintenance states.
  3. Reserve Coverage checks feed freshness and reserve-backed capacity.
  4. Mint Cap limits the size of each mint request.
  5. Velocity Limit caps rolling issuance volume per operator.

If any policy rejects, the mint is blocked before token supply changes.

Chainlink Alignment

MintGuard is designed around Chainlink ACE-style policy enforcement:

  • Business logic lives in MintGuardVault.
  • Enforcement logic lives in a separate PolicyEngine.
  • Policies are modular, ordered, and independently configurable.
  • Reserve-aware minting follows the same risk model as Chainlink-powered reserve checks: verify feed freshness, validate decimals/capacity assumptions, and reject unsafe issuance.

This repo keeps the contracts dependency-light so the project compiles and tests locally without pulling a large external package graph. For production, replace or extend the local policy engine with official Chainlink ACE contracts from @chainlink/ace, complete a security review, and review Chainlink ACE licensing requirements.

Project Structure

.
├── index.html                 # Product UI
├── styles.css                 # Fintech/cyberpunk theme system
├── app.js                     # UI state, scenarios, and policy simulation
├── foundry.toml               # Foundry config
├── .env.example               # Deployment environment template
├── script/
│   └── DeployMintGuard.s.sol  # Local/testnet deployment script
├── src/
│   ├── MintGuardVault.sol
│   ├── mocks/MockReserveFeed.sol
│   ├── policy/
│   │   ├── AuthorizedOperatorPolicy.sol
│   │   ├── MaxMintPolicy.sol
│   │   ├── MintGuardAccess.sol
│   │   ├── MintPolicyTypes.sol
│   │   ├── PausePolicy.sol
│   │   ├── PolicyEngine.sol
│   │   ├── ReserveMintPolicy.sol
│   │   └── RollingVolumePolicy.sol
│   └── token/MintGuardToken.sol
└── test/
    └── MintGuard.t.sol

Run The UI Locally

No framework or package install is required.

python3 -m http.server 4192

Open:

http://127.0.0.1:4192/

The app is static and GitHub Pages-ready.

Build And Test Contracts

Install Foundry if needed:

curl -L https://foundry.paradigm.xyz | bash
foundryup

Run the test suite:

forge test

Expected result:

7 passed; 0 failed; 0 skipped

Test Coverage

The Foundry suite verifies:

  • Approved minting creates token supply.
  • Unauthorized operators are blocked.
  • Paused issuance is blocked.
  • Stale reserve feeds are blocked.
  • Mints above reserve capacity are blocked.
  • Mints above the per-request cap are blocked.
  • Rolling volume limits are enforced.

Local Deployment

Start Anvil:

anvil

Copy the environment template:

cp .env.example .env

Fill in:

PRIVATE_KEY=0xYOUR_PRIVATE_KEY
RPC_URL=http://127.0.0.1:8545

Deploy:

forge script script/DeployMintGuard.s.sol \
  --rpc-url "$RPC_URL" \
  --private-key "$PRIVATE_KEY" \
  --broadcast

For public testnets, use a funded wallet and a testnet RPC URL. Never commit private keys or production RPC secrets.

Security Notes

MintGuard is unaudited software and should not be used to secure production value without professional review.

Production use should include:

  • Official Chainlink ACE integration review.
  • BUSL/commercial licensing review for ACE where applicable.
  • Contract audit for policies, extractors, mappers, and token logic.
  • Feed freshness and decimal validation.
  • Clear operational ownership for policy administration.
  • No PII stored onchain.
  • Timelocks or multisig controls for policy changes.

GitHub Portfolio Arc

MintGuard is designed to sit beside:

  • Oracle Pulse: live market truth powered by Chainlink Data Feeds.
  • SecureVal: cross-chain value movement powered by Chainlink CCIP.
  • MintGuard: policy-secured issuance powered by Chainlink.

Together, they tell a broader story: data, movement, and controlled issuance for tokenized value.

About

Policy-secured minting for tokenized assets, powered by Chainlink.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors