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

Reinstate Liquidity Rewards Program #260

Merged
merged 9 commits into from
May 11, 2024
Merged

Conversation

hhio618
Copy link
Contributor

@hhio618 hhio618 commented May 1, 2024

This will revert the changes made in commit 0d32b32#diff-c929e9424c96a55187bf3c7ecec95438b67f7a6f20df177e368728ba4bbe4890

Related GitHub Issue

#225

Screenshots (if appropriate):

liquidity

How Has This Been Tested?

  • Status checks pass (lint, build, test)
  • Works on Sepolia preview deployment
  • Works on Mainnet preview deployment

Are There Admin Tasks?

@hhio618 hhio618 requested a review from a team as a code owner May 1, 2024 12:19
Copy link

vercel bot commented May 1, 2024

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

Name Status Preview Updated (UTC)
citizen-app-mainnet ✅ Ready (Inspect) Visit Preview May 11, 2024 5:47am
citizen-app-sepolia ✅ Ready (Inspect) Visit Preview May 11, 2024 5:47am

Copy link

vercel bot commented May 1, 2024

@hhio618 is attempting to deploy a commit to the Nation3 DAO Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codecov bot commented May 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 11.79%. Comparing base (110ad98) to head (f035479).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #260   +/-   ##
=======================================
  Coverage   11.79%   11.79%           
=======================================
  Files          18       18           
  Lines         356      356           
  Branches       80       77    -3     
=======================================
  Hits           42       42           
- Misses        308      314    +6     
+ Partials        6        0    -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vercel vercel bot temporarily deployed to Preview – citizen-app-sepolia May 1, 2024 12:33 Inactive
Copy link
Member

@aahna-ashina aahna-ashina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hhio618 I tested on the Mainnet preview: https://citizen-app-mainnet-git-fork-hhio618-main-nation3dao.vercel.app

On the /lock page, my $veNATION balance shows as 19.65:

image

But on the /liquidity page it shows as 0:

liquidity

Any idea why the $veNATION balance is not loading?

@hhio618
Copy link
Contributor Author

hhio618 commented May 1, 2024

Please test using the latest commit.

ui/pages/liquidity.tsx Outdated Show resolved Hide resolved
@aahna-ashina
Copy link
Member

@hhio618 I'm getting a division-by-zero error at https://citizen-app-sepolia-i57i145rj-nation3dao.vercel.app/liquidity

Is that because of the Reward APY being zero?

@hhio618
Copy link
Contributor Author

hhio618 commented May 1, 2024

@aahna-ashina I'm not sure! Please send me the testnet token so that I can test this further.
My eth address: 0x6321286F9B73f427C72e1f9F1bC6b3d25eF06605

@aahna-ashina
Copy link
Member

Please send me the testnet token so that I can test this further.

@hhio618 Here is how to get testnet tokens: https://github.com/nation3/.github/blob/main/CONTRIBUTING.md

@hhio618
Copy link
Contributor Author

hhio618 commented May 2, 2024

@aahna-ashina Found the issue, the totalDeposit is zero in this contract: https://sepolia.etherscan.io/address/0x5514cF24D2241Ecc6012306927eA8d74E052416D#readContract. This value is being used for division in this code:

.div(poolValue.mul(totalDeposit).div(lpTokensSupply))
.

@hhio618 hhio618 requested a review from aahna-ashina May 3, 2024 05:19
@aahna-ashina
Copy link
Member

Found the issue, the totalDeposit is zero in this contract: https://sepolia.etherscan.io/address/0x5514cF24D2241Ecc6012306927eA8d74E052416D#readContract. This value is being used for division in this code:

.div(poolValue.mul(totalDeposit).div(lpTokensSupply))
.

@hhio618 Okay, thank you. So if we make a deposit, the error message should disappear?

@hhio618
Copy link
Contributor Author

hhio618 commented May 3, 2024

@aahna-ashina You're welcome! Yes, Just add tokens using the deposit method, which will do the trick!

@aahna-ashina aahna-ashina merged commit e8a6682 into nation3:main May 11, 2024
8 checks passed
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.

2 participants