CertiK: KyberSwap vulnerability exists in the implementation of Elastic's computeSwapStep() function
CertiK posted on social media that the vulnerability in the KyberSwap attack exists in the implementation of the computeSwapStep() function in KyberSwap Elastic. This function calculates the actual exchange input/output amounts to be deducted or added, the exchange fee to be charged, and the resulting sqrtP. The function first calls the calcReachAmount() function, which concludes that the attacker's slippage will not cross the scale line, but incorrectly generates a slightly larger price than the targetSqrtP calculated by calling "calcFinalPrice". Therefore, liquidity was not removed, resulting in the attack. The attacker performed precise calculation operations on the liquidity pool within the empty scale range, using cross-exchange liquidity counts to deplete many KyberSwap pools containing low liquidity.
Disclaimer: The content of this article solely reflects the author's opinion and does not represent the platform in any capacity. This article is not intended to serve as a reference for making investment decisions.
You may also like
Will XRP Price Rebound? Analytics Company Shares Most Important Resistance and Support Levels
Will the XRP price, which has been on the agenda with its recent attacks, gain momentum again? What are the important levels?
JUST IN: Ethereum Development Announced by Vitalik Buterin Arrives – Here Are The Details
Following concerns about the Ethereum Foundation, the first concrete step was taken regarding the issue, as observed in onchain data.
B3.fun: The airdrop qualification query website is now online, and airdrops can be claimed next week
Bitcoin hashrate hits new high, breaking through 810 EH/s
Trending news
MoreCrypto prices
More![Bitcoin](https://img.bgstatic.com/multiLang/coinPriceLogo/bitcoin.png)
![Ethereum](https://img.bgstatic.com/multiLang/coinPriceLogo/ethereum.png)
![XRP](https://img.bgstatic.com/multiLang/coinPriceLogo/ripple.png)
![Tether USDt](https://img.bgstatic.com/multiLang/coinPriceLogo/0208496be4e524857e33ae425e12d4751710262904978.png)
![Solana](https://img.bgstatic.com/multiLang/coinPriceLogo/solana.png)
![BNB](https://img.bgstatic.com/multiLang/coinPriceLogo/binance.png)
![USDC](https://img.bgstatic.com/multiLang/coinPriceLogo/usdc.png)
![Dogecoin](https://img.bgstatic.com/multiLang/coinPriceLogo/dogecoin.png)
![Cardano](https://img.bgstatic.com/multiLang/coinPriceLogo/cardano.png)
![TRON](https://img.bgstatic.com/multiLang/coinPriceLogo/tron.png)