Turuosa ülempiirid
24h turumaht
5716
Aktiivsed krüptovaluutad
58.14%
Bitcoin Jaga

BSC Flash Loan Attack: PancakeBunny

BSC Flash Loan Attack: PancakeBunny


NewsBTC
2021-07-23 12:57:09

In May 2021, we witnessed multiple hacks targeting BSC DeFi products. In particular, a loophole related to reward minting in the yield aggregator, PancakeBunny, was exploited to mint ~7M BUNNY tokens from nothing, leading to a whopping $45M financial loss. After the bloody hack, three forked projects —  AutoShark, Merlin Labs, and PancakeHunny — were attacked with similar techniques. Amber Group’s Blockchain Security team, led by Dr. Chiachih Wu, elaborates on the loophole and gives a step-by-step account of the exploit by reproducing the attack against PancakeBunny. Hidden Attack Surface: balanceOf() Many people believe that composability is crucial to the success of DeFi. Token contracts (e.g., ERC20s) play an essential role on the bottom layer of DeFi legos. However, developers may overlook some uncontrollable and unpredictable conditions when integrating ERC20s into their DeFi projects. For example, you can’t predict when and how many tokens you will receive when you retrieve the current token balance. This uncertainty creates a hidden attack surface. In many cases, smart contracts reference the balances of ERC20s in their business logic. For example, when a user deposits some XYZ tokens into the smart contract, XYZ.balanceOf() is invoked to check how much money is received. If you’re familiar with the Uniswap codebase, you probably know that the UniswapV2Pair contract has many balanceOf(...


.
Loe lahtiütlusest : Kogu meie veebisaidi, hüperlingitud saitide, seotud rakenduste, foorumite, ajaveebide, sotsiaalmeediakontode ja muude platvormide ("Sait") siin esitatud sisu on mõeldud ainult teie üldiseks teabeks, mis on hangitud kolmandate isikute allikatest. Me ei anna meie sisu osas mingeid garantiisid, sealhulgas täpsust ja ajakohastust, kuid mitte ainult. Ükski meie poolt pakutava sisu osa ei kujuta endast finantsnõustamist, õigusnõustamist ega muud nõustamist, mis on mõeldud teie konkreetseks toetumiseks mis tahes eesmärgil. Mis tahes kasutamine või sõltuvus meie sisust on ainuüksi omal vastutusel ja omal äranägemisel. Enne nende kasutamist peate oma teadustööd läbi viima, analüüsima ja kontrollima oma sisu. Kauplemine on väga riskantne tegevus, mis võib põhjustada suuri kahjusid, palun konsulteerige enne oma otsuse langetamist oma finantsnõustajaga. Meie saidi sisu ei tohi olla pakkumine ega pakkumine