Skip to content

Conversation

@melanciani
Copy link
Contributor

@melanciani melanciani commented Dec 30, 2025

Summary

  • Set _decimalsOffset to 2 in OperatorStaking vault to mitigate the ERC4626 inflation attack
  • This creates 100 virtual shares per asset unit, making the attack economically unfeasible
  • Updated tests to account for the new share-to-asset conversion ratio

refs https://github.com/zama-ai/fhevm-internal/issues/826

…al offset (L-06)

Set _decimalsOffset to 2 in OperatorStaking vault to mitigate the
inflation attack where the first depositor can lose tokens.
@melanciani melanciani requested a review from a team as a code owner December 30, 2025 11:48
@cla-bot cla-bot bot added the cla-signed label Dec 30, 2025
@mergify
Copy link

mergify bot commented Dec 30, 2025

🧪 CI Insights

Here's what we observed from your CI run for ff4957b.

🟢 All jobs passed!

But CI Insights is watching 👀

@melanciani melanciani requested review from arr00 and jatZama December 30, 2025 16:55
*/
function _decimalsOffset() internal view virtual returns (uint8) {
return 0;
return 2;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@arr00 we would like your opinion on this change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants