Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tanya/govern app #35

Merged
merged 42 commits into from
Jun 17, 2024
Merged

Tanya/govern app #35

merged 42 commits into from
Jun 17, 2024

Conversation

Tanya-atatakai
Copy link
Collaborator

@Tanya-atatakai Tanya-atatakai commented Jun 12, 2024

Proposed changes

Adds Govern app to the monorepo

Main features:

  • displaying votable staking contracts and their current and upcoming relative weights (allocated voting power), in percent and in veOlas
  • displaying user votes - current and upcoming, in percent
  • possibility to vote for any votable staking contract

Why to vote?

  • so the launcher can be rewarded for their staking contract

Logic:

  • user need to have voting power in order to vote
  • user can vote once in 10 days. Once voted, the countdown is displayed, blocking voting
  • all votes for current week are applied at start of next week (that's why we display "next weight" column, so it's clear for what the launchers are rewarded during current epoch)
  • user can allocate no more than 100% of their voting power. If they use less, the remaining goes to the Rollover pool (it's not a contract, just an address)
  • staking contracts are created on different chains. Logic related to voting is only on Ethereum.

Technologies used (apart from what we are used to using):

  • typescript
  • wagmi hooks - for read contract\contracts (easier to use on different chains, supports caching, support batching, easy to modify data, easy to enable\disable querying)
  • Redux for storing modified data once it's received from different hooks (can be moved to Zustand though)
  • I also modified tanstack queryClient config so the data is cached forever. I clear some parts of cache when the user votes, so it's re-fetched automatically

TODOs:

  • there are some todos that will affect user experience on Mondays, will fix the later
image

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Copy link

vercel bot commented Jun 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bond ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 8:31am
govern ✅ Ready (Inspect) Visit Preview 14 resolved Jun 17, 2024 8:31am
launch ❌ Failed (Inspect) 💬 Add feedback Jun 17, 2024 8:31am
registry ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 8:31am
tokenomics ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 8:31am

Base automatically changed from mohan/bonds-main to main June 12, 2024 10:43
@Tanya-atatakai Tanya-atatakai merged commit e369011 into main Jun 17, 2024
5 of 8 checks passed
@Tanya-atatakai Tanya-atatakai deleted the tanya/govern-app branch June 17, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants