Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contracts/StakedEXA.sol
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ contract StakedEXA is
address memProvider = provider;
uint256 shares = Math.min(memMarket.allowance(memProvider, address(this)), memMarket.maxRedeem(memProvider));
uint256 sharesReward = shares.mulWadDown(providerRatio);
if (sharesReward == 0) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not skip savings transfer when reward share is zero

This return fires not only when there are no provider shares, but also when providerRatio is 0 or the reward portion rounds down to 0. setProviderRatio permits 0 and the harvest path documents that the non-rewarded portion goes to savings; with a zero ratio, shares can be the provider's full redeemable balance but the function exits before transferring save = shares - sharesReward, so deployments that route all provider funds to savings leave them in the provider indefinitely.

Useful? React with 👍 / 👎.


memMarket.transferFrom(provider, address(this), sharesReward);
uint256 save = shares - sharesReward;
Expand Down