Skip to main content
The Agon program returns typed errors from the VaultError enum. Each error falls into one of three client-handling categories:
  • User action — the caller must do something (deposit more, wait, cancel) before retrying.
  • Retriable — transient or timing-dependent; retrying later may succeed.
  • Permanent — the input or state is invalid; retrying will not succeed.

Balances and withdrawals

ErrorCategoryMeaning
InsufficientBalanceUser actionPayer balance too low for the requested debit.
WithdrawalAlreadyPendingUser actionA withdrawal is already pending for this token.
NoWithdrawalPendingPermanentNo withdrawal to execute or cancel.
WithdrawalLockedRetriableTimelock has not yet expired; try again after unlock_at.
InvalidWithdrawalDestinationPermanentDestination is the zero address or not a valid token account.
AmountMustBePositivePermanentZero-value operation.

Channels

ErrorCategoryMeaning
ChannelNotInitializedPermanentcreate_channel must be called first.
ChannelAlreadyExistsPermanentA channel already exists for this (payer, payee, token) triple.
SelfChannelNotAllowedPermanentPayer and payee cannot be the same participant.
InsufficientLockedBalanceUser actionRequested unlock exceeds the channel’s locked_balance.
NoChannelUnlockPendingPermanentNo pending unlock to execute.
InvalidAuthorizedSignerPermanentSigner cannot be zero or equal to the current signer.
NoAuthorizedSignerUpdatePendingPermanentNo pending signer rotation.
InboundChannelConsentRequiredUser actionPayee requires explicit consent before inbound channels.
InboundChannelsDisabledPermanentPayee does not accept new inbound channels.
InvalidInboundChannelPolicyPermanentUnknown inbound channel policy value.

Settlement and signatures

ErrorCategoryMeaning
CommitmentAmountMustIncreasePermanentNew committed_amount is not strictly greater than settled_cumulative. Stale replay.
InvalidCommitmentMessagePermanentagon-cmt-v5 message failed structural validation.
InvalidClearingRoundMessagePermanentagon-round-v4 message failed structural validation.
InvalidMessageDomainPermanentSigned domain does not match this deployment.
InvalidSignaturePermanentEd25519 verification failed.
InvalidEd25519DataPermanentPreceding Ed25519 instruction is malformed.
SignatureAlreadyUsedPermanentSignature or clearing round already consumed.
CpiNotAllowedPermanentSettlement instructions may not be called via CPI.
UnauthorizedSettlerPermanentCaller is neither the payee nor the authorized_settler of the message.
NetFlowImbalancePermanentClearing-round net flows do not sum to zero.
NetPositionOverflowPermanentClearing-round net position computation overflowed.

Participants and accounts

ErrorCategoryMeaning
ParticipantNotFoundPermanentParticipant referenced in a message is not registered.
AccountIdMismatchPermanentAccount participant_id does not match the message participant_id.
TooManyTokenBalancesUser actionParticipant already holds the maximum of 16 different token balances.

Tokens and registry

ErrorCategoryMeaning
TokenNotFoundPermanenttoken_id is not in the registry.
TokenAlreadyRegisteredPermanentMint is already registered under a different token_id.
TokenIdAlreadyInUsePermanenttoken_id already maps to a different mint.
UnauthorizedTokenRegistrationPermanentCaller is not the registry authority.
InvalidTokenIdPermanenttoken_id must be greater than zero.
InvalidTokenSymbolPermanentSymbol must be valid ASCII.
InvalidTokenDecimalsPermanentToken decimals exceed the protocol maximum (20).
TokenRegistryFullPermanentRegistry account has no remaining capacity.
InvalidTokenMintPermanentToken account mint doesn’t match registered token.

Configuration and authorities

ErrorCategoryMeaning
InvalidAuthorityPermanentAuthority cannot be the zero address.
InvalidFeeRecipientPermanentFee recipient cannot be the zero address.
InvalidFeeBpsPermanentFee must be between 3 and 30 basis points.
InvalidRegistrationFeePermanentRegistration fee must be 0 or between 0.001 and 0.01 SOL.
InvalidDepositForPermanentdeposit_for amounts must match recipients, up to 16.
UnauthorizedInitializerPermanentOnly the program upgrade authority can call initialize.
InvalidAuthoritySignaturePermanentAuthority check failed.
InvalidChainIdPermanentChain ID not supported by this deployment.
NoPendingAuthorityTransferPermanentNo authority transfer is currently pending.
UnauthorizedPendingAuthorityPermanentCaller is not the nominated pending authority.

Arithmetic

ErrorCategoryMeaning
MathOverflowPermanentArithmetic overflow during balance or size computation.

See also