Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move token burn prep into the shares logic #63

Open
wants to merge 1 commit into
base: merge-train-r4-test
Choose a base branch
from

Conversation

ethereumdegen
Copy link
Collaborator

@ethereumdegen ethereumdegen commented Nov 25, 2024

(NOTE: This update breaks storage slots )

  • Moves the stateful mappings for SharesPreparation into the Shares ERC20 token logic itself so that _afterTokenTransfer can be utilized easily in order to reset preparedness when a user transfers any shares token out of their account
  • Removes the auto-preparation from the deposit function to prevent griefing attacks

Seeks to fix the issues described in Issues 60 and 61

@ethereumdegen
Copy link
Collaborator Author

Approved by 0xAdri

ok yeah, sorry I didn't completely understand before, got it now. Yes resetting the delay mappings is correct as it allows prevention of such attacks. Yes the current code then will mitigate both the flash loan issue and the resetting other user's delay mapping issue, it looks good to me!

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.

1 participant