Hash Bonsai runs on Sui mainnet. Each week ends with a settlement and payout.
The Gardener is a bot that writes a short summary when an epoch wraps up, saves it to Walrus, and remembers what it predicted for the next one. When that next epoch finishes, regular code (not an LLM) checks the chain to see if the guess was right. The verdict gets logged either way.
Built for the Walrus x Tatum Total Recall hackathon.
- Demo (2:59): https://www.youtube.com/watch?v=CBSYokToOAU
- Code: https://github.com/hashbonsai/hash-bonsai-gardener
- Live records: https://hashbonsai.wal.app/garden
How it runs
A systemd timer wakes up once an hour and checks if an epoch just closed. If not, exit. If yes:
- Pull the raw chain state: active players, drains, SUI prize pool, PRUNE payouts, arena standings.
- Calculate every number in code. Never let the LLM do arithmetic.
- Have the model draft a brief first-person commentary (EN + JA).
- Run strict checks on the draft before saving:
- Any number mentioned must match the chain data down to the exact digit.
- Reject any draft that mentions token price, trading, or returns.
- Max 4 numbers allowed.
- If it fails validation twice, drop the text and just post the raw numbers.
- Human review gate. Once a person approves it, it writes to Walrus.
The bot wallet has strict limits: it can only sign Walrus storage transactions and pay gas. It has no permission to call the game contracts, holds no PRUNE, and cannot vote.
Tatum & Walrus
Tatum:
Reads and writes to Sui mainnet go through Tatum’s gRPC gateway (sui-mainnet-grpc.gateway.tatum.io:443). On the free tier (3 req/sec), the script rate-limits itself and handles 429 retries. Historical events come from GraphQL since public fullnodes drop gRPC history after a week or two.
Walrus:
Records are saved as JSON with deletable: false for the max epoch duration Walrus offers. After write, the script queries the chain to verify the undeletable flag took. Each record references the previous blob ID, creating a chain.
Example (Epoch 6 record):
https://aggregator.walrus-mainnet.walrus.space/v1/blobs/CGrn0R85_ncMV_rqtf_tDhoRkp0R9yRy9Vdgra9BYi4
Walrus Memory:
Holds 4 record types: raw facts, observations, verification grades, and operator notes on how to write. The grading is strictly deterministic code comparing numbers, zero model judgment. Mainnet currently holds 16 records.
What happened in practice
Epoch 4 was the first run, just numbers and a short write-up.
From Epoch 5 on, each report ended with a guess for the next epoch, written into Walrus Memory.
In Epoch 5, the model guessed drains would drop from 67 and player count would stay at 3.
Epoch 6 landed with 81 drains and 4 players.
The evaluation script ran, saw both were wrong, and logged it:
- Expected players in standing to hold (3): was 4. Miss.
- Expected drains to fall (<67): was 81. Miss.
The model didn't get to smooth it over. The published Epoch 6 text states directly: "It went from 3 to 4; I was wrong."
Adding memory didn't make the guesses smarter (it predicted fewer drains again for Epoch 6). What it does is make the Gardener accountable for what it said. Without memory there is nothing to look back at, so the commentary cannot say it was wrong.
Rough edges
- Walrus's WASM dependency won't bundle cleanly, so the runner needs a full
node_modulesinstall instead of a single bundled file. - Walrus contract upgrades break hardcoded package ID allowlists for signing until manually updated.
- Getting the LLM to write was the easy part. Most of the code is checks that stop it from making things up.
Next steps
Letting the bot spot multi-epoch patterns across the accumulated memory (e.g., 3 straight epochs of dropping volume) while keeping the same strict verification rules.
License: MIT
Top comments (0)