Pixel art of Osaka Castle silhouetted under a full moon, framed by an ancient cherry blossom tree in full bloom
HANAMI · time-bounded liquidity

Liquidity that knows
when to fall.

Time-bounded LP positions on Solana. Each bloom opens at deposit, accrues fees while it lives, and auto-settles at end_slot. Impermanent loss is bounded by design, not by hope.

14 / 14 tests passingAnchor 0.31.1MagicBlock-readyLighthouse-compatible
Scroll
The mechanism · 流れ

Four instructions.
One opinionated lifecycle.

  1. Deposit

    You pick the timeline.

    Open a bloom by supplying token A and B and choosing a duration in slots. The position mints LP shares pro-rata against current reserves and snapshots the fee accumulator at entry. No retroactive fees ever leak in.

    create_bloom(amount_a, amount_b, end_slot)
  2. Bloom

    Fees route to who was there.

    While the bloom lives, swaps accrue fees only to LPs whose entry snapshot precedes them. On MagicBlock the position rebalances at 10ms; on base L1 it rebalances per slot. Late entrants do not steal early yield.

    swap(in, out, a_to_b) // 400ms blocks
  3. Fall

    Anyone closes the position.

    At end_slot the bloom is permissionlessly settleable. Principal returns scaled by current reserves, fees by cumulative delta times shares. Impermanent loss is mathematically capped because the timeline is finite.

    settle_bloom() // permissionless
  4. Chirigiwa

    Honourable exit, fixed cost.

    Need out before maturity? chirigiwa() pays your principal minus a 5% penalty plus accrued fees. The penalty stays in the pool and accrues to remaining LPs. No forced unwinds, no liquidation cascades.

    chirigiwa() // 5% principal penalty
Pixel art shinobi climbing the stone wall of a Japanese castle at night, cherry blossoms drifting and a crescent moon overhead
武士道 · the way

The blade either stays sheathed
or strikes cleanly.

HANAMI exits work the same way. A position runs to end_slot and settles permissionlessly, or the holder draws chirigiwa() for an honourable early exit at a fixed 5% penalty. There is no third path.

二択 · two paths

One position. Two exits.
Both honourable.

A

Settle

Wait for the bloom to mature. At end_slot anyone can call settle_bloom: principal returns scaled by current reserves, fees by cumulative_delta × shares. Permissionless, no race.

  • + full principal, fee-weighted
  • + permissionless caller
  • + atomic settlement
B

Chirigiwa

Need out before maturity. chirigiwa() pays back your principal minus a fixed 5% penalty plus accrued fees. The penalty stays in the pool and rewards remaining LPs. No forced unwind, no liquidation cascade.

  • − 5% principal penalty
  • + honour intact, exit clean
  • + remaining LPs benefit
Backtest · SOL/USDC, 1-day bloom
73%

less impermanent loss
than Uniswap V2 full-range LP.

Bounded timeline ⇒ bounded divergence. Run the suite yourself: anchor test --skip-build.

10ms
Rebalance latency

Active-position window on MagicBlock ephemeral rollup. Base L1 falls back to per-slot.

400ms
Block finality

Solana mainnet. Settlement clears in one block, no 12s wait, no partial-fill risk.

14/ 14
Tests passing

Full integration suite on solana-test-validator. Fee isolation, chirigiwa, double-settle.

Stack · 道具

Built on the boring parts of Solana
that actually scale.

No custom L2, no zk-rollup retrofitted onto Solana. HANAMI uses primitives already on mainnet, and degrades gracefully when premium layers are absent.

  • Solana SVM400ms slots · parallel exec
  • Anchor 0.31.1Rust 1.95 · IDL build
  • SPL + Token-2022transfer hooks ready
  • MagicBlockephemeral rollup drop-in
  • Lighthouseatomic post-conditions
  • Pyth pull oracleTWAP for chirigiwa
  • Jito bundlesMEV-defended settle
  • Light compression1000× cheaper state
Reproduce

It runs on your machine in five minutes.

Clone, build, test. The whole engine is one Anchor program plus 14 integration tests. No private simulators, no cherry-picked numbers.

# clone the repo
git clone https://github.com/baayoo/hanami.git
cd hanami

# build the on-chain program
anchor build

# run the integration suite
anchor test --skip-build

# expected output
  hanami
 initializes pool
 alice creates first bloom
 trader swaps A→B, fees accumulate
 bob chirigiwa (7.57% total exit)
 alice settles, captures +3.9% fee gain
 rejects double settle
  ...

  14 passing (1m)
Deployment

Fully reproducible build.

The program builds, the tests pass, the IDL is published. Clone, run anchor test, watch all 14 pass.

Program ID
BeGzo6j9d6YPXXq93Y5mrnnGCyKPoVh2qQFD8Frnrsrn
Network
solana-devnet · stage: pre-deployment
Pixel art lone samurai walking down a long stone path at dusk, sakura petals scattered, distant mountains and a single cherry tree on a hill
散り際 · the parting

Every bloom ends.
HANAMI just makes the ending honest.