The admin is any caller the upgrade controller approves through canUpgrade(msg.sender, address(0)).

Setters

Two pause switches

paused

Stops deposits, permit deposits, transfers and swaps. Gatekeeper or admin. Withdrawals stay open.

withdrawalsPaused

Stops withdrawals and swaps. Admin only. It exists for one case: stopping an in-progress drain.
withdrawPendingDeposit is never paused.

Upgrades

The implementation is UUPS. _authorizeUpgrade asks the upgrade controller:

AdminUpgradeController

With AdminUpgradeController, the admin address calls pool setters directly, because canUpgrade(admin, …) is true. execute exists for the one call that needs the controller itself as msg.sender: setUpgradeController. To harden governance, deploy a timelock or multisig controller and switch to it through execute.

Fee accounting

Protocol fees accrue in protocolFeesAccrued[token] and are moved only by sweepProtocolFees, to treasury. A treasury the token refuses blocks only the sweep, never deposits or withdrawals.
ref is bytes32(depositIndex) for deposit-side fees and the txNullifier for withdrawals.