A few days ago, the zkLend, a decentralized finance lending protocol on Starknet announced losses due to the hacking of their platform. First, they asked the hacker to return 90% of the withdrawn funds, 10% as a reward for that and not start the process against them.
To the hacker:
We understand that you are responsible for today’s attack on zkLend. You may keep 10% of the funds as a whitehat bounty, and send back the remaining 90%, or 3,300 ETH to be exact, to this Ethereum address: 0xCf31e1b97790afD681723fA1398c5eAd9f69B98C.
https://x.com/zkLend/status/1889515118368829559They did not accept it, so some kind of further investigation will probably follow.
However, is it a hack or how to characterize when someone takes advantage of flaws in the system?
Yesterday they published the "
zkLend security incident post-mortem". In short, what happened?
The attack exploited interest manipulation and rounding errors during withdrawals in two steps:
Hacker* deposited the minimum amount into an empty pool and used quick loan "donations" to artificially inflate the accumulator. By making frequent withdrawals and deposits, he abused rounding, which allowed him to withdraw more than he had.
A small initial deposit allowed for the manipulation of the basic budget, and quick loan "donations" artificially inflated the interest accumulator.
Rounding during withdrawals allowed for smooth withdrawals of excess funds.