It basically checks that the value of localCounter has increased only by one. That means the function has been called only once (within the transaction).
The actual function is executed at _;. Before that it increases the counter by one and assigns the value to a local variable (opposed to the global variable _guardCounter). If the function calls itself, the ...
You are in the correct path. MEV can do this for you.
You can use MEV to submit two transactions with the following properties:
Either both of none of them go through
They should be executed in the same block, next to each other
The first one adds Ethers to the wallet
The second one transfers the assets out
You pay the miners directly in Eth, disregarding ...
"Connecting" your wallet to a website does two things:
It allows the website to know that you have a crypto wallet (implicitly)
It gives the website your wallet's public address (explicitly)
Once the website has your address, they can use it to read whatever information there is publicly available in the blockchain, for that address. One such ...
I'm bumping this since I'd also like to know. For what is worth, this contract could be reentrancy-attacked so that it no longer has funds when the owner wants to withdraw, but still not what the problem is asking.
So lets imagine that the pool.token contract in the first function is somehow compromised and now the pool.token.safeTransfer() function is not only transferring the token but also calling again the emergencyWithdraw(). When the function is entered for second time the user.amount will not be 0 and the user will get 2*user.amount instead of once and this will ...