The MondrianWallet2::payForTransaction
function which is used to pay gas to the bootloader after a transaction has been executed is callable by anyone. This leaves the wallet vulerable to a drain attack, where the attacker can repeatedly call this function till the wallet has no more funds left.
The MondrianWallet2::payForTransaction
function is used to pay gas to the bootloader after a transaction has been executed. This should only be callable by the bootloader but anyone can call this function.
The contract can be drained, sending all of a wallet's fund to the bootloader contract. Anyone can repeatedly call the MondrianWallet2::payForTransaction
function to drain the contract of its balance.
The attacker calls MondrianWallet2::payForTransaction
function repeatedly till the user has no more funds left.
Place the following code into ModrianWallet2Test.t.sol
No tools were used to find this vulnerability
Add the MondrianWallet2::requireFromBootLoader
modifier in the MondrianWallet2::payForTransaction
function, to prevent anyone but the bootloader from accessing the function.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.