Skip to content

Commit

Permalink
add more defensive checks where isNonRebasingAccount can not mistanki…
Browse files Browse the repository at this point in the history
…ngly be used to return true for yield delegation sources
  • Loading branch information
sparrowDom committed Nov 13, 2024
1 parent 90ec917 commit 2c96306
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/contracts/token/OUSD.sol
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,10 @@ contract OUSD is Governable {
) {
_rebaseOptOut(_account);
}
return alternativeCreditsPerToken[_account] > 0;

return rebaseState[_account] != RebaseOptions.YieldDelegationSource &&
rebaseState[_account] != RebaseOptions.YieldDelegationTarget &&
alternativeCreditsPerToken[_account] > 0;
}

function _balanceToRebasingCredits(uint256 balance)
Expand Down

0 comments on commit 2c96306

Please sign in to comment.