Audit Anomalies Archive — Issue#2

Zuhaib Mohammed
Aug 16, 2023

Payable functions play a crucial role in blockchain contracts, enabling users to send native ETH for various purposes like adding liquidity, staking assets, or purchasing NFTs. However, there’s an interesting scenario worth considering — one where a user inadvertently sends more Ether than intended. In such cases, a skilled developer can significantly enhance user experience by implementing a thoughtful approach. For instance, refunds the surplus Ether or offers a redemption option at a later point in time.

Failure to incorporate either of these solutions results in users losing the extra Ether, resulting in a bad user experience. Losing excess Ether not only affects user trust but also tarnishes the reputation of the contract and the developers and the project behind it.

To understand this issue with an example from one of my audits, please follow this link.

Thank For Reading.

--

--