DEV Community

Cover image for Week 5 on TON: Actor model and the chain that doesn't speak EVM
Satori Geeks
Satori Geeks

Posted on

Week 5 on TON: Actor model and the chain that doesn't speak EVM

Week 5 was the Wildcard slot. No category constraint — just "what's at the frontier?" Why I picked TON over Monad covers the decision. This is about what happened once the code ran.

String.length doesn't exist

Hour one on Tact. I had the research doc open — the one the Research Agent prepared — and it documented String.length as the byte-length API. Tact 1.6.13 disagreed: "Type 'String' does not have a field named 'length'."

In Tact, a String isn't a primitive with a length property. It's a snake-encoded cell chain — the data lives across a series of cells, each holding up to 1023 bits, with a reference to the next. To get byte length, you walk the chain:

fun countStringBytes(s: Slice): Int {
    let total: Int = s.bits() / 8;
    while (!s.refsEmpty()) {
        s = s.loadRef().asSlice();
        total = total + s.bits() / 8;
    }
    return total;
}
Enter fullscreen mode Exit fullscreen mode

Three lines. One hour lost. The research doc had the error; the compiler had the answer. (Which is, honestly, what a research process is for — put the gotchas somewhere findable, even if a detail turns out wrong.)

The QR deploy

Best deploy experience of the five weeks.

npx blueprint run deployProofOfSupport --tonconnect — the terminal prints a QR code. Tonkeeper on the phone scans it. Pre-filled transaction. One tap. Contract on-chain in under two minutes.

No faucet hunting — Tonkeeper testnet has a built-in "Get test TON" button, which I appreciated more than I expected to. No MetaMask popup. No RPC endpoint config. The chain with the lowest rubric ceiling in this series has the smoothest deploy UX. I'm still a little surprised by that.

(Verification on verifier.ton.org is different: multiple manual upload steps, sign a transaction, wait for the verifier backend to recompile. The deploy is elegant; the verify is not. Both show up in the scores.)

No ReentrancyGuard

Writing the withdraw() handler, I dropped in the obligatory comment about why there's no reentrancy guard. Then I stopped and actually thought about whether the comment was right, or just reflex.

TON's actor model means every contract processes one inbound message at a time, to completion, before the next arrives. All cross-contract communication is async message-passing — there are no synchronous external calls. The reentrancy attack (call external → external calls back before you finish → state inconsistency) can't happen. Not "the guard stops it." It structurally cannot happen.

For someone who adds ReentrancyGuard on reflex in Solidity, this takes a beat. Not long. But you do have to actually believe it, not just note it and move on.

Rubric

Dimension Est. Actual Notes
D1 Getting Started 3 3 String.length cost an hour; faucet built into Tonkeeper is a plus
D2 Developer Tooling 4 4 Blueprint + sandbox excellent; build/ gitignore complicates frontend
D3 Contract Authoring 3 3 Actor model shift is real; string workaround non-obvious
D4 Documentation Quality 3 3 Good on syntax, thin on edge cases — research doc had the error
D5 Frontend / Wallet 4 4 TON Connect UX — injection pattern works cleanly
D6 Deployment Experience 3 3 QR deploy smooth; verifier.ton.org requires manual steps
D7 Transaction Cost 5 5 ~0.01–0.03 TON per tip, effectively free
D8 Community & Ecosystem 4 4 Telegram dev community active and responsive
Total 43/60 43/60 Zero delta across all eight dimensions

Full methodology can be found here.

Zero delta on all eight. The estimate was made before I'd written a line of Tact. Every dimension landed exactly where I'd called it, on a chain most EVM developers haven't touched. Call it calibration. Maybe a smooth build. Probably some of both.

Verdict

43/60. Different execution model, different key scheme, language I'd never written. The pick — story ceiling over rubric ceiling — held up once the code was written.


→ The live app is at https://proof-of-support.pages.dev

→ Scoring methodology for the series: How I'm Scoring the Chains

→ Contract: tonscan

→ Source verified: verifier.ton.org (search by contract address EQDky-DsNW5pOFD9hxljR68dmkMmT2kF4N3zWpyVWhBmjHub)

Top comments (0)