Join our Newsletter — 33% off our NHI Course

Tolk in TON contracts: what changes for security audits?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 18346
Topic starter  

TL;DR: Tolk makes TON contracts safer to write by replacing FunC’s manual cell, slice, and message bookkeeping with named structs, typed serialization, lazy loading, and explicit mutation, according to CertiK, but security-critical checks, replay resistance, and upgrade governance still require full audit attention. Stronger types reduce parsing mistakes; they do not remove protocol-level authorization and accounting risk.

Editorial analysis by NHI Mgmt Group, based on content published by CertiK: “Tolk Security Explained: From FunC’s Engineering Pain Points to New Audit Considerations”.

Key questions

Q: How should teams review TON contract migrations when moving from FunC to Tolk?

A: Review the migration as a compatibility exercise first and a language upgrade second.

Q: Why can lazy parsing create security risk in smart contracts?

A: Lazy parsing can defer validation until after a contract has already made a decision based on partial data.

Q: What do security teams get wrong about typed smart contract schemas?

A: They sometimes assume that a typed schema guarantees the business logic is sound.

Practitioner guidance

  • Review storage schemas against historical on-chain layouts Confirm that any Tolk struct preserves the exact bit-level order and width of legacy FunC state before deployment or migration.
  • Validate every security-critical field before state changes Read and check sender authority, expiry, sequence, and any amount-bearing fields before accepting messages, committing storage, or sending assets.
  • Eliminate duplicate reader-writer logic for message bodies Define each message layout once and derive both encoding and decoding from the same typed declaration to prevent cursor drift and width mismatch.

Bottom line: Tolk reduces a large class of TON contract errors by making layout, typing, and message serialization explicit, but it does not replace protocol review.

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →



   
Quote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.