In `TempleGoldStaking` contract. by default, delegates
would be address(0)
for a given input address. If user doesn't call delegate
by themselves, their votes would always remain 0. This does not align with the common practice as people who stakes can not get votes automatically, instead, he would needs to pay the gas to call delegate
to be able to have votes. Since users are forced to pay extra fees to have votes, this disincentives and discourages the users from joining the governance.
By default, delegates
would return address(0)
for a given input address if it has not be set before.
If it is not set before, the staker would get 0 vote
since the vote is moved from address(0)
to delegates[for]
which is still address(0)
.
This does not align with the common practice as people who stakes can not get votes automatically, instead, he would needs to pay the gas to call delegate
to be able to have votes.
Users are forced to pay extra fees to have votes. This disincentives and discourages the users from joining the governance.
Manual
By default, if the user has not called delegate
before, the vote should go to msg.sender
.
I would recommend implement a function to return the delegates:
If the user calls delegate
function before, return delegates[user]
If the user doesn't call it before, return address(user)
.
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.