Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

account balance hub to prevent "donation" attacks #121

Open
georgercarder opened this issue Jun 1, 2022 · 0 comments
Open

account balance hub to prevent "donation" attacks #121

georgercarder opened this issue Jun 1, 2022 · 0 comments

Comments

@georgercarder
Copy link
Contributor

georgercarder commented Jun 1, 2022

Many issues of the code4rena engagement address "donation" attacks.

There may be more ways the v1 is vulnerable to this so it is worthwhile to develop account balance hub pattern that would only acknowledge "legitimate" balances and even sweep donated balances.

The base of the pattern would actually be quite simple:

  • "account balance hub" mapping token -> balance
  • use this mapping as "source of truth" for account balances for actions in the platform
  • update that mapping with every legitimate increase in balance
  • swept donations may go to or other account where it makes sense.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant