_Follow along with this video:_ --- ### MEV - Live AGAIN! > ❗ **IMPORTANT** > The true value in this (and the prior lesson) is found in seeing this exploit in action. If you're unable to watch this currently, I encourage you to return when you can! So, a lot of people saw me do this and started to theorize. - "Hey, could we obfuscate the transaction?" - "What if there was another contract in the way?" - "What if it was written in assembly?" And I'm here to tell you, it doesn't matter. The bots simulate the transaction, and pick out the parts they can use to make money. We look at a [modified example](https://github.com/Cyfrin/sc-exploits-minimized/blob/main/src/MEV/Bouncer.sol) where we add a "bouncer" contract to try to "block" the transactions. ::image{src='/security-section-8/10-mev-live-again/bouncer.png' style='width: 100%; height: auto;' alt='bouncer'} ```javascript // SPDX-License-Identifier: MIT pragma solidity 0.8.20; interface IFrontRan { function withdraw(string memory password) external; } contract Bouncer { error Bouncer__NotOwner(); error Bouncer__DidntMoney(); address s_owner; address s_frontRan; constructor(address frontRan) payable { s_owner = msg.sender; s_frontRan = frontRan; } function go(string memory password) external { if (msg.sender != s_owner) { revert Bouncer__NotOwner(); } IFrontRan(s_frontRan).withdraw(password); (bool success,) = payable(s_owner).call{value: address(this).balance}(""); if (!success) { revert Bouncer__DidntMoney(); } } receive() external payable {} } ``` So, watch the video above to see, will this contract help block the MEV bots?
Patrick highlights the ability of MEV bots to bypass attempts at blocking them, even with added complexity or obscurity in a smart contract.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Solidity Developer
Smart Contract SecurityDuration: 25min
Duration: 1h 18min
Duration: 35min
Duration: 2h 28min
Duration: 5h 03min
Duration: 5h 22min
Duration: 4h 33min
Duration: 2h 01min
Duration: 1h 40min
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar