
The KaoyaSwap, a BSC-chain decentralized transaction protocol based on AMM and exchange pools, was attacked, resulting in a loss of approximately 37,294 $BUSD and 271.2 $WBNB. The affected function considers the balance difference of the last pair before and after the swap as the amountOut, before transferring $BNB tokens to the user. This logic will not cause any issues if the last pair appears only once in the swap path. When the last pair only appears one or more times, it will miscalculate the amount that should be transferred to the user. As a result, the attacker devised a swap path that includes two self-constructed tokens, tokens A and B, with the swap path likely being [A, WBNB, B, A, WBNB], with the A and WBNB pair being included twice in this swap path. Later, the malicious actor borrows 1800 WBNB in a flash loan and adds liquidity to the [tokenA, WBNB] and [tokenB, WBNB] pairs. Then he gets 1019 WBNB after the swap and 1029 WBNB after the liquidity removal, leaving himself with the profit.
• Taco Bell and Decentraland are hosting a Metaverse wedding contest.
• Telegram's co-founder proposes an NFT-style marketplace for usernames.
✅ The full article is available here:
https://blog.neptunemutual.com/weekly-report-aug-29/