Skip to main content

Atlas Errors

The AtlasErrors contract centralizes all custom error definitions used across the Atlas Protocol. Utilizing Solidity's custom error feature (introduced in Solidity 0.8.4), it provides efficient and descriptive error handling mechanisms that reduce gas costs compared to traditional require statements with error strings.

Simulator Errors

Error NameParametersDescription
SimulatorBalanceTooLowNoneTriggered when the simulator's balance is insufficient.
UnauthorizedNoneTriggered when an unauthorized action is attempted.
UnreachableNoneIndicates that an unreachable code path was executed.
NoAuctionWinnerNoneTriggered when an auction concludes without a winner.
InvalidEntryFunctionNoneIndicates the use of an invalid entry function.
SimulationPassedNoneIndicates that a simulation has successfully passed.

User Simulation Errors

Error NameParametersDescription
UserSimulationFailedNoneIndicates that a user simulation has failed.
UserSimulationSucceededNoneIndicates that a user simulation has succeeded.
UserUnexpectedSuccessNoneTriggered when a user operation unexpectedly succeeds.
UserNotFulfilledNoneIndicates that a user operation was not fulfilled as expected.

Bid and Solver Errors

Error NameParametersDescription
BidFindSuccessfuluint256 bidAmountEmitted when a bid is successfully found with the specified amount.
UnexpectedNonRevertNoneIndicates that an unexpected non-revert occurred during execution.
InvalidSolverNoneTriggered when an invalid solver attempts an operation.
BidNotPaidNoneIndicates that the solver's bid was not paid as required.
InvertedBidExceedsCeilingNoneTriggered when an inverted bid exceeds the defined ceiling limit.
BalanceNotReconciledNoneIndicates that the solver's balance does not reconcile with expectations.
SolverOpRevertedNoneTriggered when a solver operation reverts during execution.
AlteredControlNoneIndicates that control parameters have been altered unexpectedly.
InvalidEntryNoneTriggered when an invalid entry is detected in operations.
CallbackNotCalledNoneIndicates that a required callback was not executed as expected.
PreSolverFailedNoneTriggered when pre-solver operations fail.
PostSolverFailedNoneIndicates that post-solver operations failed during execution.
InsufficientEscrowNoneTriggered when escrow funds are insufficient for the intended operation.

Escrow Errors

Error NameParametersDescription
UncoveredResultNoneIndicates that a result was uncovered unexpectedly.
InvalidEscrowDurationNoneTriggered when an invalid escrow duration is specified.
InsufficientUnbondedBalanceuint256 balance, uint256 requestedEmitted when the unbonded balance is insufficient for the requested amount.
InsufficientBondedBalanceuint256 balance, uint256 requestedIndicates that the bonded balance is insufficient for the requested amount.
PermitDeadlineExpiredNoneTriggered when a permit's deadline has expired.
InvalidSignerNoneIndicates that the signer provided is invalid.
EscrowLockActiveNoneEmitted when an escrow lock is active, preventing certain operations.
InsufficientWithdrawableBalanceuint256 balance, uint256 requestedIndicates insufficient balance available for withdrawal.
InsufficientAvailableBalanceuint256 balance, uint256 requestedEmitted when the available balance is insufficient for the requested action.
InsufficientSurchargeBalanceuint256 balance, uint256 requestedIndicates insufficient surcharge balance for the requested operation.
InsufficientBalanceForDeductionuint256 balance, uint256 requestedEmitted when there isn't enough balance to perform a deduction.
ValueTooLargeNoneIndicates that a provided value exceeds protocol-defined limits.
BidTooHighuint256 indexInSolverOps, uint256 bidAmountTriggered when a bid exceeds acceptable limits within solver operations.

DAppIntegration Errors

Error NameParametersDescription
OnlyGovernanceNoneIndicates that only governance entities can perform the action.
SignatoryActiveNoneTriggered when attempting to add a signatory that's already active.
InvalidCallerNoneEmitted when an unauthorized caller attempts an action.
InvalidDAppControlNoneIndicates an invalid DAppControl address.
DAppNotEnabledNoneTriggered when attempting to interact with a disabled dApp.
AtlasLockActiveNoneIndicates that the Atlas lock is active, preventing certain operations.
InvalidSignatoryNoneEmitted when an invalid signatory is provided.

Permit69 Errors

Error NameParametersDescription
InvalidEnvironmentNoneIndicates an invalid environment parameter.
EnvironmentMismatchNoneTriggered when there is a mismatch in environment settings.
InvalidLockStateNoneEmitted when the lock state is invalid or inconsistent.

GasAccounting Errors

Error NameParametersDescription
LedgerFinalizeduint8 idIndicates that a ledger has been finalized and cannot be modified further.
LedgerBalancinguint8 idTriggered during ledger balancing operations.
MissingFundsuint8 idEmitted when expected funds are missing from the ledger.
InsufficientFundsNoneIndicates that there are insufficient funds to perform the intended operation.
NoUnfilledRequestsNoneTriggered when there are no unfilled requests in the ledger.
SolverMustReconcileNoneIndicates that a solver must reconcile before proceeding.
DoubleReconcileNoneTriggered when a solver attempts to reconcile more than once.
InvalidExecutionEnvironmentaddress correctEnvironmentEmitted when the execution environment does not match the expected address.
InvalidSolverFromaddress solverFromIndicates that the solver's from address is invalid.
InsufficientSolverBalanceuint256 actual, uint256 msgValue, uint256 holds, uint256 neededEmitted when a solver's balance is insufficient for the required operation.
InsufficientAtlETHBalanceuint256 actual, uint256 neededIndicates that the AtlETH balance is insufficient for the intended action.
InsufficientTotalBalanceuint256 shortfallEmitted when the total balance is insufficient to cover the operation.
UnbalancedAccountingNoneIndicates discrepancies in accounting, leading to unbalanced records.

SafetyLocks Errors

Error NameParametersDescription
NotInitializedNoneEmitted when an operation is attempted on an uninitialized contract.
AlreadyInitializedNoneIndicates that an initialization has already been performed.

AtlasVerification Errors

Error NameParametersDescription
NoUnusedNonceInBitmapNoneTriggered when there are no unused nonces available in the bitmap.

DAppControl Errors

Error NameParametersDescription
BothUserAndDAppNoncesCannotBeSequentialNoneIndicates a configuration conflict where both user and dApp nonces are set to sequential.
BothPreOpsAndUserReturnDataCannotBeTrackedNoneTriggered when both pre-operations and user return data tracking are enabled simultaneously.
InvalidControlNoneEmitted when an invalid control parameter is provided.
NoDelegatecallNoneIndicates that a delegatecall is required but not performed.
MustBeDelegatecalledNoneEmitted when a function must be called via delegatecall but isn't.
OnlyAtlasNoneIndicates that only the Atlas contract can perform the action.
WrongPhaseNoneTriggered when an operation is attempted in an incorrect execution phase.
WrongDepthNoneEmitted when the call depth exceeds expected limits.
InsufficientLocalFundsNoneIndicates insufficient local funds for the operation.
NotImplementedNoneEmitted when attempting to use a function that is not implemented.
InvertBidValueCannotBeExPostBidsNoneIndicates a configuration conflict between bid inversion and ex-post bidding.

Usage Notes

  • Centralized Error Handling: By defining all errors within AtlasErrors, the protocol ensures consistent and gas-efficient error handling across all contracts.
  • Descriptive Errors: Custom errors provide clear and specific feedback, facilitating easier debugging and maintenance.
  • Gas Efficiency: Custom errors consume less gas compared to traditional require statements with error strings, optimizing contract performance.