TGViewer
TON Contests TON Contests @toncontests · 129K subscribers
Post #140 167K
W5 Optimization Challenge

Prize:
up to 2,000 TON
Deadline: October 15, 23:59 UTC+4
Results: November 11

The Tonkeeper team is working on a new wallet standard called W5 aimed at replacing the currently used wallet v4R2. It will enable new exciting possibilities for TON that dramatically improve user experience for millions of people.

W5 supports gasless transactions, delegation and account recovery, subscription payments with tokens and Toncoin, and cheap multi-transfers. At the same time, W5 significantly reduces user and merchant fees.

Learn about W5 from our GitHub repository.

We invite talented Fift and FunC engineers to participate in optimizing W5. The most optimized solution that meets the requirements will win the contest.

Requirements
The goal is to optimize gas consumption for each of the three computation paths, where a single outgoing message of 1 TON to a regular basechain address is emitted from the wallet:

1. Processing an external signed message. Starting gas cost: 3135.
2. Processing an internal signed message. Starting gas cost: 4110.
3. Processing an internal message authenticated by an extension. The dictionary contains only that one extension. Starting gas cost: 2660.

The starting gas costs are measured when the entire contract code is offloaded to a library on a masterchain. Measurements were made on testnet.

Non-goals: optimizing the storage space, optimizing the code size (the code will be offloaded into a shared library and won’t cost anything to a user).

While optimizing these three cases, do not impede the remaining functionality. Minor trade-offs are acceptable, but a significant increase in cost, usage complexity, or loss of security may disqualify a candidate.

The resulting code in FunC or Fift must contain excellent documentation necessary for audit and a documented build process if it differs from the one we already use in the repository.

Implementation should be generally compatible with the ABI in the specification.

Minor changes to the storage and message layout are allowed for the performance if they do not break the functionality and do not complicate the ABI for apps. Please do not change the 32-bit opcodes. We reserve the right to decide which changes are acceptable. When in doubt, feel free to make two submissions: conservative & radical..

Deliverable
Pull-request to w5 repository.

Prizes
🥇The author of the winning implementation receives co-authorship credit in the project and 0.333 TON per gas unit saved in each of the three paths (external+signed, internal+signed, internal+extension).

We also reward original ideas with novel trade-offs and worthy follow-up attempts.

🥈The second place: 0.100 TON per gas unit.
🥉The third place: 0.050 TON per gas unit.

We will pay out only one prize per author. We will evaluate submissions one by one. To avoid copycats, we recommend you submit your code shortly before midnight on October 15 (UTC +4).

We can’t wait to see how your talents unfold in this challenge. Good luck!

For any questions, please contact @w5challenge
More from @toncontests
  1. Apr 21, 2026🏆 AppKit Motion Design Challenge: Winners $3000 prize pool, 42 submissions, 10 days, thre…
  2. Apr 17, 2026🏆 TON AI Agent Hackathon: Winners Two weeks. 160+ submissions. An incredible amount of ta…
  3. Apr 6, 2026🎬 AppKit Motion Challenge — $3,000 Prize Pool Create a short motion video for AppKit and…
  4. Mar 11, 2026💎 TON AI Agent Hackathon is here! $20,000. Two tracks. Two weeks. Track 1: Agent Infrastr…
  5. Oct 10, 2025TON x Ignyte Hackathon: Building the Web3 SuperApp Economy TON Foundation and Ignyte invit…
  6. Oct 9, 2025TON Demo Days are Back, and BIGGER than ever! 🚀 This fall, TON Demo Days are back with a…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →