Boost your Tokenomics with Stakings
In previous chapters, we have covered how you can easily create standard and advanced ERC-20 / BEP-20 tokens:
Now in this article, we will show you how you can create a Staking tool for your token, we will also look at the impact on the tokenomics of your assets and how you can easily achieve it without coding a single line.
What is Staking?
Simply put, the staking process consists of locking cryptocurrencies in an ecosystem to receive profits or rewards.
It is very similar to HODLing, but instead of having the funds stuck in a wallet, they are producing extra rewards.
Types of Staking
There are several types of staking, including:
- Yield farming: which involves locking funds on a loan / lending platform.
- Liquidity Pool: Holders can add their tokens in pairs to an exchange or similar services for rewards.
- NFT Staking: Some groups offer the ability to stake NFT items for rewards or level up the NFT items.
- Blockchain Stakings: some projects like ETH2, Polkadot, Tezos and many more offer Staking rewards to users to maintain certain aspects of the Blockchain.
Supply & Demand law and Tokenomics
In this article we are going to consider the ERC-20 Stakings scenario, where a user stakes his tokens to get rewards.
The law of supply and demand explains the interaction between sellers and buyers of a resource.
Generally, in trading markets, buying pressure causes a price increase, because people are willing to pay more due to a limited offer, and vice versa when selling pressure increases.
So the logic is a simple virtuous cycle:
Of course, there are many variables that cause the price of an asset to go up or down, but certainly rewarding token holders for staking is a step in the right direction.
What is Ube?
Inspired by the Filipino tuber sweet flavor, Ube is the name of one of the Smart Contracts of the WPSmartContracts.com suite.
Ube Stakes Smart Contracts is a very simple contract, that allows ERC-20 / BEP-20 token holders to be able to create a Stake and gain interest, based on a predefined APY.
In this way Token owners can distribute rewards to token holders, promoting their projects and adding value to their communities.
Interest on the Ube Smart Contract are calculated every second, given the stakers the possibility to monitor their earnings on real time.
How Ube Works?
The interest payment comes from the creator account of the contract. If you want to create a staking contract, you must provide the funds for the contract to pay interest to the token holders.
The process is the following:
- Create the Staking contract
- Approve funds for use by your contract: the tokens are not deducted from your account at the time of approval, they are used on demand when the tokens are needed for interest payment.
- Token holders can create as many stakes as they want, based on a minimum amount
- Penalties: if token holders ends the stake before they mature, a penalty will be deducted from the user’s stake and sent directly to the manager account.
- Interests: if the token holders ends the stake after the stakes are mature, then the token holder will get the original amount of tokens wagered plus interest.
Create an Ube Staking Smart Contract
An Ube Smart Contract can be defined by:
- The ERC-20 / BEP-20 compliant token used to stake
- Annual interest rate (APY)
- Maturity time (in days): your users can claim rewards only if they remain staked for at least this number of days.
- Minimum amount: stakings has to be created with this minimum amount of tokens
- Login into your WordPress install.
- Login into Metamask in your desired network
- Click “Stakes” — “Add new”
- Fill in the token address
- Fill in the interest rate
- Fill in the minimum stake time
- Minimum time in days, greater or equal to 0
- Optionally, you can fill in the penalization
- Fill in the minimum amount for stakes
- Click on deploy
- Accept the terms of the service (if you agree)
- And confirm the transaction in Metamask
When your contract is deployed you need to approve tokens funds to pay interests:
- Login into your WordPress install.
- Login into Metamask with your admin account
- Go to your stake page
- Click on approve button
- Fill in the amount you want to approve
- Click on approve button
- Confirm you transaction in Metamask
Create a Stake
Now your Staking contract is ready, and your users can start creating stakes.
To create stakes the user just need to follow these steps:
- To have enough funds of the token
- Approve the desired amount to the stake contract
- Confirm the Stake creation
Monitoring / ending a Stake
Once created, the user can monitor the evolution of their stakes just visiting the staking page and logging in into Metamask.
The stakes amounts will be updated every few seconds.
For every stake created you will see:
- Dates: Start date if open, and Start and end date if it is ended
- Progress of the stake: the stake is mature when it reaches the 100%. After that the penalization phase is over and the user can get the interests when ending the stake
- Amounts: amount of stake, penalization (in red) if any, or interest in teal (if any), and the total amount
- Status: the status of the stake: Opened or Ended
- Actions: if it is available, you will see a button “End Stake”, if it is red it means that the stake is not yet mature and you can receive a penalty, if it is blue it is overdue, and you can get the amount plus interest by ending it.
See Ube in action
To see the Ube Smart Contract in action take a look at the following site of one of our customers:*
$SFX is the token of the SUBX FINANCE LAB, a blockchain-as-a-service provider for businesses to integrate web3 technologies into their products and services.
They offer a set of investment options to their token holders
Total amount locked:
- Pink vault: $SFX 28,959
- Blue vault: $SFX 110,176
- Green vault: $SFX 550,733
Total: $SFX 590,868 (USD 316,587 at the moment of writing)
- Do not consider it investment advice. WPSmartContracts.com does not endorse or promote this site, we display it for technical education and demonstration purposes only.
More information about Ube