Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cowswap-mintlify-docs-audit-1774430481.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

GPv2Authentication API

Authentication contracts for managing solver authorization in Gnosis Protocol v2. Only trusted solvers can execute trades.

GPv2Authentication Interface

Base interface with a single function:
interface GPv2Authentication {
    function isSolver(address) external view returns (bool);
}

GPv2AllowListAuthentication Contract

The primary implementation featuring manager-based access control.

State Variables

address public manager;
mapping(address => bool) private solvers;

Events

event ManagerChanged(address newManager);
event SolverAdded(address solver);
event SolverRemoved(address solver);

Functions

initializeManager

One-time initialization compatible with proxy deployment pattern.
function initializeManager(address manager_) external initializer;

setManager

Reassigns the manager role. Callable by manager or proxy owner.
function setManager(address manager_) external onlyManagerOrOwner;

addSolver

Adds a solver to the authorized allowlist.
function addSolver(address solver) external onlyManager;

removeSolver

Removes a solver from the authorized allowlist.
function removeSolver(address solver) external onlyManager;

isSolver

Checks if an address is an authorized solver.
function isSolver(address solver) external view returns (bool);

Access Control

ModifierDescription
onlyManagerRestricts to current manager address
onlyManagerOrOwnerAllows manager or proxy admin

Security Recommendations

  • Assign the manager role to a multi-sig wallet or DAO
  • Monitor for unauthorized changes via events
  • Implement time-locks for critical operations
Last modified on March 25, 2026