Today’s LiFi hack happed because its internal swap() function would call out to any address using whatever message the attacker passed in. This allowed the attacker to have the contract transferFrom() out the funds from anyone who had approved the contract.

Mar 20, 2022 · 11:37 PM UTC

Since the contract was designed to make multiple swaps in a single transaction, the attacker sent a single huge transaction with a wall of transferFrom's for the contract to send, each moving money from a user that had approved the contract, to the attacker:
Replying to @danielvf
Having no transferFrom / approve solves this.
Replying to @danielvf
That's.. not great. 🧐
Replying to @danielvf
The obvious question is why is there a lack of security standardization/checks that prevents insecure contracts from being deployed in the first place?
Replying to @danielvf
Sound familiar @transmissions11 ? 😅
Replying to @danielvf
// solhint-disable-next-line avoid-low-level-calls that's really putting salt in the wound ._.
Replying to @danielvf
Remember that debug button back in VB days— need one of those for smart contracts
Replying to @danielvf
Contract copy paste...
Replying to @danielvf
Just another day in ethereum blockchain...