Protocol Architecture & Caatinga Registry
Live Testnet contract graph resolved dynamically from `deployments/manifest.json` and `caatinga.artifacts.json`. Zero contract addresses are hardcoded in UI code.
V3 call graph (acyclic: market calls vault and controller; neither calls back)
Borrower signature (root auth entry)
└── LendingMarketV3.borrow(borrower, request, proof, signals)
├── OracleRouter.pair(XLM, debt) -> Reflector (age and skew checks)
├── TierPolicyRegistry.get_policy(market, tier)
├── CreditControllerV3.authorize_and_reserve(market, loan_id, borrower, request, proof, signals)
│ ├── [market.require_auth() + borrower.require_auth()]
│ ├── CredentialRegistry.is_active(root, epoch)
│ ├── TierPolicyRegistry (active policy hash, history rule)
│ ├── AssetRegistry + OracleRouter (fresh mark of every open loan)
│ ├── CreditController V1 (legacy exposure, credit domain)
│ └── ZkVerifierV3.verify(proof, 18 signals) [BN254 pairing]
├── SAC(XLM).transfer(borrower -> market, required_xlm)
└── LendingVault.fund_loan(...) -> SAC(debt).transfer(vault -> borrower)V1 Cross-Contract Call & Auth Tree (repayment only after V3)
Borrower Signature (root SorobanAuthEntry)
└── LendingMarket.borrow(borrower, amount, max_col, max_int, proof, signals)
├── PolicyRegistry.get_active_policy(market)
├── CreditController.authorize_and_reserve(market, loan_id, borrower, amount, proof, signals)
│ ├── [market.require_auth() + borrower.require_auth_for_args(...)]
│ ├── CredentialRegistry.is_active(root, epoch)
│ ├── PolicyRegistry.get_active_policy(market)
│ └── ZkVerifier.verify(proof, pub_signals) [CAP-0074 BN254 Pairing]
└── SAC.transfer(borrower -> market, collateral)