MetaTrust:Earning.Farm遭到攻击,原因是合约的 "提款 "函数存在逻辑问题
根据 MetaTrust Alert 推文提示,部署在 Ethereum 上的项目 Earning.Farm 遭到攻击, 截止至现在,遭受攻击损失金额已达约 288 $ETH,价值$ 536, 000 美元。所有代币已被入新的钱包 ( 0 x ee 4 b 3 d)。
此漏洞的根本原因是 "EFVault "合约的 "提款 "函数中存在逻辑问题,该函数允许用户在 "ENF_ETHLEV "余额少于预期份额时仅烧毁用户的 "ENF_ETHLEV "余额。
攻击步骤
1/ 攻击者从闪贷中获得 10, 000 个以太坊,将其中的 80 个存入`ENF_ETHLEV`合约,并获得 295 e 18 个份额。
2/ 攻击者通过调用 `withdraw` 函数从 `ENF_ETHLEV` 合约中提取 295 e 18 份。然后,"withdraw "函数调用外部合约 "controller "的 withdraw 函数,触发攻击者合约的回退函数。
3/ 在回退函数中,攻击者将 ( 295 e 18 - 1000) `ENF_ETHEV` 代币转移到一个新的钱包 0 x fd 29 f 2 ,结果攻击者只被烧掉 1000 个 `ENF-ETHEV` 代币。
4/ 攻击者将 0 x fd 29 f 2 钱包中的 `ENF_ETHEV` 代币转换为 ETH,偿还闪贷,并从中获利。
Trump Meme Competition Closes: Result for the Top 220 $TRUMP Holders Invited to Donald Trump’s Dinner Released
The post Trump Meme Competition Closes: Result for the Top 220 $TRUMP Holders Invited to Donald Trum...
Bitcoin Price Targets $110,000 All-Time High After Consolidation Trend Ends
Over the past three days, Bitcoin has hovered between $103,000 and $104,500, creating a narrow chann...
CoinShares and Moneyfarm Drive Crypto Adoption in Italy with Regulated BTC Access
This partnership aims to provide the Italian customers with a seamless exposure to crypto assets in ...