QuarkChain Staking 1.0：A DeFi Product Helps Miners and Holders Achieve Cooperation
Today let us proudly introduce QuarkChain Staking 1.0, a product that offers a way for miners to find the staked QKC tokens and the QKC holders to get extra income.
In addition to improve the flexibility through heterogeneous sharding technology, QuarkChain’s unique consensus algorithm, PoSW (Proof of Staked Work), becomes the basis to realize a cutting-edge DeFi system, which enables a division-and-cooperation mechanism that miners and token holders can work together on mining efficiently and share the profit afterward.
Unlike the high inflation rate of PoS with an obvious Matthew effect, PoSW still requires miners to compete with hash power. The total mining amount of QKC is 4 billion, and ~245 million has been mined in the first year. The annual mining output will be fixed to 88% of the previous year. that is to say, the new-generated token rate by PoSW will be much lower than PoS.
Read more: About PoSW
PoSW allows miners to enjoy the benefits of lower mining difficulty by staking mainnet QKC tokens. After the mining function on QuarkChain mainnet is enabled, miners and token holders have spontaneously formed a cooperative relationship that benefits both of them. However, a lot of small token holders are hard to meet the minimum requirement of the staking amount set by miners, which prevents them from participating in staking activities. After the QuarkChain Staking 1.0 smart contract is launched, multiple small and medium-sized token holders can stake QKC together into the same contract which cumulatively meets the requirement of minimum staking amount. More QKC holders can participate and share mining rewards, and the miners can also find enough staking tokens more easily.
Reward base: The reward is based on the efficiency difference between QuarkChain mainnet staking mining and non-deposit mining.
Miner participation: Minors provide mining machines, deploy the contracts according to the consensus, and set a revenue share ratio.
Token holder participation: Token holders choose a credible contract with official verification and transfer the mainnet QKC into the contract address after confirming the profit-sharing percentage with miner after confirming the profit-sharing percentage with miner(s).
Return ratio: It should be negotiated by both parties.
Earnings acquisition: Token holders deposit the returns into the contract real-time, and withdraw the tokens at the agreed time with the miner(s).
Contract address example:
pragma solidity >0.4.99 StakerInfo) public stakerInfo; address public stakers; address public admin; uint256 public…
Redemption: After negotiating with miners, shut down the mining machine for redemption.
This cooperation model is simple and user-friendly. The token holders only need officially verified contracts and QKC tokens on the mainnet. There is no need for other tokens during the whole process. The currently launched contract is our first available version. QuarkChain will make further improvements on it, and bring to our users a dApp with customization and matching functions in the coming two quarters. Then miners can issue staking smart contracts more easily, and token holders can directly select contracts on the dApp page and complete the deposit with fewer steps.
The most important thing to the public chain is the forward-looking layout of specific functions. QuarkChain has realized the value of DeFi and joined in this game from the first day we set off. Now, we are creating future DeFi with the eco-partners from various fields together.
In the next generation of DeFi, QuarkChain will achieve more breakthroughs in efficiency, ease of use, and security. You can learn more about this from our previous article:
Staking Pool Contract User Guide
DISCLAIMER: THIS IS A REFERENCE IMPLEMENTATION AND NOT AUDITED. USE IT AT YOUR OWN RISK. WE WILL NOT ACCEPT RESPONSIBILITY FOR COSTS YOU MAY INCUR AS A RESULT OF USING THIS CONTRACT.
- Use your favorite Ethereum tooling like solc and remix to compile the StakingPool contract, copy the byteCode, and abi.
- Paste your smart contract code in Remix and compile the smart contract. Click on start to compile your smart contract. QuarkChain VM hasn’t supported Istanbul, compiler version should be <= 0.5.13
- Choose the contract name that we want to deploy from the left dropdown and click on the details tab. You will see the bytecode and ABI while you scroll down the details.
- Copy ABI by clicking on the ABI.
2. Go to the Deploy tab and deploy the contract on testnet.
3. Admin should be a trusted entity (preferably on the staker side). He/she can adjust minerFeerateBp by using the method adjustMinerFeeRate which could prevent miners from doing evil. For example, miners don’t stop mining when stakers want to withdraw their stakes.
Max feeRateBp is 10000 which equals 100%.
- Check the transaction on ethers can and copy Input Data.
4. Deploy your contract on QuarkChain Mainet Explorer.
This Account is backed by MetaMask. Learn More Similar to how MetaMask bridges between your browser and Ethereum, we…
- Choose the right shard which you want to mine on the Address area.
- Paste copied Input Data to Deploy tab and set gas limit >= 2000000 (make sure you have enough QKC on this shard), then click the deploy button.
- On the transaction status page, you may find the contract address once the transaction is confirmed.
- You can interact with your contract on our QuarkChain Mainet Explorer. Make sure you have enough QKC for paying the gas fee on the right chain.
- QKC holders can transfer their QKC to the contract address. Please try the contract methods before staking to make sure the contract is working as expected.
Here uses hiveos.farm with ethminer as an example. You may use your own tooling with similar procedures.
- Paste the contract address to your mining settings instead of the regular QKC wallet address. Start mining. Miner address should be ETH like, so we need to delete the last eight digits of the contract address.
Staker, Miner, and PoolMaintainer can withdraw their profits by methods to withdraw Stakers(amount), withdrawMinerReward, and transferMaintainerFee.
Learn more about us.