Free TON

Contest Proposal: Tick-tock messages aka Timer smart contract

Short description

Objective: Provide a fully on-chain time-based alarm service to be used by other smart-contracts developers and smart-contract systems.

Contest dates

November 10, 2020 - November 23, 2020 end of the day by timestamp in your location. There
will be a 24-hour countdown clock on the last day of possible contest submission entry.

Voting cycle:

7 days

Motivation

Certain time-bound smart-contract systems require a specific kind of interaction with an on-chain entity in order to fulfill their functional requirements. Time-lock might not be sufficient if the system has to perform a certain kind of action before a particular moment in time, and oracle-like mechanisms fetching off-chain data are unacceptable due to the low reliability.

One of the examples is decentralized staking pools (or DePools), bound to the Validator elections timeline.

Task

Implement an on-chain time-based alarm service.

Submission format and requirements

Interface: Timer should provide a programmatic mechanism for the client smart-contract to be notified upon the time expiration.

Reliability: Upon a valid request, the timer should communicate to the client smart-contract via callback mechanism.

Accuracy: Timer should call back within a certain time interval related to the specified timestamp.

Documentation: The contest submission should contain a description of the operation of the smart-contact or the smart-contract system.

Free software: The source code of smart contracts is published in an open Git repository on any public service (GitHub, GitLab, BitBucket, etc.) under any free software license.

Submitting for the contest, explicitly indicate the hash of the contest commit on master branch. All subsequent changes of the code will be ignored in voting stage. If the commit isn’t specified in submission, then the commit for voting is considered the actual commit of master branch at the time of submission filing.

Evaluation criteria

Considering the following criteria set, the submission score increases:

  • Compliance with declared in “Submission format and requirements” functionality
  • Supportability (quality of code, quality of documentation)
  • Quality of design and development
    • main criteria: the accuracy of the timer and the measurement error

Notes

Jury:

  • The juror must have a solid understanding of the described technology to provide a score and feedback. If not, the juror should choose to “Abstain”.

Voting:

  • The juror must have a solid understanding of the described technology to provide a score and feedback. If not, the juror should choose to “Abstain”.
  • Jurors is obliged to vote only the commit specified in the application. If the commit isn’t explicitly indicated, the jury is obliged to vote the actual commit of master branch at the time of submission filing.
  • Jurors or whose team(s) intend to participate in this contest by providing submissions lose their right to vote in this contest.
  • Each juror will vote by rating each submission on a scale of 1 to 10 or can choose to reject it if it does not meet requirements or vote “Abstain” if they feel unqualified to judge.
  • Jurors must provide feedback on submissions or lose their reward.
  • The Jury will reject duplicate, sub-par, incomplete, or inappropriate submissions.
  • The number of days for jury voting is hereby set at 7 days.

Contest Rewards

  • 1 place: 36,000 TONs
  • 2 place: 27,000 TONs
  • 3 place: 18,000 TONs
  • 4-7 place: 3,600 TONs
  • 8-15 place: 1200 TONs
  • 16-30 place: 500 TONs
  • Total amount: 112,500 TONs

Reward Distribution

  • Winners receive 50% of their rewards when contest results are evaluated.
  • Another 50% will be vested in equal parts over a 12-month period with monthly payouts.
  • To receive all 12 distributions, the solution should be supported for 1 year
    • The code should be updated within a reasonable timeframe - 1 month maximum, and according to main library changes.
    • Major GitHub Issues should be resolved within a reasonable timeframe - 1 month maximum.

Jury Rewards:

An amount equal to 5% of the total sum of all total tokens awarded to contest winners will be distributed among jurors who vote and provide feedback. This percentage will be awarded on the following basis:

  • The percentage of tokens awarded to the jury will be distributed based on the number of votes each juror casts. For example, if one juror votes 50 times and another juror votes 5 times, the juror who votes 50 times will get 10 times more tokens than the juror who votes 5 times.
  • Feedback is mandatory to collect any rewards.
  • In this particular contest, the contestants have a vesting period for their reward distributions. The jurors do not. Jurors will receive their rewards upon completion of the contest in one lump sum, i.e., no vesting period, and as a part of the cumulative 100% reward figure regardless of the long term outcome.

Procedural requirements:

Accessibility. All submissions must be accessible for the jury to open and view, so please double-check your submission. If the submission is inaccessible or does not fit the criteria described, jurors may reject the submission.

Timing. Contestants must submit their work before the closing of the filing of applications. If not submitted on time, the submission will not count.

Contact. Each submission must have an identifiable contact that can be matched with your description. If you have not provided a forum description for discussion, then your application should contain links to your online persona, for example, a Telegram ID (preferred) or other direct contact information that can confirm that the submitted work is yours. In the absence of confirmation by the contestant of the authorship of the submitted work, the submission may be rejected.

Multiple submissions

  • Each contestant has the right to provide several submissions if they are all different from one another. If they are too similar, or in any way appear to be partially the same work done twice, or if they appear to be one whole body of work divided into parts to create the illusion of several submissions, jurors have the right to reject such submissions.
  • If the contestant wants to make an additional submission to replace a previously published submission, the contestant must inform the jury about this fact and indicate which submission is the one to be judged. In this case, only the indicated work will count. If the contestant fails to indicate which submission to judge, only the first submission that is uploaded by timestamp will count. The Jury will reject all others.

Disclaimer

Anyone can participate, but Free TON cannot distribute tokens to US citizens or US entities.

3 Likes

i am also in deal, it is good practice for me, for write solidity smart-contracts

I believe that cost per tick (internal timer) should be one of the main evaluation criteria. At the same time main criteria: the accuracy of the timer and the measurement error is something totally senseless: accuracy will be determined by block rate (thus by validators action) not by something that is under control of smartcontract.

1 Like

Hello, I’m participating in this contest.

Please find my submission in PDF in DevEx subgov interface

Hello there!

I’m glad to present my submission for Tick-tock messages aka TImer smart contract contest developed at SVOI.dev labs!

This is Tick-Tock messages based Timer for smart contracts that allows you to shedule your smart contract call for desired time.

Please read PDF for more info, including info how smart contract works and it’s features as well as how it fits presented requirements, also be sure to check Roadmap for contract development and support.

Smart contract code can be found here: https://github.com/SVOIcom/TickTockContract
PDF will be linked to post.

Thanks for your attention :slight_smile:

Contacts:
Tg profile: @pafaul
FreeTon forum: Ftar
Github: https://github.com/Pafaul

TickTock Timer Contract

Submision PDF

Contacts

Telegram: @estonianavocado
Forum: @pirate

Following discussion we had in devex telegram group, I submit two distinct solutions based on ticktock mechanism and based on loop message chain.
Let me cite my submission:

General scheduler which spends gas for work may be quite expensive. However anybody can deploy one without cooperation with anybody else. Alternative solution which based on tick-tock special contracts is available in the other repository. While special contract soultion doesn’t require gas for work, it however requires cooperation of validators to instantiate such contract. Thus while both solutions have pros and cons they are not mutually exclusive: both are suitable for their niches.

This post is devoted to looped chain based solution. I want to note that I came with this idea and developed first version literally more than year ago https://t.me/ton_overview/30 : 19 october of 2019. Since then contract was polished and made more economically robust.
https://github.com/EmelyanenkoK/freeton_scheduler

This post is devoted to ticktock based solution:

Reserved for my submission

Will post my submission here


Submission