Property
Languagesolidity
Severitycritical
CWECWE-682: Incorrect Calculation
OWASPA7:2021 Identification and Authentication Failures
Confidence LevelHigh
Impact LevelHigh
Likelihood LevelHigh

Description#

The code updates balances for both the sender (‘from’) and recipient (’to’) without checking if they are the same address. This can allow users to manipulate their own balance during self-transfers, leading to incorrect accounting.

Impact#

If exploited, an attacker could repeatedly transfer tokens to themselves to inflate their balance or bypass restrictions, resulting in financial loss, broken token invariants, and potential compromise of the entire smart contract or token ecosystem.