The settlement contract holds members' collateral. Report vulnerabilities privately through GitHub security advisories, not public issues. We aim to acknowledge reports within three days.
In scope, most severe first:
- Withdrawing more than your available balance, or moving another member's funds.
- Recording an obligation without the debtor's authorization.
- Leaving a net debit uncovered so that
settlefails or a balance goes negative. - Blocking settlement or withdrawals for other members.
Invariants the code is written to keep, and that reports should be measured against:
balance + min(position, 0) >= 0for every member and token, always.- The sum of positions in a window, per token, is zero.
- Token balances held by the contract equal the sum of member balances.
- No operator action (pause, suspension, token or minimum changes) stops a member withdrawing its available balance, and no window can stay open past its bound, which cannot be unset.
src/invariants.rs checks these after every step of randomised operation
sequences.
Trust in the operator, by design:
- The operator decides who may join, which tokens are allowed, and may pause new deposits and obligations or suspend a member. It cannot move funds, record obligations, or upgrade the contract: there is no upgrade function.
- The operator can settle early, which only applies positions members already authorized.
Known limits:
- Members acting together can still fill a window's 64 positions. Each
member's obligations may open at most
position_quotanew positions per window (16 by default), so it takes at least four;set_min_amountmakes it costly andset_suspendedstops them. - Only vetted tokens should be allowed: the contract calls the token's
transferon deposit and withdrawal and trusts its result.
The contract has not been audited.