Skip to content

[#452] Backend: Replace mock referral yield calculation with real on-chain or ledger-backed accounting#2

Open
UzyKhs wants to merge 5 commits into
mainfrom
fix/452-backend-replace-mock-referral-yield-calculation-with-real-on-chain-or-ledger-backed-accounting
Open

[#452] Backend: Replace mock referral yield calculation with real on-chain or ledger-backed accounting#2
UzyKhs wants to merge 5 commits into
mainfrom
fix/452-backend-replace-mock-referral-yield-calculation-with-real-on-chain-or-ledger-backed-accounting

Conversation

@UzyKhs
Copy link
Copy Markdown
Owner

@UzyKhs UzyKhs commented May 27, 2026

Summary

  • replaced mock referral yield multiplier logic with ledger/snapshot-backed net-yield accounting
  • added share price snapshot persistence model and Prisma migration
  • updated referral integration tests for deterministic deposit/withdrawal scenarios and zero/negative yield handling
  • added structured referral calculation summary logs without sensitive wallet details

Notes

  • output precision remains 6 decimal places and response schema is unchanged
  • reward is only accrued for positive net yield scenarios

Closes Junirezz#452

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.

Backend: Replace mock referral yield calculation with real on-chain or ledger-backed accounting

1 participant