Skip to content

Fix pool performance return calculation#158

Open
JeremyZeng77 wants to merge 1 commit into
capofficial:mainfrom
JeremyZeng77:codex/fix-pool-performance-return
Open

Fix pool performance return calculation#158
JeremyZeng77 wants to merge 1 commit into
capofficial:mainfrom
JeremyZeng77:codex/fix-pool-performance-return

Conversation

@JeremyZeng77
Copy link
Copy Markdown

Fixes #6

Summary

  • limit pool performance deposits/withdrawals to the selected weekly/monthly/yearly stats window
  • calculate period income as ending balance plus withdrawals minus starting balance minus deposits
  • use the midpoint capital estimate discussed in the issue thread as the return denominator, instead of ending balance
  • guard zero/negative estimated capital to avoid nonsensical percentages

Verification

  • git diff --check
  • npm run build

Bounty payout

USDT TRC20: TWupTAoFjxR2VmqUUvzhfmUwXVZR6Kvz1Y
PayPal fallback: https://paypal.me/Jeremytsangchina

@JeremyZeng77
Copy link
Copy Markdown
Author

Local verification passed with git diff --check and npm run build.

The only failing GitHub status I see is Vercel with Account is blocked., which appears to be an external project/account deployment issue rather than a code failure in this branch.

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.

Pool metrics are wrong / weird

1 participant