Loops HouseCONSTITUTION

NEAR HACKATHON
Links
Team
1 member- PUOwner
Putra
Overview
An upgradeable smart contract is only as safe as whoever can upgrade it. Multisigs and timelocks decide who may sign, not what the new code does. Radiant Capital lost about USD 50M in Oct 2024 when malware on developer devices produced valid multisig signatures. The key holder could ship any code.
CONSTITUTION removes the upgrade key. A NEAR contract, the gate, holds the upgrade authority of a Base Sepolia proxy through NEAR Chain Signatures. Its access keys are deleted, and it has no method to upgrade itself, add a key or sign a caller-supplied hash. A candidate upgrade is built and checked privately in an Intel TDX enclave on Phala against five rules the owner committed in advance: R1 storage layout, R2 solvency, R3 forbidden code, R4 initializer, R5 regression replay. Only if all five pass does the gate sign, and only a transaction it built itself. A private model on NEAR AI Cloud then hunts for counterexamples. It can only veto, and only a reproducible veto counts. Changing the rules waits out a public on-chain delay.
How NEAR fits : Zero-key accounts, Chain Signatures, propose-only session keys, contract-enforced time and NEAR AI Cloud private inference. On an EVM chain alone, an upgrade authority is always an address someone controls.
Evidence, testnet for now. At constitution-gate.pages.dev/app, connect a NEAR testnet wallet and run four attacks. Each is refused with a rule code and nothing is signed. An honest upgrade passed R1 to R5 and executed on Base Sepolia. The keyless audit command exits 0 against live testnet.
Limits. Not audited. The rules are bounded checks for one demo vault, not formal verification.
Built to last. Buyer: a security lead at a protocol with upgradeable contracts. Pricing is an untested hypothesis; no customers are claimed. Next: rule templates, a second EVM chain, independent review, testnet pilots. Ambition, not built: the security and private-verification layer for upgrades on NEAR.