Note: The original text comes from rekt. In retrospect, this was inevitable. This is the first impressive attack on Binance Smart Chain (BSC), with Meerkat Finance’s lost funds ranking third on the list. After just one day of operation, Meerkat Finance swindled 13 million BUSD and approximately 73,000 BNB, with the total funds currently involved being approximately US$31 million. We have been observing the Binance Smart Chain, and its network seems to be replicating the development trend of Ethereum DeFi in the summer. When some project parties built up enough capital through copied code, they ran away with the money (rug pull) phenomenon. The follow-up to this incident will be very interesting. Will CZ and his team roll back their company chain, or just let users suffer the losses? Such a scam leaves thieves with nowhere to hide, where can they go on such a chain? Binance shut down the bridge, and even bscscan.com was down for a while. Was it too much traffic, or some type of smokescreen? Meerkat Finance initially claimed that this was a hack, but then the project deleted their accounts, leaving BSC users to blame themselves or Binance. Thanks to 0xdeadf4ce for the help.
Generally, if the contract has a function that allows the owner to actively withdraw assets used in the strategy/vault, then you are trusting the project team. And they can choose to run away at any time. This is why projects like yearn add check functions as shown below so that the project can only withdraw funds that have not been used by strategies/machine gun pools. Both affected vaults used OpenZeppelin’s transparent proxy upgrade mode, which allows upgrading the Vault logic to a new logic implementation by calling the upgradeTo(address newImplementation) function on the Vault proxy level. The previous implementation of the BUSD vault was deployed at 0x49509a31898452529a69a64156ab66167e755dfb, and the previous implementation of the WBNB vault was deployed at 0x3586a7d9904e9f350bb7828dff05bf46a18bb271, both of which were fairly unremarkable. The Meerkat Finance deployer called the upgradeTo() function twice:
This changes the vault logic, introducing two notable functions that were not part of the original implementation.
Without requiring permission checks, this newly added function becomes the ultimate backdoor for attackers to break into the vault. Using a specific Initializer pattern in a transparent proxy is a best practice and was applied in the first Vault implementation, so the intention of adding an init() method other than planning to steal Vault funds is highly questionable.
The source code is not available, and decompiling the source is limited to checking if the caller is equal to storage slot 0 set in the init() method, and using the vault address as the query target to roll out balanceOf() on the token contract that comes with param1. Both of these functions were not part of the previous Vault implementation. Comparing the bytecode size of the new and old implementations, we can find that the bytecode size of the new implementation is only 1/4 of the previous logic. Since the upgrade was completed by the Meerkat Finance deployer, considering all aspects of the on-chain data, the most likely scenario for this incident is a deliberate runaway incident, and the possibility of private key leakage is very small. As of the time of this post, portions of the stolen funds have been distributed to different addresses and sent to what appears to be the Binance Bridge, which is hosted by the Binance exchange. The Binance.org bridge is currently suspended, likely to prevent funds from being easily transferred to other blockchains. Timeline (March 4, 2021)
The same trick happened on a different chain, but the balance of power was different. Under CZ’s watch, the bridges were burned and the bandits had nowhere to hide. Even in the Meerkat_Rugpull Telegram group, there was no consensus among chat members on how Binance should handle the situation. Will Binance roll back the blockchain and return the money to users? The answer is not so clear cut, the 21 mysterious validators could theoretically arrange a refund, but it is unlikely and would only fuel CeDeFi’s problems and create more work for the (probably already stressed) BSC lawyers. How Binance handles this incident may set a precedent. Although this is not the first case of absconding with funds on BSC, it is the first since the rise of PancakeSwap and the one involving the largest amount of money. Therefore, we find that the protocol on BSC is no more secure than on Ethereum. CZ will not save you, their deals are indeed cheaper but there is no original development. Once Ethereum Layer 2 is launched, what will the BSC enterprise chain look like? |
<<: In-depth: The future trend of Ethereum from the experience of Filecoin applying EIP-1559
>>: 12,000 BTC flowed out of Coinbase, possibly hoarded by institutions
Various situations may occur on our palms, such a...
Ribbit.me, a blockchain-based loyalty program sol...
Many people think that having dimples on the face...
In personal physiognomy, the appearance of nasola...
The most important thing in interpersonal communi...
There is a huge relationship between facial featu...
Breaking news: In order to obtain user resources,...
The Bitcoin ecosystem has been divided into sever...
Is a man with an emperor's appearance destine...
Is the fate of people with square faces good? If ...
The fortune of the broken palm 1. What is Broken ...
Nowadays, it is really difficult to do anything w...
As the saying goes: Appearance reflects the heart...
It is often said that women with high cheekbones ...
If you find 10 men on the street and ask them whe...