
Breakwater
Treasury-owned Aqua liquidity that earns fees and enforces trading limits during stablecoin stress.
Demo
About
Breakwater lets a treasury owner create liquidity with explicit risk limits while retaining custody of their tokens. The owner chooses an allocation, trading fee, safety trigger and permitted exit discount, then approves and activates the position through Aqua. Before creating, the owner can rehearse those same numeric settings against four historical USDC/USDT checkpoints without connecting a wallet. The comparison shows permitted behavior, original impairment, size-specific external quotes, estimated execution costs and the recovery tradeoff. It explicitly separates historical scenarios from Sepolia activation and leaves unavailable quotes unknown. It is a policy-explanation tool, not a return forecast or a claim that Breakwater beats a competent direct executor. While both assets satisfy the policy, trades can flow in both directions and the position records the retained input-token fee. When the asset becomes impaired, the same order refuses trades that add more of it and permits reserve-in, asset-out trades at an observation-bounded price, subject to backing and a willing taker. An unsafe reserve, co-depeg or invalid/stale observation halts trading. The owner can cancel even while trading is halted. The public Sepolia prototype exposes this owner journey, visible fee/exit accounting, owner-controlled sample-price scenarios and recent-position discovery. A separate wallet completed a 1 bUSD healthy trade, receiving 0.996975 rUSD while the position retained a 0.003 bUSD fee. Under sample stress, that same wallet paid 1 rUSD to buy 1.069175 bUSD from the same position: actual treasury balances confirm reserve received and impaired inventory reduced. The order then halted for an unsafe reserve and a co-depeg, and resumed quoting after healthy observations were restored. Impaired-input and halt checks use read-only execution calls, not mined failed trades. This was guided testnet testing, not verified unassisted use, adoption or demand. Tokens have no monetary value and the observations are not live market feeds. Exits and earnings are not guaranteed. The permitted discount is relative to an accepted observation, not a cap on total loss.
How it's made
Breakwater uses the pinned official Aqua contracts and a custom SwapVM router/instruction implementation. Aqua records virtual allocations while tokens stay in the maker's wallet. BreakwaterMakerAMM builds an order program combining the policy guard, SwapVM's flat-input-fee instruction, and the pegged liquidity curve. Stress changes the permitted instruction path of the existing order; it does not require replacing the order. BreakwaterPolicy checks independent USD observations for both assets and their relative price. Per-feed age limits, quote commitments, minimum output and deadlines address different failure modes. BreakwaterPositions records owner-created orders and accounts for healthy fees and exits using authenticated settlement hooks, with a commitment check across the transfer boundaries. Reverted settlement rolls back its accounting. The owner interface supports guided configuration, optional policy rehearsal, bounded token approvals, Aqua shipping, automatic quotes, explicit wallet actions, receipt recovery, scenario controls and cancellation. Transaction feedback retains the initiating wallet and position across wallet changes and pending-transaction reloads. Position sharing includes one-click copy and a manual fallback. Recent-position discovery uses bounded onchain event scans and displays current policy and backing. Expired samples explain owner-only refresh and offer recovery paths rather than an apparently executable trade form. Final CI passed 54 frontend tests and 74 contract tests; 12 optional fork tests were skipped. The actual-order differential test covers 60 arithmetic comparisons. Rehearsal and creation share one parsed settings object. The prior bounded historical study includes an unguarded fee-bearing curve, a halt/direct alternative, recovery tradeoffs and explicitly synthetic observation lag. The optional atomic-unwind executor remains experimental, not the main public workflow or a claim of superior returns. AI assistance: Codex substantially generated and revised contracts, tests, frontend code, graphics, configuration and documentation. File-specific attribution, reused upstream material and limits are documented in AI_DISCLOSURE.md and DEPENDENCIES.md in the repository. Human contributions included product direction, risk-policy and scope decisions, dedicated testnet funding, wallet-signed testing, usability feedback and coordination of external testing. We do not claim manual Solidity authorship, an independent security audit or verified independent adoption.