Skip to main content

Safety Considerations

Not Getting REKT 101

To ensure secure contract interactions, searchers must follow these essential security practices:

1. Restrict Unauthorized Access

Limit access to sensitive functions, allowing only trusted contracts—such as the designated Atlas contract—to execute them. Unauthorized access checks protect your contract from untrusted or malicious actors.

if (msg.sender != _atlas) revert InvalidEntry();

2. Verify Caller Identity

Always verify the origin of the caller to restrict sensitive actions to authorized accounts. Identity checks prevent unauthorized sources from interfering with contract operations.

if (solverOpFrom != _owner) revert InvalidCaller();

3. Keep Solver Calls Private

Ensure that functions performing sensitive operations, such as backrunning, are inaccessible externally. Whitelisting can be applied to restrict access, as shown in the example below.

Regardless of whether a direct or proxy implementation is used, explicit access and security checks are essential. Ensure that the solverOpFrom address, provided as the first argument in atlasSolverCall, is properly permissioned.