Skip to Content
Stacks VaultsContractszvstBTC Error Codes
Stacks Vaults

zvstBTC Error Codes

When a vault transaction fails, it returns an error code that tells you why. Each contract uses its own numeric range, so the first digits identify which contract raised the error:

  • u850xxx: the zvstBTC share token
  • u860xxx: the state contract
  • u870xxx: the engine
  • u880xxx: the operator

Share Token (u850xxx)

CodeNameMeaning
u850001ERR-NOT-AUTHORIZEDThe caller is not allowed to perform this action (for example, only the engine can mint or burn shares).

State Contract (u860xxx)

CodeNameMeaning
u860001ERR-NOT-AUTHORIZEDThe caller does not hold the role required for this action.
u860002ERR-NO-CLAIMThe referenced withdrawal claim does not exist.
u860003ERR-TIMELOCK-NOT-READYA timelocked change was confirmed before its delay had elapsed.
u860004ERR-NO-PENDING-UPDATEThere is no pending change to confirm.
u860005ERR-INVALID-KEYThe configuration key being updated is not valid.
u860006ERR-WRONG-TOKENThe token passed does not match the vault’s expected asset.
u860007ERR-INSUFFICIENT-LIQUIDITYThe vault does not hold enough idle balance for this action.

Engine (u870xxx)

CodeNameMeaning
u870001ERR-PAUSEDThe vault, deposits, or withdrawals are paused.
u870002ERR-CAP-EXCEEDEDThe deposit would push net deposits over the deposit cap.
u870003ERR-BELOW-MINThe amount is below the minimum, or a claim cannot yet be funded from idle balances.
u870004ERR-NO-CLAIMThe referenced withdrawal claim does not exist.
u870005ERR-NOT-COOLED-DOWNThe cooldown period has not finished yet.
u870006ERR-ALREADY-FUNDEDThe claim is already funded (so it cannot be cancelled), or the vault is already initialized.
u870007ERR-NOT-FUNDEDThe claim has not been funded yet, so it cannot be redeemed.
u870008ERR-NOT-AUTHORIZEDThe caller is not allowed to perform this action.
u870009ERR-CANCEL-EXPRESSExpress-lane claims cannot be cancelled.
u870014ERR-ZERO-SHARESThe deposit is too small to mint any shares, or the vault is not initialized.
u870015ERR-EXPRESS-DISABLEDThe express withdrawal lane is turned off.
u870016ERR-SLIPPAGEFewer shares would be received than the minimum you set.
u870018ERR-RATIO-OOBThe Stacking DAO exchange rate is outside the vault’s accepted range.
u870019ERR-ALREADY-INITThe vault has already been initialized.
u870020ERR-UNEXPECTED-COLLATERALThe market position holds collateral other than the expected zstBTC.

Operator (u880xxx)

These errors come from the strategy engine and are mainly relevant to the keeper accounts that run it.

CodeNameMeaning
u880001ERR-NOT-AUTHORIZEDThe caller is not an authorized operator.
u880002ERR-PAUSEDStrategy activity is paused.
u880003ERR-TRANSFER-FAILEDA token transfer during the strategy step failed.
u880004ERR-WRONG-TOKENAn unexpected token was passed to a strategy step.
u880005ERR-NOTHING-TO-SWEEPThere is no balance to sweep.
u880006ERR-BAD-CONVERSIONA stake or unstake returned an unexpected amount.
u880007ERR-DEBT-REMAINSThe position still owes debt and cannot be finalized.
u880008ERR-OVER-UNSTACKThe unstake request exceeds the staked balance.

Common Failures for Users

Most day-to-day failures fall into a few buckets:

  • u870002 means the vault is at capacity. Try a smaller amount, or wait until the cap is raised or others withdraw.
  • u870016 means slippage protection kicked in. Refresh your quote and try again.
  • u870005 means your withdrawal is still in its cooldown. Wait until the unlock time.
  • u870001 or u870015 mean an action is currently disabled by governance (a pause, or the express lane being off).
Last updated on