canopy
Architecture decision / 01 14 September 2026

Where should
the grid live?

Keep the money and the rules on-chain.
Choose how the trades get there.

01 / Major architecture choices

Three ways to execute a grid.

Switch designs to compare the transaction path, operating dependencies, and reason to choose each one.

A / Hybrid executor

Workers propose. The account verifies.

Mermaid / system flow
■ On-chain enforcement■ Off-chain computation■ External market / infrastructure◆ Gate / dependency● Owner action→ Action or assets · ⇢ Data / proposal
Relative tradeoffs — engineering judgment, not measured benchmarks
Decision dimensionA / HybridB / v4 makerC / Intents
Liquidity accessExisting supported poolsNew pool; attract flowParticipating fillers and routes
Source of returnGrid spread after taker costsInventory spread + eligible LP feesGrid spread after quoted costs
Who initiates a fill?KeeperIncoming pool traderFiller submits settlement
Where trust remainsKeeper timing; oracle; adaptersHook correctness; pool routingOrder delivery; filler availability
Contract complexityModerate: mandate + accountingHigh: callbacks + aggregated claimsModerate–high: recurring state + signatures
Public strategy exposureGrid visible on-chainLiquidity bands visibleRevealed orders; future levels may stay private
Choose when…We want to validate execution nowWe can attract profitable flowFillers improve all-in execution

A custom on-chain order book is a fourth option, but adds matching, liquidity acquisition, and audit work. Revisit only if these designs cannot express a demonstrated requirement.

02 / The trust boundary

Keep authority smaller than the strategy.

Off-chain workers can be sophisticated. Their spending authority should be narrow, testable, and revocable.

One attempted fill

Same color legend as above. A failed gate rejects the transaction.

Enforce in the contract

  • Pair, direction, eligible level, and remaining quantity.
  • Minimum net output, inventory budget, and fee caps.
  • Deadline, policy version, and replay protection.
  • Strategy-owned recipients and reviewed adapters.
  • Partial fills rearm only the quantity actually acquired.

Compute off-chain

Search parameters, watch prices, compare routes, simulate calls, build market calendars, submit transactions, and reconcile receipts.

Safe custody ≠ guaranteed execution

A keeper outage can miss a trade. Owner withdrawal must remain available without that keeper or a mandatory market sale.

Initial ownership model

Isolate each user’s strategy budget. Pooled vaults add share pricing, fair entry/exit, and redemption accounting before they add an execution advantage.

03 / What v4 changes

A crossed range is not yet a locked fill.

Concentrated liquidity converts across a band. If it remains deposited, a reversal can convert it back.

Maker-grid lifecycle

Concept / requires custom implementation
The atomic step matters.

Finalize fully crossed ranges in the swap transaction. Deferring rearming can miss a reversal; deferring removal can undo the supposed fill. Partial ranges remain partially exposed.

01

Hooks

Run fill logic inside pool operations. A new hook needs a new pool and its own incoming flow.

02

Singleton + net settlement

Batch liquidity changes and swaps with fewer token transfers. Custom logic still costs gas.

03

Dynamic fees

Price volatility and inventory risk. Higher fees may push traders elsewhere.

04

Custom accounting

Enables bespoke matching. More flexibility also means more solvency and rounding logic to audit.

Design constraint: aggregate users by level and generation, with individual claims. Bound work for large price jumps; never loop over every user during every swap. Native ETH support is useful for ETH routes, but secondary for a stock/stablecoin grid.

04 / The overnight decision

Trading hours and price freshness are different clocks.

Secondary trading can continue while an underlying reference feed is frozen. Test the session and the data independently.

09:30–16:00Regular
16:00–20:00After-hours
20:00–04:00Overnight
04:00–09:30Premarket

Illustrative weekday windows · America/New_York · asset availability, holidays, early closes, and DST require a market calendar.

Proposed oracle-dependent execution gate

Three prices to keep separate

  1. Underlying equity price — raw share price.
  2. Token reference value — already multiplier-adjusted on the oracle.
  3. Executable quote — output available for our actual size.

The REST API’s daily volume describes underlying equity trading. It cannot establish on-chain exit depth.

For RH-issued tokens, direct mint/redemption access and offering eligibility are separate constraints; ERC-20 transferability does not remove them.

05 / Make the architecture earn its complexity

How much room is left in each cycle?

A cost sensitivity sketch for a completed taker cycle. These inputs are hypothetical, not Robinhood fee estimates or a profitability forecast.

Approximate residual per completed cycle

1 basis point (bp) = 0.01%. Excludes inventory losses, failed attempts, recentering, and terminal liquidation. Maker economics require a separate model of fills, fees, and inventory.

Decision to make now

Prove the execution path before building a new market.

1

Measure

Exact pools, session depth, executable quotes, fees and fresh feeds.

2

Shadow

Replay the intended mandate with realistic fills and inventory limits.

3

Constrain

Fork-test the strategy account, failed gates, cancellation and recovery.

4

Compare

Pilot after review; benchmark fillers and a maker hook on equal capital.

Choose A to test the strategy fastest. Choose B when owning liquidity is the product. Add C when actual quotes demonstrate better execution.

Evidence behind the sketches

Official documentation establishes capabilities, not successful fills or profitable operation. The existing hourly histories remain candidate-screening data.

Robinhood deployment ↗v4 hooks & constraints ↗Flash accounting ↗Dynamic fees ↗Range-order semantics ↗Experimental hook reference ↗Feed hours & freshness ↗Stock-token API ↗Token mechanics & eligibility ↗Intent settlement ↗