Using Time Locked Contracts
Last updated
Last updated
Time locked contracts are CompX native staking contracts that require users to lock up their tokens for a user-determined time period. Overall, the users stake weight is made up not only of how much of the token has been deposited, but also how long it locked away. As a result of this, users are encouraged to stake for the maximum length of time to get the maximum yield. If interested utilizing our time locked contracts, select an asset that is available in a time locked contract. These contracts are identifiable using the icon of a clock in the top right corner of the pool's GUI card. An example of a time locked pool can be seen below.
The card discloses several pieces of information to the user.
Total Rewards - How many reward tokens are up for claiming.
Minimum Staking Period - The lowest amount of time that a user can opt to lock up their stake.
Staking Ends At - The time at which the contract will expire. This is the endpoint for how long a user can opt to stake their tokens.
Total Staked - How many user tokens have been locked up in the contract.
View Contract - Users can view the smart contract on any of Algorands blockchain explorers. Clicking on one of the 3 icons will open the contract using that tool.
The card for the staking pool informs the user of the parameter boundaries of the staking contract, as can be seen above. The user can buy the staked token by selecting the "Buy $Token" button. This will take the user to the CompX swap router, the router will be pre-filled out for the desired vault, with Algo as the default purchase token.
Once tokens are acquired or if the user already holds the staked token in their wallet, the user must opt into the staking contract. First click on the "STAKE $Token" button, this will open a pop up window that allows the user to "Opt In to Application". This will send a small transaction to the users connected wallet that needs to be signed. After the user is opted in, the "Stake" button will replace the "Opt in to Application" button and the user can then complete the staking process, the user can configure the staking parameters by entering the amount of tokens and length of time to stake, within the limitations of the offered contract. Then the user can activate the new "Stake" button, sign the necessary transactions and their stake will be deposited into the contract. These can be re-claimed after the user defined period has elapsed, with the resulting rewards.