Voting power is not assigned to stakers if they have not explicitly delegated votes.
In the TempleGoldStaking
contract, if stakers have not delegated votes to themselves or any other account, their staked tokens do not gain any voting power. This occurs because when the delegates[_for]
address is zero, the _moveDelegates
function does not call _writeCheckpoint
, preventing the allocation of voting power to the staker.
Additionally, the process of _withdrawFor()
has a similiar issue that does not decrease voting power if the delegates[_for]
address is zero.
Stakers who do not delegate votes to themselves or another account will not gain any voting power for their staked tokens.
vscode
The _moveDelegates()
should handle aforementioned scenario:
If srcRep
and delegates[_for]
are zero addresses, add vote power to the staker address.
If dstRep
and delegates[_for]
are zero addresses, decrease vote power from the staker address.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.