Voting Power Calculation
Voting power in bCC contracts is calculated based on a user's past and current interactions.
The _bias
variable in our contract code represents the voting power of a user during their last interaction.
To derive the current voting power, we use:
In essence, userVP = last_interaction_VP - interaction_slope * (current_timestamp - last_interaction_timestamp)
. Slope and bias calculations occur within the _checkpoint()
function, which is called when:
A lock is created.
A lock amount increases.
A cooldown starts.
A cooldown gets renewed.
A lock gets withdrawn.
Last updated