Level 4 - Telephone โบ
Last updated
Last updated
The contract is vulnerable because the msg.sender
is the address that sent the transaction to interact with the contract, but this is only the final address if the transaction involved multiple contracts.
Create a middleman contract so that x.origin != msg.sender
.
Submit instance... ๐ฅณ
In a simple call chain A->B->C->D
inside D
msg.sender
will be C
and tx.origin
will be A
.
While this example may be simple, confusing tx.origin
with msg.sender
can lead to phishing-style attacks, such as .