Decentralized exchange (DEX) Lifinity had its LFNTY-USDC pool drained by an arbitrage bot on Dec. 8. According to Lifinity’s Discord channel, an unexpected response to a failed trade caused the $699,090 loss.
A Lifinity’s core member known as Durden explained that a bot attempted an arbitrage trade following the route USDC > xLFNTY > LFNTY > USDC, trying to profit from price discrepancies between different trading pairs.
Here’s how the events transpired in the @Lifinity_io Discord when the 700k arb happened
I noticed something wrong with LFNTY’s price and alerted zoro, one of the devs on the platform.
At first glance, it appeared that the protocol had gotten hacked pic.twitter.com/ebXfK9pDW3
— Shardo (@DrashoWho) December 8, 2023
The bot initiated an Immediate-or-Cancel (IOC) market order on Serum v3, a type of order that must be executed immediately at the current market price if filled. Orders that cannot be filled immediately are canceled.
“But instead of returning an error, as most programs do, it returned 0 amount out. Our pools processed the 0 amount in and also returned 0 amount out,” Durden noted, before explaining that it led the program to update the last transaction price to 0, making the next starting price also 0. “Since it’s a CP…