Skip to main content

Error Codes

Debug table of revert strings encountered when calling yb-core contracts. Strings are drawn from yb-core-master source. ERC-4626 strings (erc4626: deposit/mint/withdraw/redeem more than maximum) are listed once per family rather than repeated for each method.

Core

LT.vy

StringCause
AccessCaller neither admin nor factory admin
Already setSecond set_amm
Slippagemin_shares / min_assets not met
Debt too highDeposit/redeem value would exceed AMM.max_debt() / 2
Withdrawing nothingwithdraw(0)
Withdraw to/from stakerStaker is msg.sender or receiver
We're dead. Use emergency_withdrawNormal withdraw while AMM killed
Remainder too smallSupply would drop below MIN_SHARE_REMAINDER (1e6)
Deposit to stakerreceiver == staker in deposit
N>2Constructor: Cryptoswap pool has more than 2 coins (coins(2) did not revert)
receiveremergency_withdraw: emergency-admin / admin caller must set receiver == owner
owneremergency_withdraw: non-owner caller is not the position owner
Not killedEmergency withdrawal path used while AMM is live
Need factorywithdraw_admin_fees called when admin is not a factory contract
KilledAdmin-fee withdrawal while AMM killed
No fee_receiverFactory fee receiver is unset
Staker=fee_receiverFee receiver equals staker
Loss made admin fee negativeAdmin-fee withdrawal attempted while admin bucket is negative
Staker already setSecond set_staker
GASGauge checkpoint retry path: _checkpoint_gauge falls back to a fixed-gas call (200k) and requires the caller to supply at least that much — guards against gas-griefing of reward checkpoints

AMM.vy

StringCause
Fee too highConstructor: fee > MAX_FEE (10%). set_fee reverts without a message on the same check.
Unsafe mindebt < coll_value · MIN_SAFE_DEBT / 1e18
Unsafe maxdebt > coll_value · MAX_SAFE_DEBT / 1e18
Accessset_rate / set_fee / set_killed from non-LT
Access violation_deposit / _withdraw from non-LT
Rate too highrate > MAX_RATE (100% APR)
Amount too largeget_dy(i=0, in_amount > debt)
Slippageexchange with out < min_out
Empty AMMexchange with collateral_amount == 0
Bad final statePost-swap x0 < x0_pre

VirtualPool.vy

StringCause
Wrong calleronFlashLoan not from FACTORY.flash()
SlippageOutput below min_out

Factory.vy

StringCause
AccessNon-admin on admin function
Wrong stablecoinPool's coin 0 ≠ factory STABLECOIN
Only set onceset_mint_factory re-called
Minterset_allocator targets mint_factory
Already setset_gauge_controller re-called
Admin fee too highmin_admin_fee > 1e18
Bad aggregatorInit / set_agg with agg.price() ∉ [0.9e18, 1.1e18) (open interval, both ends)
Too many marketsmarket_count ≥ 50000
Nonexistent marketfill_staker_vpool(i ≥ market_count)

HybridVault.vy

StringCause
Already initializedRe-init
AccessGeneric non-owner caller on owner-only function (deposit, withdraw, emergency_withdraw, stake, unstake, redeem_crvusd, withdraw_scrvusd, recover_tokens)
Only adminset_personal_limit from non-vault-factory-admin
Only ownerOwner-gated call from non-owner (set_crvusd_vault)
Vault not allowedNew crvusd_vault not in allow-list
Has active positionsset_crvusd_vault while positions exist
Bad pool_idmarket.lt == 0
Not enough crvUSDInsufficient backing without deposit_stablecoins flag
Beyond pool limitDeposit exceeds cap
Debt made too highSanity: debt > 1.1 · additional_crvusd
No liquidity givenlt_shares == 0 from deposit
Cannot withdraw stablesOracle broken, not opting into stablecoin path
Not enough crvUSD leftBacking would drop below requirement
Token not allowedrecover_tokens targets protected token
Oracle is brokenGlobal and per-pool oracle both fail
Zero sharesemergency_withdraw(0)

HybridVaultFactory.vy

StringCause
Already createdUser already has a vault
Vault not allowedcrvusd_vault not in allow-list
Vault impl not setvault_impl == 0
AccessNon-ADMIN on admin function
Only vaults can callupdate_* from non-registered vault
Vault wind-downRequirement increase on disallowed vault
Beyond vault limitIncrease exceeds crvusd_vault_limits

LTMigrator.vy

StringCause
lt_to deprecatedMigration target has been deprecated
not enough outshares_out < min_out in migrate_staked

DAO

YB.vy

StringCause
erc20: access is deniedemit not from a minter

VotingEscrow.vy

StringCause
Min valuecreate_lock / increase_amount value < UMAXTIME
Withdraw old tokens firstcreate_lock with existing lock
Can only lock until time in the futureunlock_time ≤ now
Voting lock can be 4 years maxExceeds 4y
No existing lock foundincrease_amount on empty
Cannot add to expired lock. WithdrawExpired lock
Nothing is lockedincrease_unlock_time on empty
Lock expiredExpired lock
Can only increase lock durationNew end ≤ current end
Not allowedinfinite_lock_toggle blocked by clearance checker
The lock didn't expirewithdraw before expiry
Not supporteddelegate / delegateBySig
erc721: caller is not token owner or approvedTransfer auth fail
Wrong token IDToken ID mismatches owner's address
Need max veLockTransfer with non-max or non-infinite locks

GaugeController.vy

StringCause
Gauge already addedDuplicate gauge registration
Gauge not aliveGauge has no live weight
Vote checker not setveYB's transfer_clearance_checker ≠ this
Mismatch in lengthsArray-length mismatch
ExpiredUser's veYB lock expired
Weight too largeSingle weight > 10000 bps
KilledVoting for killed gauge
Gauge not addedUnregistered gauge (vote_for_gauge_weights or set_killed)
Cannot vote so oftenSame-gauge re-vote within 10 days
Used too much powerSum of veYB vote weights across gauges exceeds 10000 bps (100%) after this vote

LiquidityGauge.vy

StringCause
YBadd_reward / deposit_reward targets YB
LP_TOKENadd_reward targets LT
Already addedDuplicate add_reward
Not addedUnknown reward in change_reward_distributor / deposit_reward
No rewardsdeposit_reward(0)
Finishes in the pastNew finish time ≤ now
Rate unknownExtending past old finish time
No rewardZero distributor
erc4626: deposit/mint/withdraw/redeem more than maximumCap breach
receiverKill-mode redeem with receiver ≠ owner

FeeDistributor.vy

StringCause
Dedfill_epochs when killed
Might be a vestFee claim routed through a vesting escrow when direct receiver rules do not allow it

InflationaryVest.vy

StringCause
Admin requiredstart / set_recipient from non-owner
Already startedSecond start()

VestingEscrow.vy

StringCause
Lengths mismatchfund with mismatched arrays
RuggedRe-target rugged recipient
DisabledRe-fund disabled recipient
Cannot disabletoggle_disable when can_disable = False
Not disabledrug_disabled on enabled

CliffEscrow.vy

StringCause
Empty recipientinitialize(recipient=0)
Already initializedRe-init
Cliff still appliesTransfer/approve before unlock_time
Not authorizedNon-recipient ve op
Cannot recover YBrecover_token(YB)

SnapshotSplitter.vy

StringCause
Already claimedDouble-claim

CallComparator.vy

StringCause
Not equalcheck_equal
Equalcheck_nonequal
Not greatercheck_gt
Not lesscheck_lt
Timestamp not greatercheck_timestamp_gt
Timestamp not lesscheck_timestamp_lt
Too earlycheck_called_after rate limit

TokenSender, Multisend, StakeZap

No custom revert strings. Fail on token-transfer reverts.