Skip to main content

SlashingLibrary

SlashingLibrary#

Functions#

calcWrongVoteSlashPerToken(uint256 totalStaked, uint256 totalVotes, uint256 totalCorrectVotes) → uint256 (public)

Calculates the wrong vote slash per token.

Parameters:#

  • totalStaked: The total amount of tokens staked.
  • totalVotes: The total amount of votes.
  • totalCorrectVotes: The total amount of correct votes.
calcWrongVoteSlashPerTokenGovernance(uint256 totalStaked, uint256 totalVotes, uint256 totalCorrectVotes) → uint256 (public)

Calculates the wrong vote slash per token for governance requests.

Parameters:#

  • totalStaked: The total amount of tokens staked.
  • totalVotes: The total amount of votes.
  • totalCorrectVotes: The total amount of correct votes.
calcNoVoteSlashPerToken(uint256 totalStaked, uint256 totalVotes, uint256 totalCorrectVotes) → uint256 (public)

Calculates the no vote slash per token.

Parameters:#

  • totalStaked: The total amount of tokens staked.
  • totalVotes: The total amount of votes.
  • totalCorrectVotes: The total amount of correct votes.