Skip to content

feat: add dividend auto-reinvestment path - #718

Open
victortanimu05-stack wants to merge 1 commit into
RevoraOrg:masterfrom
victortanimu05-stack:feat/dividend-reinvest
Open

feat: add dividend auto-reinvestment path#718
victortanimu05-stack wants to merge 1 commit into
RevoraOrg:masterfrom
victortanimu05-stack:feat/dividend-reinvest

Conversation

@victortanimu05-stack

Copy link
Copy Markdown
  • Add AutoReinvestConfig struct (enabled + nav_per_share_e7)
  • Add AutoReinvestInvalidNav=62 and AutoReinvestNotEnabled=63 error codes
  • Add EVENT_DIVIDEND_REINVEST event constant
  • Add DataKey2::AutoReinvest(OfferingId, Address) storage key
  • Add set_auto_reinvest / get_auto_reinvest entrypoints (holder-authed)
  • Fork claim() in plain impl block: when enabled, convert dividend to share_delta = floor(payout / nav_per_share_e7) via set_holder_share_internal; supply cap / vesting rejections fall back gracefully to cash transfer
  • Add test_accrual_ledger module with 9 tests: happy path, disabled, nav=0 guard, cap-exhausted fallback, no-config, tiny dividend, toggle off

closes #531

- Add AutoReinvestConfig struct (enabled + nav_per_share_e7)
- Add AutoReinvestInvalidNav=62 and AutoReinvestNotEnabled=63 error codes
- Add EVENT_DIVIDEND_REINVEST event constant
- Add DataKey2::AutoReinvest(OfferingId, Address) storage key
- Add set_auto_reinvest / get_auto_reinvest entrypoints (holder-authed)
- Fork claim() in plain impl block: when enabled, convert dividend to
  share_delta = floor(payout / nav_per_share_e7) via set_holder_share_internal;
  supply cap / vesting rejections fall back gracefully to cash transfer
- Add test_accrual_ledger module with 9 tests: happy path, disabled,
  nav=0 guard, cap-exhausted fallback, no-config, tiny dividend, toggle off
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@victortanimu05-stack Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add accrual-based auto-reinvestment converting owed dividends to new shares

1 participant