Skip to content

Latest commit

 

History

History
54 lines (30 loc) · 2.03 KB

092.md

File metadata and controls

54 lines (30 loc) · 2.03 KB

Straight Parchment Wombat

High

Inconsistency with specified design choice leading to loss of funds

Summary

In the design choices section, it's noted that safeguarding tokens is critical, even when a value for a safe is not specified:

However, if the value for a safe is not passed in, tokens should not be able to be sent into space or the zero address.

Presently, this design goal is not fully met. There are no checks to ensure the provided safe address is non-zero. As a result, any interactions involving this address will still proceed, potentially leading to the unintended consequence of sending tokens to the zero address.

Although all calls within the protocol are trusted and are expected to supply valid parameters when invoking functions, the issue here lies in the protocol's failure to align with the intended design outlined in the contest README.

Root Cause

Missing zero address check in _verifyDefiSwap(). https://github.com/sherlock-audit/2024-11-telcoin/blob/b9c751b59e78a7123a636e31ecafc9147046f190/telcoin-audit/contracts/swap/AmirX.sol#L264

All subsequent interactions with the defi safe will work and will lock the tokens:

Internal pre-conditions

N/A

External pre-conditions

N/A

Attack Path

Issue cannot be considered as an attack.

Impact

Loss of funds.

PoC

N/A

Mitigation

Add check for the defiSafe value in _verifyDefiSwap().