Skip to content

fix(smart-contracts): fix #399 yield reward edge cases and #391 event hub access control#481

Open
Dopezapha wants to merge 2 commits into
ceejaylaboratory:mainfrom
Dopezapha:feature-smart-contract-edge-access-391-399
Open

fix(smart-contracts): fix #399 yield reward edge cases and #391 event hub access control#481
Dopezapha wants to merge 2 commits into
ceejaylaboratory:mainfrom
Dopezapha:feature-smart-contract-edge-access-391-399

Conversation

@Dopezapha
Copy link
Copy Markdown

Closes #391
Closes #399

PR Description

Fixes #399 by preserving fractional yield farming rewards across both global accumulator updates and per-user claims, so integer rounding does not silently discard reward dust. The reward flow still uses O(1) per-share accounting, while invalid AMM share states are rejected before reward math runs.

Fixes #391 by centralizing Event Hub access checks and requiring registered source contracts to authorize event capture. Registered contracts can now emit through the hub via Soroban contract-invoker authorization, while unregistered or forged sources are rejected.

Changed

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@Dopezapha 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.

[Smart Contracts] Yield Farming: Reward distribution edge cases [Smart Contracts] Event Hub: Add access control modifier

1 participant