STOABUILD REVIEW
AN HONEST ACCOUNT

What is built,
and what is wrong.

Written for someone deciding whether to fund an audit — so the defects come before the features.

Production Solidity
2,148 lines — 9 contracts, 3 libraries
Tests
1,838 lines, 118 passing, 0 failing
Fuzz coverage
10 properties × 10,000 runs
Audited / deployed
No / no
/ 001COVERAGE

Where it stands.

SuiteTestsCovers
Core43Valuation, the multiplier rule, oracle guards, backing, redemption, fees, rebase, policy curve
Bonds27The Dutch auction end to end: creation, price decay, accretion gate, capacity limits, notes, double-redeem
Treasury surface23Access control, mint gate, liquidity reflexivity discount, tier caps, delisting, timelock, decimals
Staking exit13Unstake, wrap and unwrap, warmup, forfeit, third-party gate, TWAP, keeper bounty
Invariants12Supply conservation, backing monotonicity, no-free-money, emission bounds

Sixteen external functions remain untested; all are trivial getters. The bonding engine went from zero coverage to 27 tests during this build-out, which is where every defect below was found.

/ 002DEFECTS FOUND

Four bugs, and how.

Each was found by writing tests for code that had none. That is the honest argument for why the test work mattered more than adding features.

01

Bond payout was wrong by ~18 orders of magnitude

The precision chain divided the quote token’s 18-decimal scale out twice. A $50,000,000 deposit computed a payout of 0.00005 tokens. The treasury would have accepted real assets and issued effectively nothing.

A dust payout is trivially accretive, so the accretion gate never fired and the backing tests passed vacuously — asserting that backing per token did not fall while the protocol gave away $50m for free.

Fixed by declaring one scale across the debt ratio, the market price and the payout, and sourcing the payout from the treasury’s own valuation rather than re-deriving it. The lesson generalises: a passing test over a broken unit is worse than no test, because it buys false confidence.

02

The keeper bounty could strand the protocol permanently

The rebase clamped the staker reward to available excess reserves, then added the bounty on top, unclamped. With a treasury at zero excess, minting reverted — so advancing the epoch reverted, meaning nobody could ever advance it. A protocol that silently stops rebasing forever.

The bounty is now paid from inside the same cap, keeper first, because an unadvanced epoch is worse than an unpaid staker.

03

Backing reserves did not exclude what the documentation claimed

The function’s comment said it excluded protocol-owned exposure. The body was a pass-through that excluded nothing.

Harmless while the protocol’s own token is not whitelisted — but the moment a token/index liquidity position is whitelisted, which the tier table explicitly provides for, the token’s own value enters its own backing. The predecessor held 73% of its treasury in its own token, so price declines cut backing, which cut price further. Reflexivity only becomes negligible near 1%.

04

A documentation lie about the mint backstop

Excess reserves claimed to revert on underflow when under-collateralised. It returns zero. The safety property still holds — callers enforce it — but a reader trusting that comment would believe in a guarantee that does not exist.

/ 003NOT A BUG

One design consequence.

A treasury seeded at exactly parity emits nothing.

The mint gate binds at 1.01× backing, deliberately, so it bites before dilution rather than after — unlike the predecessor’s gate at exactly 1.0, where the backstop engaged only once the dilution had already happened.

The consequence: seed at $1.00 backing per token and excess reserves are zero, so there are no staking rewards and no keeper bounty until backing grows through fees or appreciation.

That is a launch decision, not a defect. Either seed above the floor, or accept a quiet period at the start. Both states are demonstrated in the test fixture.

/ 004INHERITANCE

Kept, and rejected.

Kept

The gons pattern for rebasing, the index stored once at genesis, the permissionless bounty-paid rebase, warmup held in gons, bond notes denominated in the wrapper and staked immediately, excess reserves as a hard mint gate, balanced-point liquidity valuation, and the timelocked permission queue.

Rejected

  • Fixed-fraction-of-supply emissions. The predecessor’s rate was a fixed fraction of supply minted every eight hours — 0.35% per epoch compounds to roughly 4,487% annual inflation. Rebases mint tokens but create no backing, so when bond demand slowed, supply inflated against a static treasury.
  • A stepped emission curve. Gameable at every boundary: at 1.30× the rate jumped four-fold, an 11.6% to 55.1% annual swing from an infinitesimal move in premium, with roughly 1,095 windows a year at each of five boundaries and two handles to push.
  • A headline APY. Emission figures render muted throughout, never as a yield. The compounded number rises as holders unstake, because the same mint divides among fewer stakers — a signal that looks bullish precisely when the system is failing.

Bugs specifically avoided from the predecessor and its forks: an epoch countdown that reverted when overdue; missed epochs silently skipped rather than caught up; a warmup expiry any third party could extend indefinitely with dust, rated High in a fork’s audit; unchecked downcasts on user-supplied amounts; live decimals reads; and inconsistent rebase-before-conversion between staking and wrapping, which let wrapping either side of an epoch boundary convert at different indices.

/ 005STILL OPEN

What is not settled.

Unaudited, and the code audit is not the expensive risk. The predecessor died of mechanism design, not assertion failures. A separate economic review — agent-based simulation of the emission policy, the redemption floor under stress, and reflexivity at various own-token treasury shares — matters more here than line-by-line code review. Formal verification proves only what the specification asserts, and non-linear arithmetic is where solvers struggle most.

The floor is a liquidity problem, not a treasury problem.

The predecessor holds roughly $195m of treasury against about $11.20 of backing per token, trading near $20 — a persistent premium nobody arbitrages, on roughly $97,000 of daily volume. Enormous backing, near-zero liquidity, permanent premium. Treasury size did not separate the surviving forks from the dead ones; one fork holding real assets sits at a five-figure market cap.

Liquidity here is unproven. A 4,000-block scan for transfer events on a live tokenized equity on the target chain returned zero. The redemption arbitrage band assumes an arbitrageur can liquidate the in-kind basket; if depth is thin, the band is wider and the floor softer than computed. Measure it per asset before committing capital.

Legal. Permissionless redemption at net asset value is plausibly what converts this into a collective investment scheme — the feature that makes the floor credible is the feature that creates the liability. Two independent UK perimeters apply, and the US Investment Company Act question turns on the asset mix regardless of token classification.

Bytecode caveat. The finding that tokenized equities carry no transfer restrictions rests on decompiled bytecode, not verified source. A testnet transfer-to-contract closes it cheaply and should be done before writing integration code against it.

Proxy upgradeability. The tokenized-equity implementations sit behind proxies, so transfer restrictions could be added later. The largest protocol risk, and outside our control.

Name. The chosen ticker already exists as a live token on the target chain, and a prior project of the same name failed in DeFi in 2021. Proceeding was a deliberate decision made with those findings in hand; ticker and search confusion is the accepted cost.

/ 006SEQUENCE

What to do next.

  1. Testnet integration proof. A real tokenized equity into and out of the treasury, confirming the transfer, the price feed and the multiplier treatment. The cheapest risk retirement available.
  2. Legal opinion. Before mainnet, not before an audit. The redemption question is the crux and it may change the design.
  3. Economic review. Agent-based simulation of the emission policy and the floor.
  4. Code audit, then remediation, then a second pass on changed code.
  5. Depth measurement on both legs before sizing the seed.
  6. Narrow launch. Index exposure and a cash buffer only; single names once the oracle set and depth are proven.