Skip to content

move token burn prep into the shares logic#63

Open
ethereumdegen wants to merge 1 commit intomerge-train-r4-testfrom
fix/issue-60
Open

move token burn prep into the shares logic#63
ethereumdegen wants to merge 1 commit intomerge-train-r4-testfrom
fix/issue-60

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