Introduction
In this presentation we’re going to cover some of the basics of Cosmos ecosystem and what is the work of validators and what they provide.
What is Cosmos?
- Ecosystem based on consensus
- Uses Tendermint code for Consensus: 2/3 of voting power must agree
What problems can chain have?
- Centralization (too few validators have > 66% voting power)
- Chain halt because of lost keys or DoS
- Security issues (on apps or in cosmos itself)
Ecosystem
- Cosmos is a very rich ecosystem that can be interconected via IBC
- Many different projects and goals:
- ATOM, NYM, Sifchain, UMEE, Evmos, GenesisL1, Juno, Osmosis, etc
- Many projects perform airdrops to stakers in other projects
What is a validator?
- A validator is a server that provides consensus to secure the blockchain.
- It must be available 24/7 and connected to other validators
- It must be secured to not compromise the chain integrity
- It has a private key used to ‘vote’ for each block
How a validator interacts in Cosmos-based chains?
- Each validator,based on delegated tokens (PoS) has more power and more chances to propose blocks
- Validators get a commission from each proposed block transactions
- Stakers get rewards
- Validator gets commissions
- Validator votes for proposals and for their delegates unless they vote individually
What problems can a validator have?
- Fail to communicate with others (isolated)
- Fail to sign blocks
- DoS attacks (sentries)
- Double signing
- Disk filling with blocks
- RAM filling because of bad optimized chain code
- Getting out of active set
What punishment?
- Penalties
- Jailing
- Slashing
- Tombstoning
Choosing the right validator (1)
- Always DYOR
- Avoid top 10 validators (decentralization, participation in airdrops, etc)
- Check for experience in other networks
- Check Validator in the explorer (missing blocks, delegations, etc)
- Check for participation in voting
Choosing the right validator (2)
- Avoid 0% validators -> they play badly against community
- Check maximum commission change
- Experience in testnets (what is tested in test, doesn’t affect you in production)
- reStake support (via authz)
Authz
- Cosmos chains might include support for Authz
- Authz allows to grant certain privileges to other accounts
- Being incorporated in major chains
- Enables use of restake
restake
- Restake uses authz support to grant permissions to a validator for:
- Claiming rewards by delegator to the validator
- Delegate the rewards to the same validator
- Restake operator (the validator), will pay the fees for the claim and delegate
- APY increases as restake executes periodically doing compound interest
- Min # of tokens in rewards
- Every ‘X’ period of time
restake function
- Validator prepares a wallet that will keep the funds for the fees and will get the auth grant
- Profile is updated in repository containing parameters (periodicity and min # of tokens)
- Periodicity in the repo doesn’t need to be the real one
- Funds are needed in the wallet for restake to cover the fees
restake function (cont)
- Verifies the available funds on bot account
- The software executes and reviews all delegators for
- authz permissions
- minimum # of rewards
- When verified, claim+stake is performed