Design review · Section 1 of 4

Terminal-orchestrated architecture

All state-changing demo actions originate in auditable Foundry scripts. The operations console is a read-only window into the chain.

System boundaries and data flow
Codex + presenter
Foundry terminal
DeployV1.s.sol
SeedDemo.s.sol
UpgradeV2.s.sol
forge test / inspect
Only state-changing control plane
Audience view
React operations console
Balances + total liabilities
USDC reserves + reserve ratio
Proxy / implementation / version
Event-driven activity timeline
Read-only via viem
Same interface, selectable target
Ethereum JSON-RPC
Anvil
Default live demo
fast + deterministic
Base Sepolia
Optional public proof
same scripts
Network config supplies RPC URL, chain ID, and deployed addresses.
Stable public address
ERC1967 Proxy
Owns all bank storage: owner, asset, paused flag, balances, total liabilities.
delegatecall ↓
Bank V1
deposit
withdraw
pause
Bank V2
V1 behavior
+ internal transfer
MockUSDC
The proxy holds reserves; liabilities must never exceed its token balance.
V1 prepared: deploy, seed accounts, deposit, withdraw Codex live: implement + test V2 Reveal: upgrade, transfer, prove preserved state

Architecture approved

Continue to contract responsibilities and invariants.

Needs changes

Select this and describe the adjustment in the terminal.