📄️ Overview
The technical manual is intended for advanced users, keepers, and oracle data providers that would like to gain an in-depth understanding of the inner workings of the protocol.
📄️ Statutes
Statutes are a set of mutable parameters that determine the behaviour of Circuit protocol. They are effectively the global state variables of the protocol.
📄️ Collateral Vaults
Collateral vaults are non-fungible coins that can be created permissionlessly by anyone.
📄️ Liquidation
When a collateral vault liquidation is triggered, owner operations can no longer be performed on the vault and Stability Fees stop accruing on the vault's outstanding debt. In other words, triggering a liquidation freezes the debt, and the borrower is relieved of their obligations. In return, the protocol seizes the collateral and auctions it off on-chain in an attempt to recover the debt from third parties.
📄️ Savings Vaults
Savings vaults are BYC CAT with inner puzzle savings_vault.clsp. The savings vault inner puzzle has itself an inner puzzle, which users can choose freely. This allows savings vaults to be held in using Chia's custody primitives (link?).
📄️ Treasury
The Treasury is a set of BYC coins with a special inner puzzle, p2circuittreasury.clsp, that allows Treasury coins to be spent only in very specific ways.
📄️ Surplus Auction
Surplus Auction is a CRT CAT with surplusauction.clsp puzzle as its inner puzzle. The inner puzzle turns the Surplus Auction into a singleton.
📄️ Recharge Auction
A Recharge Auction is a BYC CAT with rechargeauction.clsp puzzle as inner puzzle. The inner puzzle turns the Recharge Auction coin into a singleton.
📄️ Announcers
Announcers are singleton coins deployed by data providers. Their purpose is to make the XCH/USD market price available on-chain.
📄️ Announcer Registry
The Announcer Registry is a singleton coin that keeps track of CRT rewards for Statutes Price updates and the Announcers eligible to receive those rewards. In addition the Announcer Registry handles the minting process via which the CRT rewards are paid out to Announcers.
📄️ Governance
Governance coins are CRT CATs with the governance.clsp puzzle as their inner puzzle. Governance coins are created from standard CRT coins on an ad hoc basis.
📄️ Protocol Launch
Circuit protocol is launched by deploying Statutes, Oracle and Announcer Registry on-chain, and minting the CRT governance token. To function properly, the protocol also needs at least one Treasury coin. All other protocol coins can be launched independently. They are tied to the protocol by mututal coin or puzzle announcements and asserts and/or messages adhering to CHIP 25.
📄️ Keepers
Keepers are entities that execute operations on the protocol that anyone can perform.
📄️ Design decisions
Numerous design decisions had to be made in creating Circuit protocol. These typically involve trade-offs between scalability, costs, code readability, and other factors. None of the trade-offs may negatively affect protocol security, which is a non-negotiabile requirement.