Risk Warning: Beware of illegal fundraising in the name of 'virtual currency' and 'blockchain'. — Five departments including the Banking and Insurance Regulatory Commission
Information
Discover
Search
Login
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt
BTC
ETH
HTX
SOL
BNB
View Market
The CS token project was attacked, and the loss amount was about 714,000 US dollars
2023-05-24 03:10
Odaily星球日报讯 据区块链安全审计公司Beosin旗下Beosin EagleEye安全风险监控、预警与阻断平台监测显示,2023年5月24日,BSC链上的CS(CS)代币项目遭受攻击。原因是代币的_transfer函数中sellAmount没有及时更新。Beosin安全团队将简析分享如下:

1. 攻击者利用闪电贷借入BSC-USD兑换成CS代币。

2. 攻击者开始卖出3000 CS代币,这一步会设置sellAmount。

3. 攻击者通过给自己转账,会触发sync(),在这个函数中使用了上一步的sellAmount并且这个函数会销毁pair的中CS代币数量。Sync后sellAmount会置为0。重复2,3步持续减少pair中的CS代币数量,拉升CS代币的价格,使得后续一步可以兑换出更多的BSC-USD。

攻击者借入80,000,000 BSC-USD,兑换出80,954,000 BSC-USD,偿还80,240,000 BSC-USD,获利约714,000 BSC-USD。