HomeCoinsCartesi (CTSI)Staking Delegation Testnet Guide — User Delegation and Overview | by Cartesi...

Staking Delegation Testnet Guide — User Delegation and Overview | by Cartesi | Cartesi | Jun, 2021

- Advertisement -


Cartesi
Staking Delegation Testnet Guide — User Delegation and Overview

In December 2020 Cartesi launched its Proof of Stake (PoS) system to bootstrap Noether’s validator network. Noether is a high-performance side chain tailored for temporary data availability, and you can read more about it in this medium article.

Since then, the system has proven itself stable and allowed for noticeable organic growth. At the time of writing, over 80 million CTSI have been staked, more than 250 nodes are running, and over 12 million CTSI have been distributed as a reward for block producers.

Today we are launching Noether’s staking delegation system on testnet.

Until today all stakers needed to be node operators and maintain their own Nother nodes. With staking delegation, users can stake CTSI through Staking Pools, created and managed by third party trusted organizations or individuals, without the need to hand their tokens directly to third parties. In this case, pool operators are responsible for managing a Noether node, and they earn a commission out of the blocks rewards as compensation for operating the pool and the ETH fees they have to spend.

Staking Pools were built on top of the Staking smart contract, so they are subject to the same rules any other direct stakers are, such as the maturation time windows of a minimum of 6 hours for staking and 48 hours for unstaking. Additionally, pools need a larger time window to make sure that the staking, unstaking and withdrawal requests from their users are handled properly. Individual pool users staking requests may take up to an additional 6 hours, and unstaking requests may take up to an additional 48 hours to complete. The pool performs aggregate staking and unstaking requests to the PoS and at the moment a user issues their individual request, the pool is probably in the middle of waiting for a previously issued staking/unstaking request to be completed. As it would happen with individual users, issuing an overlapping staking/unstaking request would restart the maturation/unlocking counter associated with the pool stake.

Pools are built on top of the current PoS and aggregate the staking requests from their users.

Pool operators have two main responsibilities:

  1. Make sure the Noether node is online and works properly 24×7
  2. Pay the Ethereum fees that are necessary for block production and also maintenance operations like staking, unstaking and withdrawing from the Staking contract, on behalf of the users that delegate to their pool.

Pool creators can choose from 2 different commission models to be economically viable: flat rate commission, and gas based commission.

The Flat rate commission model is straightforward. A flat percentage is taken off the block reward before it is distributed among the pool stakers.

A pool is configured with a 10% flat rate. Upon producing a block the pool receives 2,900 CTSI as reward. It takes 290 CTSI as commission, and distributes the remaining 2,610 CTSI to its users, in proportion to each user’s share in the total pool stake.

A gas based commission model takes into account the gas costs of producing the block. If the gas price at the moment of production is high, the cut will be higher, if the gas price is low, the cut will be lower. This model accommodates a variable gas price and CTSI price, but it’s harder to predict the final fee because of its complexity.

A pool is configured to charge 400,000 gas. Upon producing a block this cost is “converted” to CTSI to calculate the commission. First it’s multiplied by the gas price at that moment, provided by a ChainLink oracle. Then it’s converted to CTSI by using an ETH/CTSI pair price provided by Uniswap V2.

Consider the following scenario: gas price = 20 Gwei. 1 ETH = 4,000 CTSI

400,000 gas x 20 Gwei = 0.008 ETH

0.008 ETH x 4000 = 32 CTSI

Now consider that the gas price surges to 400 Gwei, and the CTSI price goes up in relation to ETH such that 1 ETH = 3200 CTSI

400,000 gas x 400 Gwei = 0.16 ETH

0.16 ETH x 3,200 = 512 CTSI

In the first example (20 Gwei gas price) the commission for that block is 1.1% (32/2,900) considering a reward of 2,900 CTSI. In the second example (400 Gwei gas price) the commission for the block is 17.6% (512/2,900) for the same reward amount. Compared to a flat rate pool with a 10% rate, for instance, the gas based commission can have a lower or higher fee depending on the gas price, CTSI price, and ETH price as shown in the previous examples.

No matter the selected commission model, the Cartesi Explorer will show the actual historical commission taken by each pool, as well as an estimate of the commission for the next block. Users can make an informed decision about which pool to choose based on the commission and reliability of pool operators (more about it below).

The Cartesi Explorer was updated with a new top menu entry called “Pools”. Clicking on it takes the user to the pools list. The table shows the pool address (or name and icon if the pool creator registered those for it), the number of stakeholders in the pool, the total CTSI staked on the pool, and the commission of the pool (in percentage if the pool uses a flat rate commission or in gas if it uses a gas based commission) and the total commission taken by the pool as a percentage of the rewards (accrued commission).

For testnet purposes, we are using a preview version of the Cartesi Explorer found here.

Pool listing screen showing the available pools and main details

The user can click on the “Stake” link in any pool and land on the pool page.

The Pool page is very similar to the regular Staking page, but here the user is staking through the specifically selected pool. Unlike the Staking page, there is no node address and node hiring/funding process because the node was already set up by the pool manager (which is also responsible for keeping the node well funded and running correctly).

Pool page detailing the user stake state and containing the controls for the user to manage his/her stake

To test stake delegation on the Ethereum Ropsten testnet, you’ll need some Ropsten ETH and Ropsten CTSI. There are multiple Ropsten ETH faucets, this one gives 5 Ropsten ETH. You can get Ropsten CTSI at this simple faucet by connecting your metamask wallet and executing the requestTokens method.

In order to connect your metamask to Ropsten Network please follow the below procedure:

  • Click on the network list on top of the metamask window
  • Choose Ropsten Network to connect

Continuing on staking, the same staking controls from staking individually apply here. The user needs to set an allowance (which is specific to each pool), then stake the desired amount of CTSI. These transactions go through Metamask, and as any Ethereum transaction, require the payment of a gas fee. After the staking transaction is processed, the stake goes through a maturation period, and once matured, automatically starts contributing to the staking power of the pool. From this point forward, the user will receive a share of the block rewards every time a block is produced by the pool, proportional to their shares in the pool (minus the pool commission, as explained in the previous section).

The amount of rewards earned by each pool user is proportional to the user stake in comparison to the total staked amount of the pool. Consider the following scenario: a user stakes 20,000 CTSI to a pool that has 3,180,000 CTSI staked. After the maturation period that user will have 20,000 / 3,200,000 = 0.625% participation in the pool.

Upon producing a block with a 2,900 CTSI reward, in a pool with a 10% commission, that user will be entitled to:

2,900 CTSI — 290 CTSI = 2,610 CTSI (rewards after pool commission)

2,610 CTSI * 0.625% = 16.3125 CTSI (user cut of the rewards)

The user reward share is not directly transferred to the user wallet, like in the case of a direct staker. Instead, it is re-staked automatically by the pool, producing a compounding effect. The stake of the reward is also subject to the regular stake maturation period.

Since the fees for block production are paid by the node and the node is kept funded by the pool manager, there are no further direct fees to the users other than the Ethereum transaction fees for staking, unstaking and withdrawing CTSI from the pool. Staking is subject to a maturation period and unstaking to an unlock period. That is a requirement for security reasons.

The security of the CTSI funds in the pool is handled by the pool smart contract, in contrast to a custodial staking solution. Only the users can manipulate the CTSI of their stake. As long as there are no exploits on the pool smart contract, the damage a bad/compromised pool manager can cause is limited to not running the pool node correctly, thus losing potential rewards. The source code of the pool has been audited and is publicly available at GitHub.

Any organization or individual is free to create and operate a pool. There are no restrictions or special requirements, anyone can create a pool as long as they are willing to pay the necessary ETH fees to create and manage the pool.

If you are interested in creating and managing a pool, please refer to the Staking Delegation Testnet Guide — Pool Management article.

As always, we’re ready for any questions or support in our development community on Discord, see you there!

Cartesi is a multi-chain layer-2 infrastructure that allows any software developer to create smart contracts with mainstream software tools and languages they are used to while achieving massive scalability and low costs. Cartesi combines a groundbreaking virtual machine, optimistic rollups, and side-chains to revolutionize the way developers create blockchain applications.



Source link

- Advertisement -
profile logo 500x500
Mr Bitcointehttps://www.bitcointe.com/
“Fact You Need To Know About Cryptocurrency - The first Bitcoin purchase was for pizza.” ― Mohsin Jameel
462FansLike
76FollowersFollow
4,567FollowersFollow
5,261FollowersFollow
1,498FollowersFollow
2,230SubscribersSubscribe

Most Popular

bitcoin
Bitcoin (BTC) $ 43,943.00
ethereum
Ethereum (ETH) $ 3,122.09
tether
Tether (USDT) $ 1.00
bitcoin-cash
Bitcoin Cash (BCH) $ 543.19
litecoin
Litecoin (LTC) $ 160.31
eos
EOS (EOS) $ 4.32
okb
OKB (OKB) $ 17.15
tezos
Tezos (XTZ) $ 5.65
leo-token
LEO Token (LEO) $ 3.01
cardano
Cardano (ADA) $ 2.26
monero
Monero (XMR) $ 246.86
stellar
Stellar (XLM) $ 0.295911
chainlink
Chainlink (LINK) $ 24.21
huobi-token
Huobi Token (HT) $ 12.49
tron
TRON (TRX) $ 0.099258
usd-coin
USD Coin (USDC) $ 1.00
dash
Dash (DASH) $ 174.06
neo
NEO (NEO) $ 42.83
iota
IOTA (MIOTA) $ 1.38
nem
NEM (XEM) $ 0.162252
zcash
Zcash (ZEC) $ 120.70
maker
Maker (MKR) $ 2,548.28
paxos-standard
Pax Dollar (USDP) $ 1.00
ethereum-classic
Ethereum Classic (ETC) $ 50.91
vechain
VeChain (VET) $ 0.101223
true-usd
TrueUSD (TUSD) $ 1.00
ftx-token
FTX Token (FTT) $ 56.24
kucoin-shares
KuCoin Token (KCS) $ 10.66
waves
Waves (WAVES) $ 24.63