Working with Staking
Make sure to implement the prerequisite code, or else the examples in this page will not work!
Socios.com users have two possibilities when staking do in-app:
Staking Fan Tokens.
Staking CHZ.
Furthermore, Socios.com partners can implement the Socios.com Fan Token staking mechanism on their own website.
Of note: When working with CHZ tokens in your project, you must use thecorrect addresses in your dApp. See here:
Testnet staking smartcontractsMainnet staking smartcontractsAbout "Stake & Earn"
By staking their Fan Tokens through their Socios.com Wallet, Socios.com users can earn Reward Points on a daily basis, and possibly get quick access to great Socios.com rewards and activities!
Each staked Fan Token will join an existing pool of rewards points, made of all the Fan Tokens staked by all Socios.com users.
The pool then works for all users, and the more Fan Tokens you have staked, the more reward points you can obtain in return.
There is only one smart contract address to stake any of the Socios.com Fan Tokens: 0x5ff7f9724fd477d9a07dcdb894d0ca7f8fae1501
Implementing Socios.com staking/unstaking on your own site
Socios.com partners can implement Fan Token staking right into their own platform.
This is done through a specific smart contract created by the Socios.com team. This Staking smart contract has 5 main features:
Staking
Locking
Processing the locks
Unstaking
Claiming
To implement staking, unstaking, and the other necessary fixtures, we provide you with the following sample code listing, ready for you to adapt to your own codebase.
Prerequisite: StakingABI JSON file
When working with staking, and for some use-cases described in this page (the ones that import stakingABI), you will need the below StakingABI.json file saved in your project folder.
Make sure that you import that file in your code in order to achieve the wanted step (the samples already have the necessary import code).
Setting up your Chiliz Viem Client
Your private key must only be used in server-side code. DO NOT release code on production with your private key shared on front-end side code.
Staking
Knowing what's staked
Unstaking
Checking the cooldown period
Claiming (after cooldown period)
Last updated