Skip to content

borgCORE

borg-core is the onchain policy engine that powers MetaLeX BORGs. It combines a SAFE Guard with the standard ERC‑4824 DAO interface, making it the "heart" of every BORG on MetaLeX OS. By wrapping a SAFE with conditional, policy‑driven checks, it enforces which actions multisig members may execute and how outside authorities interact with the BORG.

Architecture

  • Immutable modes – each core is deployed in whitelist, blacklist or unrestricted mode. The mode cannot be changed after deployment.
  • BorgAuth – access control layer that governs who may update policy or install implants.
  • Condition Manager – modular AND/OR checks for per‑function or per‑contract conditions (e.g., timelocks, balances, oracle data).
  • Onchain references – stores URIs for legal documents and the adjacent DAO's EIP‑4824 interface.
  • Implants – SAFE Modules that plug into the core to add features such as optimistic grants, timelocks or signer ejections.

Getting Started

Clone the repository and install dependencies:

git clone https://github.com/MetaLex-Tech/borg-core
cd borg-core
foundryup           # Update Foundry tools
forge install       # Install project dependencies
forge build --optimize --optimizer-runs 200 --use solc:0.8.20 --via-ir

The contracts can then be deployed with your preferred tooling.

Next Steps

Learn about Borg Auth & BorgAuthACL, BORG modes, conditions, governance adapters, helpers, hooks, and implants to customize how your organization operates.