QUADRIGA INITIATIVE
CRYPTO WATCHDOG & FRAUD RECOVERY PLATFORM
A COMMUNITY-BASED, NOT-FOR-PROFIT
$0 USD
MAY 2022
GLOBAL
MOONBEAM NETWORK
DESCRIPTION OF EVENTS
"The Moonbeam network is a smart contract platform for cross-chain connected applications that unites functionality from many blockchains including Ethereum, Cosmos, Polkadot, and more. It makes it possible for developers with Solidity or Vyper-based smart contracts to create multi-chain instances of their application that are able to communicate with each other. Moonbeam is able to unify access to users, assets, and data through: compatibility and cross-chain interoperability with many blockchains, an excellent development environment with unmatched tool support, and a modern proof-of-stake architecture built on Substrate."
"Moonbeam simplifies the developer experience by combining full Ethereum compatibility with the power of Polkadot, including scalability, cross-chain integrations, and on-chain governance."
"Moonbeam delivers complete Ethereum compatibility within a Polkadot parachain environment, so developers can continue to use the programming languages and tools they’ve grown used to — but within a fast-growing and scalable Layer 1 chain.
It is also compatible with the Substrate and Polkadot ecosystem, including block explorers, wallets, parachains, and more, allowing users the flexibility to choose the right tools and services for the job."
"Write your smart contracts in anything that compiles to Solidity bytecode, without needing to rewrite or reconfigure." "Leverage Ethereum’s broad development ecosystem by using the tools you love, like MetaMask, Hardhat, Waffle, Remix, and Truffle, in addition to Substrate-based APIs." "Built-in integrations for assets like DOT and ERC-20s and infrastructure services like Chainlink and TheGraph. Continual efforts to integrate with other Polkadot-native assets."
"On May 27th, whitehat pwning.eth submitted a missing call check critical vulnerability to the Moonbeam network via Immunefi, demonstrating the possibility of a direct theft of the native assets, such as Moonriver (MOVR) and Moonbeam (GLMR), which were deployed using pre-compiled contracts. The Moonbeam team estimated that the vulnerability could have impacted up to $100m in funds, which was prevented due to the whitehat’s swift disclosure.
The security vulnerability was found within Frontier — the Substrate pallet that provides core Ethereum compatibility features within the Polkadot ecosystem, which Moonbeam helped create."
"In Ethereum, there are three major types of contract calls: regular CALL, STATICCALL, and DELEGATECALL.
When contract A makes a CALL to contract B by calling foo(), the function execution relies on contract B’s storage, and the msg.sender is set to contract A.
This is because contract A called the function foo(), so that the msg.sender would be contract A’s address and msg.value would be the ETH sent along with that function call. Changes made to state during that function call can only affect contract B."
"However, when the same call is made using DELEGATECALL, the function foo() would be called on contract B but in the context of contract A. This means that the logic of contract B would be used, but any state changes made by the function foo() would affect the storage of contract A. msg.sender would point to the EOA who made the call in the first place. And what is important in the case of the Moonbeam bug, msg.value would point to the first call context, not the second. In other words, Ether is not sent along delegatecall. (See example 2)."
"[T]here was no logic present under the Moonbeam pre-compiled contract to determine if the incoming call is DELEGATECALL or a static CALL in EVM."
"[T]hanks to the whitehat’s work, no user funds were lost, and Moonbeam quickly released an upgrade that patched the vulnerability.
The whitehat was awarded $1 million for his find, the max critical bounty from Moonbeam’s bug bounty program on Immunefi. Moonwell added a $50k bonus as well, making pwning.eth’s total winnings $1,050,000."
"The third custom-designed whitehat card was minted to whitehat pwning.eth on September 19, 2022, to recogize his critical bug find in Moonbeam, for which he received a $1 million payment and an additional contribution of $50,000 from Moonwell. You can read more details about how he responsibly disclosed that bug here."
The whitehat card legend for the pwning.eth Moonbeam card, left to right:
Bow: Well-written PoC Lightning: Rare/complex type of exploit Impact of Attack: 7 Ease of Defense: 5"
The Moonbeam network is a cross-chain smart contract platform that integrates functionality from various blockchains, including Ethereum, Cosmos, and Polkadot. It enables developers to create multi-chain instances of their applications with compatibility and cross-chain interoperability. A whitehat named pwning.eth discovered and reported a critical vulnerability in Moonbeam via Immunefi, demonstrating the potential for direct theft of native assets. The vulnerability, found within the Frontier Substrate pallet, could have impacted up to $100 million in funds. Moonbeam swiftly addressed the issue, preventing any user funds from being lost, and awarded pwning.eth a $1 million bounty for responsibly disclosing the bug, along with a $50,000 bonus from Moonwell.
Immunefi - Whitehat Hall of Fame (Jan 10)
https://opensea.io/assets/ethereum/0xdbe4e52b12790670f9f9152d775bab806a08795d/3 (Nov 15)
Moonbeam Missing Call Check Bugfix Review (Nov 16)
Moonbeam | Cross-Chain Connected Smart Contract Platform (Nov 16)
Moonbeam Network - Solidity Smart Contracts on Polkadot (Nov 16)
Ethereum Transaction Hash (Txhash) Details | Etherscan
(Nov 16)
