Chorus One / ton-pool-contracts

Chorus One / ton-pool-contracts


TON Pool provides an efficient staking solution on the TON blockchain by utilizing the two-queue smart contract system from the TON Whales project. By using two queues, the TON Pool ensures optimal resource use and enables validator efficiency.

To support these smart contracts, TON Pool employs a controller that manages the TON validator software. The controller is responsible for running the on-chain workflows necessary for running a TON validator.

  • Staking: Accept deposits into the contract and accept withdrawals.
  • Validator: Creating and managing election keys.
  • Election: Sending to the elector contract to get elected and recovering the stake after a validation cycle.

Prize distribution and scoring

Documentation

For architecture overview and contract interaction flow see our documentation:

There are two contracts which need to be reviewed.

  • The main one is nominators.fc, that’s where all the core logic is defined.

  • And then there is proxy.fc, it is used for passing messages from our pools on the workchain to the electors contract on the masterchain.

  • Walkthrough

Scope

Build Instructions

https://github.com/Cantina-Competitions/chorus-one?tab=readme-ov-file#how-to-build-the-contracts

  1. Install the funcjs npm package: make funcjs
  2. Build all contract: make build
  3. This will create contract code in base64 format in the .txt files.

The POC rule does not apply for this competition

We have our TON Pool contracts running on the testnet, if that can help to discover issues. Their addresses:

  • Pool contract 1: UQAHBakDk_E7qLlNQZxJDsqj_ruyAFpqarw85tO-c03fK4jK

  • Proxy contract 1: Uf-lMHJrKghS7CvFpONw9-5XkrhB00YwwgE08rm6dxfic8jh

  • Pool contract 2: UQCltujow9Sq3ZVPPU6CYGfqwDxYwjlmFGZ1Wt0bAYebimhn

  • Proxy contract 2: Uf8UbtIq5xANad6rRf0CpOyo3_7DEBG1KyvntgeKgTUnKWDw

Out of scope

Contact Us

For any issues or concerns regarding this competition, please reach out to the Cantina core team through the Cantina Discord.

Summary

Status

Completed

Total reward:

$25,000

Findings submitted:

158

Start date:

13 Jan 2025 8:00pm (local time)

End date:

27 Jan 2025 8:00pm (local time)