Penalty Mechanism in AMO Blockchain

AMO Labs Dev
AMO Labs Official
Published in
9 min readNov 7, 2019

In the previous post “Incentive and Blockchain Economy”, we discussed about how validators get monetary benefit from participating in running AMO blockchain node network. The basic principle is to give a reward for a helpful action. But, we also need a penalty for a misbehavior.

While a blockchain based on a PoW-like consensus mechanism is run by a massive crowd of peers, a blockchain based on a BFT-like consensus mechanism, such as AMO blockchain, is run by a clockwork protocol among the selected peers having a certain level of privileges (PoS or DPoS defines this level privileges). If someone in this selected peers behaves maliciously, or a non-negligible portion of this group just cast out their duty, the protocol cannot run smoothly. This is the thing different from PoW-like consensus mechanisms. For this reason, many blockchains based on BFT or similar consensus mechanism introduce a penalty mechanism. Sometimes, the penalty mechanism comes with a force-out or banish policy. However, the goal is one thing: to keep the group of operators as healthy as possible.

In AMO blockchain, we have also a penalty mechanism for malicious or lazy validators. A validator is considered malicious when he/she supports two or more different facts. Technically speaking, this malicious behavior is detected as duplicate votes for different blocks in the same height and round(a round is a tendermint term). If we do nothing for this behavior, there may be a fork of the chain, and it is not desirable.

A validator is considered lazy when he/she does not participate in the consensus protocol. Technically speaking, this lazy behavior is detected as absence of votes(a vote is a tendermint term) from this validator for a certain number of recent blocks. If we do nothing for this behavior, the health of the chain is compromised.

A punishment itself is simple enough: to burn a certain amount of stakes. For delegators, it is to burn a certain amount delegated stakes. Interestingly, this punishment has something with the meaning of the word stake. Their coins are at stake if the validators do not act right, or if the delegators entrust their coins to unreliable validators. This kind of punishment is called slashing.

In AMO blockchain, there are two blockchain parameters for the punishment: the slash ratio m for malicious behavior and the ratio l for lazyness. The numbers are rational numbers between 0 and 1. When it is decided to punish a validator for his/her malicious behavior, calculate the amount of stakes to burn: coins_to_burn = amount_of_effective_stake × m, and distribute this penalty among the validator and his/her delegators. As we use the weighted distribution when calculate individual incentive, we use the same weight for the penalty. So a validator shall pay the price as twice as a delegator.

One thing that is not certain is how we should determine this slash ratios m and l. They will be determined at the last-minute protocol adjustment phase, based on the simulation results.

AMO 블록체인의 벌칙(penalty) 메커니즘

이전 포스트인 “Incentive and Blockchain Economy”에서 우리는 validator들이 AMO 블록체인의 운영에 참여함으로써 금전적인 이득을 얻는 방식에 대해서 설명했습니다. 기본적인 원칙은 도움이 되는 행위에 보상을 준다는 것인데, 사실 여기엔 비행(非行)에 대한 벌칙도 있어야 합니다.

PoW와 같은 합의 메커니즘에 기반하는 블록체인은 다수의 군중에 의해서 운영되는데 반해서, AMO 블록체인과 같이 BFT 류의 합의 메커니즘에 기반하는 블록체인은 선택받은 정해진 수의 운영자들 사이의 정교한 프로토콜에 의해서 운영됩니다. (여기에서 운영자들을 선택하는 방식이 PoS, 혹은 DPoS 원리입니다.) 만약 이 선택된 운영자들 중 누군가가 악의적으로 행동하거나, 이 그룹에서 무시할 수 없는 정도의 비율의 운영자들이 의무를 저버리고 프로토콜에 참여하지 않는다면, 이 프로토콜은 제대로 동작할 수가 없습니다. 이것은 PoW 류의 합의 메커니즘과는 분명 다른 점입니다. 이 때문에 BFT나 유사한 합의 메커니즘에 기반하는 많은 블록체인에서 페널티 메커니즘을 도입하고 있습니다. 때로는 이 패널티 메커니즘에 제명이나 추방 정책이 포함되기도 합니다. 하지만 목적은 한가지입니다. 운영자들의 그룹을 가능하면 건전하게 유지하기 위한 것입니다.

AMO 블록체인에서도 악의적이거나 게으른 validator들에 대한 페널티 메커니즘이 있습니다. 어떤 validator가 두 가지 이상의 서로 다른 사실을 지지할 때 이를 악의적이라고 간주합니다. 기술적인 표현으로는, 이 악의적인 행위는 같은 height와 round에 대해서 서로 다른 블록들에 대한 서명을 하는 행위로 나타납니다(여기에서 round는 tendermint 용어임). 여기에 대해서 아무것도 안하면 결국 체인에 분기(fork)가 발생하게 될 텐데 결코 바람직하지가 않습니다.

어떤 validator가 합의 프로토콜에 제대로 참여하지 않을 때 이를 게으르다고 간주합니다. 기술적인 표현으로는, 이 게으름은 정해진 숫자의 최근 블록들에 이 validator의 서명(여기에서 서명은 tendermint 용어임) 이 존재하지 않는 것으로 나타납니다. 여기에 대해서 아무것도 안하면 결국 체인의 건전성을 해치게 됩니다.

처벌 자체는 간단합니다. Stake 중 일부를 소각하는 것입니다. Validator가 아닌 delegator에 대해서는 위임된 stake 중 일부를 소각합니다. 재미 있는 것은 stake라는 단어의 의미입니다. 영어에서 “at stake”라는 표현은 위험에 처해 있다는 의미가 되는데, validator가 제대로 일을 안하거나 delegator가 믿음직하지 않은 validator에게 코인을 위임하게 되면 그들의 코인도 위험에 처해 있다(at stake)고 할 수가 있습니다. 이와 같이 stake의 일부를 소각해 버리는 처벌 방식을 흔히 slashing이라고 부릅니다.

AMO 블록체인에는 이런 벌칙에 관련된 두가지의 인자가 있습니다: 악의적인 행위에 대한 slash 비율 m과 게으름에 대한 slash 비율 l이 있습니다. 이 숫자들은 0과 1 사이의 실수로 표현됩니다. 어떤 validator에게 악의적인 행위에 대한 처벌을 하기로 결정되었다면, 일단 소각해 버릴 스테이크의 양을 계산합니다: coins_to_burn = amount_of_effective_stake × m. 그리고 이 벌칙을 validator와 delegator들 사이에 분배합니다. 인센티브를 분배할 때 validator와 delegator에게 서로 다른 가중치를 두었던 것처럼 이 때에도 같은 방식으로 가중치를 둡니다. 따라서 validator는 delegator보다 두 배의 벌칙을 받게 됩니다.

이 slash 비율 ml은 아직은 확정되지 않았으며, 적절한 시뮬레이션 결과를 기반으로 메인넷 출시 전 마지막 프로토콜 조정 단계에서 확정될 예정입니다.

--

--