Loops HouseByLaw

NEAR HACKATHON
Links
Team
1 member- TCOwner
TC
Overview
Bylaw is a treasury whose agents can pay, but cannot change the rules.
Four agents work for one house. A customer pays an invoice. Two agents bid for the same job, and the cheaper bid wins. The winner settles 1.00 wrapped NEAR into USDC on Solana through a live NEAR Intents quote. Bylaw checks that quote's signature before the payment is accepted. The clerk takes a commission onto a worker NFT, and royalties are split across the workers.
A red-team agent then tries to break the treasury. Each try is refused for a different reason: the amount is over the cap, the payee is not on the list, the method is not allowed, or that agent is not allowed to change the rules. A larger vendor payment waits until a second agent signs. An agent cannot co-sign its own payment.
A human seals the numbers: how much can leave at once, how much can leave today, who can be paid, and when a second signature is required. Each agent holds a key that can only ask to pay. The owner is the only one who can change those numbers. A full-access key is treated as a mistake, because it can move money without reading the rules.
Change a cap and run the same night again. The refusals follow the new numbers. The quote is a real dry quote, so no money is deposited. The balances in the demo are the house ledger, and the same checks are written in a Rust contract.
This matters because telling an agent "be careful with the wallet" is not a lock. The model can still sign the wrong payment. Bylaw keeps the money in the house and makes the rules the thing that says yes or no.