How Cratos used Chainlink Keepers to automate the token vesting process

Cratostoken
3 min readJun 21, 2022

--

Saving 100+ hours of DevOps time and removing the need for centralized scripts

What is Cratos?

Cratos is a V2E(Vote to Earn) cryptocurrency that can be used and earned on the Cratos app, a real-time voting app with 600K downloads and 300K registered users.

How Cratos uses Chainlink Keepers

We integrated Chainlink Keepers to help securely and cost-efficiently automate the token vesting process.

What is the Cratos token vesting process?

The token vesting process occurs every month, whereby a certain amount of tokens are unlocked from locked wallets. Chainlink Keepers help execute the function by unlocking the tokens every 30 days. Chainlink Keepers help ensure that token vesting is executed on time in a trust-minimized manner, giving users stronger guarantees that it will function exactly as intended.

How Cratos integrated Chainlink Keepers

Based on the Keepers documentation, we created and deployed a Keepers-compatible contract on remix.ethereum.org. Then, we registered the contract on the Chainlink Keeper Network to perform the Upkeep.

The Keeper-compatible contract, as attached, has a checkUpKeep function and a performUpkeep function. The checkUpKeep function is for calculating time — 30 days in the Cratos case. When the checkUpKeep function checks if 30 days have passed, the performUpKeep function is executed so that a certain amount of tokens is unlocked and distributed to a designated wallet address.

The token vesting contract is here: https://github.com/CratosTokenOfficial/ChainLink_Automation/blob/main/vesting_Contract.sol

Token vesting contract for CRTS

Chainlink Keepers continually check the Upkeep conditions every block. When the predefined conditions are met, they trigger the function to execute.

Creating our Keepers-compatible contract

checkUpkeep Function: Runs off-chain every block to determine if the performUpkeep function should be called on-chain.

checkUpkeep function for Chainlink Integration with CRTS

performUpkeep Function: Contains logic that is executed on-chain when the checkUpkeep function returns true.

performUpkeep function for Chainlink Integration with CRTS

Advice for developers integrating Keepers

A proper gas limit with some margin is recommended. If the gas exceeds this limit, the function will not execute on-chain. See best practices for setting gas limits here.

Results

By integrating Chainlink Keepers, we have saved 100+ hours of DevOps time and are able to remove centralized scripts.

Why Cratos chose Chainlink Keepers

Cratos team chose Chainlink Keepers considering its ease of implementation and strong security guarantees. We are very happy to announce that the token vesting process is now fully automated and decentralized without the efficiency bottlenecks caused by having to execute it manually.

About Cratos

Cratos is a leading V2E (Vote To Earn) cryptocurrency designed to facilitate citizen participation in the Cratos app, a real-time live vote platform where anyone can generate a vote and users can participate in the vote immediately, and the statistics of the results by gender and age are displayed to users to enhance the transparency of public opinion. Users can earn CRTS tokens by registration, creating a vote, leaving a comment, and participating in a vote.

Learn more about Cratos by visiting the links below.

Related links:

Telegram https://t.me/CratosOfficial
Twitter https://twitter.com/cratostoken
Website https://www.cratostoken.com/
CoinMarketCap https://coinmarketcap.com/currencies/cratos/
Cratos Global https://cratosglobal.page.link/medium

--

--

Cratostoken
Cratostoken

Written by Cratostoken

CRATOS is an ERC-20 utility token designed to facilitate citizen participation in the CRATOS app, a real-time live vote platform.

No responses yet