question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BOUNTY]: Implement revokable governance referendum proposal votes for users wishing to unlock their CELO expeditiously

See original GitHub issue

[BOUNTY]: Implement revokable governance referendum proposal votes for users wishing to unlock their CELO expeditiously

Challenge Description

This bounty is an additional feature for the Governance contract which manages changes to the protocol.

Governance participants must lock their CELO via LockedCelo in order to vote (to ensure skin in the game). If a user’s locked CELO is being used to vote, it cannot be unlocked.

Governance.isVoting uses an account’s single upvote to check if the voter is voting on a proposal in the queue, and the most recent referendum proposal to check if the voter is voting on the dequeue (is this proposal in referendum). Revoking an upvote is already supported. However, simply revoking a referendum vote would break our isVoting check when the most recent referendum proposal is not the only referendum proposal being voted upon in the dequeue.

We can safely unvote all of the dequeue referendum proposals at once by enumerating all of the dequeued proposal indices, decrementing the stored voter record, and subsequently zeroing the most recent referendum proposal. Care should be taken to use the stored vote record weight rather than the canonical voter weight, and the proposal’s network weight should be updated.

Submission Requirements

A PR should be submitted to the Governance contract with a new function endpoint revokeVotes(), as well as additional unit tests for this function and isVoting. Please link this PR in your GitCoin submission. Pay out will be granted on successful merge into the celo-monorepo.

The bounty payout will be for $250 equivalent of CELO.

Prerequisites

Knowledge of Solidity, Truffle, and Typescript will be required to complete this bounty. Once the celo-monorepo is setup, development should be done in the protocol package. yarn build and yarn test should suffice.

Time Expectation

Expect this bounty to take a developer familiar with Truffle, Solidity and Typescript about 5 hours.

Resources

Governance docs Original issue discussion

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
deepakhb2commented, Apr 5, 2021

@yorhodes I have created PR in Draft state. Please review the PR and let me know if I have covered all the scenarios. Also, I am not sure if I am reverting the networkWeight correctly. Thank you.

0reactions
gitcoinbotcommented, Apr 27, 2021

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 50.0 CELO (277.0 USD @ $5.54/CELO) attached to this issue has been approved & issued to @deepakhb2.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BOUNTY]: Implement revokable governance referendum proposal ...
Governance participants must lock their CELO via LockedCelo in order to vote (to ensure skin in the game). If a user's locked CELO...
Read more >
HOUSE OF REPRES-ENTATIVES. / - GovInfo
here is whether or not we are willing to propose this amendment ... where they can not enforce their demand through the ballot?...
Read more >
Untitled
Pinsere roma website, Stubborn fat protocol 2.0, Killing floor 2 bloat, Plautus amphitruo pdf, Us senate results 2008! Eunhae guest house eng, Use...
Read more >
On the Ballot by Montecito Journal - Issuu
It will show you any earthquakes that have happened nearby and offer you the ability to report experiences of shaking. It can send...
Read more >
JAMES MADISON - Online Library of Liberty
Penurious spirit of Massachusetts--Statue voted for General. Washington--His counsel sought. To Edmund Randolph, August I8th. 9. Seat of Government--Letters.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found