-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Slashing #11
Comments
Work underway in Interchain Security, probably reusable |
OK, after discussing about this, I think we now have a good understanding of the requirements and design decisions around cross-slashing. Here are the salient points: Control channel: We can hook into the evidence module to receive a callback on the Consumer side: https://github.com/cosmos/cosmos-sdk/blob/v0.47.4/x/evidence/abci.go#L24 We then pass the evidence as part of the mesh-security protocol / channel. Otherwise we would need deep chain integration on the Provider side. Evidence verification: For verifying the evidence on the Provider side, we would need the Consumer's validator set with the validator pubkeys, at the evidence height. That means / implies that we need to store or have access to the historical validator set. At least for the unbonding period, which is typically 21 days. Governance step: A governance step during the slashing evidence handling is not a good idea. The governance would need to happen on the Provider side to be effective, and there are no involved or interested parties there. The Provider's validators are typically not involved in the cross staking process. The cross-delegators are usually too detached from the process, to be involved in voting. A proposal also would have to be automated, and voting on it would be difficult / unclear. So, a fully automated, Provider verifiable implementation, that hooks on the evidence module of the Consumer, and doesn't involve governance (besides the granting of the required permissions) looks like the way to go. @alpe please take a look and comment back if I'm missing something. |
A couple more points. Slashing's impact: The sensible / delicate issue with cross slashing is, that a Consumer could be affecting the Provider's native funds / voting power. When slashing a cross-delegator that is at the same time fully delegated natively, some of the funds would need to be unbonded, for the slashing (burning) to proceed. Perhaps a mechanism or mechanisms can be built to work around this: The slashing percentage's of each cross-delegator funds can be kept on the vault, so that they can be slashed without requiring an unbonding. This is a simple solution, but it's a little undesirable, as it'll reduce the amount of funds that can be staked, either natively or cross-chain. It also does not protect against multiple slashing on different Consumer chains. Some or all of the block rewards can be kept, to build a treasury of funds on the vault, for each validator on the Consumer, to be used in case of slashing. Again, this is undesirable, as it'll make cross staking less attractive. Perhaps there are other solutions to this. None of these look like a good idea; listing them here for completeness / documentation. And to estimulate discussion about it. |
Consumer chain mooning: If the Consumer chain moons (its token price increases significantly), the amount of Provider funds can be insufficient to cover slashing amounts. Some kind of protection can be built around this: Alternatively, some kind of treasury can be built on the virtual staking contract (which is on the Consumer side), with some of the block rewards. So that if the Consumer chain moons, these funds will moon as well; as they are in the Consumer's token, not the Provider's one. Comments? @alpe, @jtremback, @JakeHartnell, @mpoke, @ValarDragon. |
Note that the application doesn't really get the evidence, but rather a list of Byzantine validators (with some additional metadata). The evidence is stored in the blockchain. Our approach on ICS is to have a relayer send a message that contains the evidence. Clearly, any user could do that, but relayers will automatize things. |
Validator sets can be obtained from IBC ClientUpdate messages. In the case of Comet, a client update contains a Header, which contains also the validator set. When a relayer is relaying an evidence of misbehavior on a consumer, it can also relay a client update for that particular height. |
TODO:
Extra issues:
The text was updated successfully, but these errors were encountered: