skip to Main Content
bitcoin
Bitcoin (BTC) $ 96,488.85 1.89%
ethereum
Ethereum (ETH) $ 3,358.00 2.66%
tether
Tether (USDT) $ 0.999267 0.11%
xrp
XRP (XRP) $ 2.18 3.81%
bnb
BNB (BNB) $ 693.97 1.00%
solana
Solana (SOL) $ 190.57 3.42%
dogecoin
Dogecoin (DOGE) $ 0.317031 3.40%
usd-coin
USDC (USDC) $ 1.00 0.03%
staked-ether
Lido Staked Ether (STETH) $ 3,353.86 2.74%
cardano
Cardano (ADA) $ 0.874994 3.45%

Lifinity USDC pool drained by arbitrage bot

A bug on an Immediate-or-Cancel order led to the drainage of nearly $700,000 from Lifnity’s LFNTY-USDC pool.

143 Total views

1 Total shares

Lifinity USDC pool drained by arbitrage bot

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 curve, the actual price won’t be 0, but the pool did offer an extremely low price, resulting in the drain right after.”

Lifinity v1 is an automated market maker (AMM), which means it uses algorithms to create liquidity in trading pairs. According to Durden, it relies on constant product market maker (CPMM), a specific type of AMM model, to maintain an equilibrium between two token quantities in a liquidity pool.

Other decentralized exchanges, such as Unisawp and Bancor, also use this model. Lifinity v1 doesn’t support a standard constant product (CP) curve used in traditional CPMMs, but it can replicate its function. One of the solutions used to replicate it was calling a “last price” function to the next starting price. However, since the bug returned a 0 price, the bot was able to exploit the discrepancy and wipe out the funds.

Cointelegraph reached out to Lifinity’s team but did not receive an immediate response. On X (former Twitter), a community member pointed out that the incident was not a result of an attack.

Lifinity’s team is apparently working on reintroducing liquidity to the pool while reviewing the protocol code and attempting to recover funds. Trades resulting in 0 amounts are no longer accepted.

Magazine: Exclusive — 2 years after John McAfee’s death, widow Janice is broke and needs answers

Loading data ...
Comparison
View chart compare
View table compare
Back To Top