Enhancing TON Blockchain Security with The Locker Contract


The Locker Contract introduces a secure mechanism for locking and unlocking TON deposits, coupled with reward distribution, in a structured and time-bound manner. This innovative smart contract system is designed to facilitate users in making deposits, accruing rewards, and strategically unlocking their investments over predetermined periods. This comprehensive guide delves into the functionalities, operational procedures, and technical nuances of The Locker Contract, aiming to offer clarity and guidance for users looking to engage with this system on the TON blockchain.

Core Functionalities

The Locker Contract is equipped with a set of features designed to ensure a seamless and secure interaction for users:

Functionality Description
Total Coins Locked Displays the cumulative amount of TON deposits by all users.
Total Reward Indicates the total reward pool available in nanotons.
Deposit and Reward Timeline Specifies the timeframe for accepting deposits and rewards, delineating start and end times.
Vesting Schedule Outlines the vesting start time, total duration, and unlock periods for deposited funds.

Operational Guide

Making Deposits

Users can make deposits by sending a minimum of 50 TON to the contract with a specific text comment. These deposits are credited after deducting 1 TON for network costs. The system allows for multiple deposits, aggregating the total amount per user.

Reward Contributions

Similar to deposits, rewards are added by sending funds to the contract, accompanied by a designated text comment. These contributions enhance the total reward pool, which is proportionally distributed among users based on their deposit amounts.

Unlocking and Withdrawing Funds

The Locker Contract employs a vesting schedule to unlock deposits over time, allowing users to withdraw their funds incrementally. Withdrawal requests are made through sending a transaction to the contract, which then processes the unlocked amount for disbursement.

Smart Contracts Structure

The ecosystem comprises two pivotal contracts:

  • Locker: The primary contract holding all deposits and rewards.
  • Locker-bill: An auxiliary contract managing individual user deposits for efficient data handling.

Technical Overview

Project Composition

  • contracts: Contains the source code for The Locker Contract and associated dependencies.
  • wrappers: Provides wrapper classes for seamless interaction with the contracts.
  • tests: Ensures contract reliability through comprehensive testing.
  • scripts: Facilitates contract deployment and other operational tasks.

Deployment and Usage

To engage with The Locker Contract, users must follow a straightforward process involving code compilation, testing, and deployment. Initial setup requires sending 1 TON to the contract for storage purposes.


The Locker Contract on the TON blockchain offers a robust framework for managing deposits, rewards, and the strategic release of funds. By adhering to the outlined procedures and leveraging the provided functionalities, users can securely participate in this system, benefiting from a structured approach to investment on the TON platform. With its meticulous design and operational transparency, The Locker Contract represents a significant advancement in blockchain finance management.