Developers Forum for XinFin XDC Network

Namran
Namran

Posted on

What is slashing contract and where is it source code?

Hi XDC,
I'm reading about XDPoS consensus and seeing it have a slashing mechanism. However, I couldn't find out the information about slashing contract and where is its source code at all. Is this still relevant?
Many thanks.

Discussion (2)

Collapse
juklee0ira profile image
JukLee0ira • Edited on

Hello, you can check this contract for the implementation of the slashing mechanism. The slashing logic is mainly in the voteInvalidKYC function. There are some articles related to this topic that you can refer to.

xdc.dev/juklee0ira/draft-xdcvalida...

Collapse
namranvawn_e32692cabe1 profile image
Namran Author

Thank you @juklee0ira
Is it true only the third slashing option available? No option to slash equivocation validator (second condition), right?