Safety Considerations

Not getting REKT 101

Searchers must ensure the following security measures are in place to safeguard their contract interactions:

1. Restrict Unauthorized Access:

Ensure that only trusted contracts, such as the designated Atlas contract, can execute sensitive functions. Unauthorized access checks help prevent exploitation from untrusted or malicious actors attempting to interact with critical contract features. if (msg.sender != _atlas) revert InvalidEntry();

2. Verify Caller Identity:

Always confirm the caller’s origin to restrict sensitive actions to authorized accounts only. By implementing identity checks, searchers protect their contracts from external interference by unauthorized sources. if (solverOpFrom != _owner) revert InvalidCaller()

3. Implement Solver call to be private

Ensure that the function performing the backrun is not accessible externally. Implement whitelisting to limit access, as demonstrated in our example.

Please see the next two sections for examples of these checks.

Last updated