安全 Threats, controls and limits
Security
A savings circle fails when someone holds the cash. In Biu Wui nobody does: the contract holds it, the rules can't change, and money only moves along fixed paths to each member's locked payee.
Threat → control
| Threat | Control in the contract |
|---|---|
| The organiser runs off with the pot | No owner, no admin key, no upgrade. Circles are EIP-1167 clones of one verified implementation. The organiser's only income is a fee capped at 5% of the pot, and it comes out of the discount. |
| A winner takes the pot and stops paying | Part of each winner's pot (the circle's security share) is held back, never more than they still owe, and pays their later shares automatically at close. |
| A stolen key redirects the pot | Pots, refunds and dividends only go to the member's named, locked payee. A change waits the payee delay, is visible to every member, and is cancellable with one signature. The winner's payee is fixed when the auction closes. |
| A release nobody agreed to | Release needs approvals from more than half of the members (the circle's quorum). Members see the payee's name and address before they approve. |
| The circle never fills | Joining is a pledge. After the join deadline anyone can cancel an unfilled circle and every pledge is withdrawable in full. |
| A round stalls | After the grace period anyone can dissolve; everything left (except dividends earned) is refunded pro rata to net contributions. |
| A standing order drains a wallet | Exactly one share per round, at most N rounds, an expiry date, spender = this circle only, revocable with one signature. |
| The relayer changes a signed action | Every amount, round, payee and discount is inside the signature; any change makes it invalid. Nonces stop replays; the circle's address in every domain stops cross-circle reuse. |
| Bidding manipulation | Only members who paid this round and haven't won may bid; each bid must beat the best; the discount is capped (at most 40%). |
Relayer rails
Members never send transactions. They sign; the app posts the signature to /api/relay; the relayer pays the gas. It is safe to leave open because:
Allow-list
Only the documented Biu Wui functions, only on the factory or on circles the factory confirms with isCircle. Anything else is refused.
Simulate first
Every call is simulated; a call that would revert is refused with a plain reason and never costs gas.
Short signatures
Authorisation windows and deadlines must be at most one hour ahead, so a leaked signature dies fast.
Rate limits
Per IP 30 calls / 10 min, per member 60 calls / day, and a global daily gas cap.
Gas only
The relayer key holds only tQDAY for gas, never stablecoins, and can only reach paths that already can't move a member's money anywhere but into their circle or to their own payee.
Starter faucet
0.03 tUSD8 once per address, 3 per IP a day, and only to addresses holding less than that.
Limits, stated plainly
- Testnet only. Biu Wui runs on QDay Aevum testnet with tUSD8, a test stablecoin with no value.
- No audit yet. The contracts have unit, fuzz, invariant and fork tests, but no external audit.
- Rate limits are in memory per server instance: fine for one instance, a shared store is needed before real traffic.
- Names are self-declared, not KYC. A payee name is what the member typed. It helps members spot a change; it does not prove identity.
- The "try without a wallet" key lives in your browser (localStorage). It is for testing only: anyone with access to this browser can use it.
- Circles need a little trust. Security covers a winner's later shares, but a member who never won and stops paying simply can't bid; the circle carries on without their share.