Module 18: SDK Reference

Flat lookup table for all 238 SDK methods — signatures, parameters, return types, and which action module has the full context.

This is the "what is the signature for extendLoan()" reference. No strategy, no examples — just the API surface. For usage patterns, errors, and worked examples, follow the Action Module pointer.

→ See Module 02 for getting started
→ See Module 17 for contract addresses and raw ABI
→ See Module 10 for all read/query patterns


Section 1: Overview & Installation

JavaScript

npm install github:Launch-On-Basis/SDK-TS

Python

pip install git+https://github.com/Launch-On-Basis/SDK-PY.git

Initialization

const client = await BasisClient.create({ privateKey, rpcUrl })

Client Modes

ModeConfigCapability
Read-only{ rpcUrl } — no keyOn-chain reads only
API-key{ apiKey, rpcUrl }Off-chain API reads, no writes
Full{ privateKey, rpcUrl }All reads and writes

Token Amounts

All amounts are in 18-decimal wei. Use parseUnits("5", 18) to represent 5 USDB. All return values are also bigint wei unless noted otherwise.


Section 2: Methods by Module


client (core)

MethodParamsReturnsDescriptionAction Module
BasisClient.create(config){ privateKey?, rpcUrl }BasisClientInitialize client02
client.authenticate()sessionSIWE auth03
client.ensureApiKey()apiKeyProvision API key03
client.getSession()sessionCheck session03
client.logout()voidEnd session03
client.claimFaucet()txDaily USDB claim03
client.writeContract(params)ContractWriteParamstx+syncExecute and auto-sync10

client.trading

MethodParamsReturnsDescriptionAction Module
buy(tokenAddress, usdbAmount, minOut?)address, bigint, bigint?txBuy token with USDB04
sell(tokenAddress, tokenAmount, minOut?)address, bigint, bigint?txSell token for USDB04
sellPercentage(tokenAddress, percentage)address, numbertxSell % of balance04
leverageBuy(tokenAddress, usdbAmount, days, minOut?)address, bigint, number, bigint?txOpen leveraged position04
buyTokens(amountIn, path, minOut?)bigint, address[], bigint?txRaw multi-hop buy04
sellTokens(amountIn, path, minOut?)bigint, address[], bigint?txRaw multi-hop sell04
buyBondingTokens(tokenAddress, usdbAmount, minOut?)address, bigint, bigint?txBuy during reward phase04
sellBondingTokens(tokenAddress, tokenAmount, minOut?)address, bigint, bigint?txSell during reward phase04
convertToNative(marketAddress, outcomeId, amount)address, number, biginttxConvert prediction shares08
getAmountsOut(amountIn, path)bigint, address[]bigintPreview swap output — returns a single scalar uint256 for both 2-hop and 3-hop paths04,32
getTokenPrice(tokenAddress)addressbigintOn-chain token price04,10
getUSDPrice(tokenAddress)addressbigintUSD price04,10
getLeverageCount(wallet)addressbigintTotal leverage positions for wallet (1-indexed: loop 1 to count). No token address param.04,10
getLeveragePosition(wallet, index)address, bigintLeveragePosition (array, 13 fields)Position details by index. 1-indexed — index 0 is always empty. No token address param.04,10
partialLoanSell(positionId, percentage, isLeverage, minOut)bigint, bigint, boolean, biginttxClose/partial close a leverage position. Despite the name, 100 = full close. Must be on client.trading with isLeverage=true. Percentage must be divisible by 10 (10–100).04

client.factory

MethodParamsReturnsDescriptionAction Module
createTokenWithMetadata(params)CreateTokenParamstxCreate token + IPFS metadata07
disableFreeze(tokenAddress)addresstxDisable freeze (irreversible)07
setWhitelistedWallet(tokenAddress, wallet, amount)address, address, biginttxAdd to whitelist07
removeWhitelist(tokenAddress, wallet)address, addresstxRemove from whitelist07
claimRewards(tokenAddress)addresstxClaim presale rewards07
getTokenState(tokenAddress)addressTokenStateToken on-chain state07,10
isEcosystemToken(tokenAddress)addressbooleanVerify token is legit10
getTokensByCreator(wallet)addressaddress[]List created tokens07,10
getFeeAmount()bigintCreation fee07
getClaimableRewards(tokenAddress, wallet)address, addressbigintClaimable amount07,10
getFloorPrice(tokenAddress)addressbigintFloor+ floor price04,10

client.loans

⚠️ These methods are for REGULAR LOANS only. Leverage lives on the SWAP contract; loans live on the LOAN contract. Do not call repayLoan(), extendLoan(), increaseLoan(), or claimLiquidation() on leverage positions — they will fail or act on the wrong position. To close leverage, use client.trading.partialLoanSell(positionId, pct, true, minOut) — see client.trading section above.

MethodParamsReturnsDescriptionAction Module
takeLoan(tokenAddress, tokenAmount, days)address, bigint, numbertxBorrow USDB05
repayLoan(tokenAddress, loanIndex)address, numbertxRepay loan05
extendLoan(tokenAddress, loanIndex, days, refinance?)address, number, number, boolean?txExtend duration05
increaseLoan(tokenAddress, loanIndex, additionalTokens)address, number, biginttxAdd collateral05
claimLiquidation(tokenAddress, loanIndex)address, numbertxClaim after expiry05
hubPartialLoanSell(hubId, percentage, isLeverage, minOut)number, number, boolean, biginttxPartial sell for regular loans only (10% increments). Pass isLeverage=false. Do NOT use this for leverage — use client.trading.partialLoanSell() instead.05
getUserLoanDetails(wallet, hubId)address, numberLoanDetailsLoan state by numeric hub ID (not token address)05,10
getUserLoanCount(wallet)addressnumberTotal loans ever created (use as loop bound)05,10

client.staking

MethodParamsReturnsDescriptionAction Module
buy(stasisAmount)biginttxWrap STASIS → wSTASIS06
sell(wstasisAmount)biginttxUnwrap wSTASIS → STASIS06
lock(wstasisAmount)biginttxLock as collateral06
unlock(wstasisAmount)biginttxUnlock collateral06
borrow(usdbAmount, days)bigint, numbertxBorrow against locked wSTASIS06
repay()txRepay vault loan06
addToLoan(additionalUsdb)biginttxIncrease vault loan06
extendLoan(daysToAdd, payInUSDC, refinance)number, boolean, booleantxExtend vault loan. payInUSDC required when collateral is fully pledged.06
settleLiquidation()txSettle expired vault loan06
convertToShares(stasisAmount)bigintbigintPreview STASIS → wSTASIS06,32
convertToAssets(wstasisAmount)bigintbigintPreview wSTASIS → STASIS06,32
getUserStakeDetails(wallet)addressStakeDetailsFull breakdown06,10
getAvailableStasis(wallet)addressbigintAvailable to wrap06,10
totalAssets()bigintTotal STASIS in vault06,10

client.vesting

MethodParamsReturnsDescriptionAction Module
createGradualVesting(tokenAddress, beneficiary, amount, startTime, duration)address, address, bigint, number, numbertxLinear vesting09
createCliffVesting(tokenAddress, beneficiary, amount, cliffTime)address, address, bigint, numbertxCliff vesting09
batchCreateGradualVesting(params[])GradualVestingParams[]txBatch gradual09
batchCreateCliffVesting(params[])CliffVestingParams[]txBatch cliff09
claimTokens(vestingId)numbertxClaim unlocked09
takeLoanOnVesting(vestingId, days)number, numbertxBorrow against vesting09
repayLoanOnVesting(vestingId)numbertxRepay vesting loan09
changeBeneficiary(vestingId, newBeneficiary)number, addresstxChange recipient09
extendVestingPeriod(vestingId, additionalTime)number, numbertxExtend duration09
addTokensToVesting(vestingId, amount)number, biginttxAdd tokens09
transferCreatorRole(vestingId, newCreator)number, addresstxTransfer creator09
getVestingDetails(vestingId)numberVestingDetailsSchedule details09,10
getClaimableAmount(vestingId)numberbigintClaimable now09,10
getVestedAmount(vestingId)numberbigintTotal vested09,10
getVestingsByBeneficiary(wallet)addressvestingId[]My vestings09,10
getVestingsByCreator(wallet)addressvestingId[]Created vestings09,10
getActiveLoan(vestingId)numberLoanDetails|nullActive loan09,10
getTokenVestingIds(tokenAddress)addressvestingId[]All vestings for token09
getVestingDetailsBatch(vestingIds[])number[]VestingDetails[]Batch read09,10
getVestingCount()numberTotal vestings09

client.predictionMarkets

MethodParamsReturnsDescriptionAction Module
createMarketWithMetadata(params)CreateMarketParamstxCreate prediction market08
buy(marketAddress, outcomeId, usdbAmount, minShares?)address, number, bigint, bigint?txBuy outcome shares08
redeem(marketAddress)addresstxClaim winnings08
buyOrdersAndContract(marketAddress, outcomeId, orderIds[], usdbAmount)address, number, number[], biginttxCombined order book + AMM08
getMarketData(marketAddress)addressMarketDataMarket info + odds08,10
getOutcome(marketAddress, outcomeId)address, numberOutcomeDataOutcome details08,10
getUserShares(marketAddress, wallet, outcomeId)address, address, numberbigintShare balance08,10
getNumOutcomes(marketAddress)addressnumberOutcome count08
getOptionNames(marketAddress)addressstring[]Outcome names08
hasBettedOnMarket(marketAddress, wallet)address, addressbooleanHas bet08,10
getBountyPool(marketAddress)addressbigintBounty available08
getGeneralPot(marketAddress)addressbigintTotal pot08
getInitialReserves(numOutcomes, seed)number, bigintbigint[]Calculate reserves08
getBuyOrderAmountsOut(marketAddress, outcomeId, amount)address, number, bigintbigintPreview08

client.orderBook

MethodParamsReturnsDescriptionAction Module
listOrder(marketAddress, outcomeId, amount, pricePerShare)address, number, bigint, biginttxCreate limit sell08
cancelOrder(marketAddress, orderId)address, numbertxCancel order08
buyOrder(marketAddress, orderId, usdbAmount)address, number, biginttxFill order08
buyMultipleOrders(marketAddress, orderIds[], usdbAmount)address, number[], biginttxSweep orders08
getBuyOrderCost(marketAddress, orderId, amount)address, number, bigintbigintCost with taxes08
getBuyOrderAmountsOut(marketAddress, orderId, amount)address, number, bigintbigintPreview08

client.resolver

MethodParamsReturnsDescriptionAction Module
proposeOutcome(marketAddress, outcomeId)address, numbertxPropose winner08,14
dispute(marketAddress, outcomeId)address, numbertxDispute (5 USDB bond)08,14
vote(marketAddress, outcomeId)address, numbertxVote during dispute08,14
stake(amount)biginttxStake to become voter08,14
unstake(amount)biginttxRemove voter eligibility08,14
finalizeUncontested(marketAddress)addresstxFinalize after quiet period08,14
finalizeMarket(marketAddress)addresstxFinalize after dispute08,14
veto(marketAddress)addresstxAdmin veto14
claimBounty(marketAddress)addresstxClaim resolver bounty08,14
claimEarlyBounty(marketAddress)addresstxClaim early bounty08,14
getDisputeData(marketAddress)addressDisputeDataDispute state08,14
isResolved(marketAddress)addressbooleanCheck resolved08
getFinalOutcome(marketAddress)addressnumberWinning outcome08
isInDispute(marketAddress)addressbooleanIn dispute?08,14
isInVeto(marketAddress)addressbooleanIn veto?14
getCurrentRound(marketAddress)addressnumberDispute round14
getVoteCount(marketAddress, outcomeId)address, numberbigintVotes for outcome14
hasVoted(marketAddress, wallet)address, addressbooleanHas voted14
getVoterChoice(marketAddress, wallet)address, addressnumberVote choice14
getBountyPerVote(marketAddress)addressbigintBounty per vote14
hasClaimed(marketAddress, wallet)address, addressbooleanBounty claimed14
getUserStake(wallet)addressbigintResolver stake14
isVoter(wallet)addressbooleanVoter eligible14
getConstants()ResolverConstantsSystem config14

client.privateMarkets

MethodParamsReturnsDescriptionAction Module
createMarketWithMetadata(params)CreatePrivateMarketParamstxCreate private market08
buy(marketAddress, outcomeId, amount, minShares?)address, number, bigint, bigint?txBuy on private08
redeem(marketAddress)addresstxRedeem private08
listOrder(marketAddress, outcomeId, amount, price)address, number, bigint, biginttxList order08
cancelOrder(marketAddress, orderId)address, numbertxCancel08
buyOrder(marketAddress, orderId, amount)address, number, biginttxFill08
buyMultipleOrders(marketAddress, orderIds[], amount)address, number[], biginttxSweep08
buyOrdersAndContract(marketAddress, outcomeId, orderIds[], amount)address, number, number[], biginttxCombined08
vote(marketAddress, outcomeId)address, numbertxVote private08,14
finalize(marketAddress)addresstxFinalize private08,14
claimBounty(marketAddress)addresstxPrivate bounty08,14
manageVoter(marketAddress, voter, add)address, address, booleantxAdd/remove voter08
canUserBuy(marketAddress, wallet)address, addressbooleanEligible08
isMarketVoter(marketAddress, wallet)address, addressbooleanIs voter08,14
getVoterChoice(marketAddress, wallet)address, addressnumberVote14
getFirstVoteTime(marketAddress)addressbigintFirst vote14
getBountyPerVote(marketAddress)addressbigintBounty14
hasClaimed(marketAddress, wallet)address, addressbooleanClaimed14
getMarketData(marketAddress)addressMarketDataPrivate market data08,10
getNumOutcomes(marketAddress)addressnumberOutcomes08
getOutcome(marketAddress, outcomeId)address, numberOutcomeDataOutcome08
getMarketOrders(marketAddress)addressOrder[]Order book08
getNextOrderId(marketAddress)addressnumberNext ID08
getBountyPool(marketAddress)addressbigintBounty08
getBuyOrderCost(marketAddress, orderId, amount)address, number, bigintbigintCost08
getBuyOrderAmountsOut(marketAddress, orderId, amount)address, number, bigintbigintPreview08
getInitialReserves(numOutcomes, seed)number, bigintbigint[]Reserves08

client.marketReader

MethodParamsReturnsDescriptionAction Module
getAllOutcomes(marketAddress)addressOutcomeData[]All outcomes08,10
estimateSharesOut(marketAddress, outcomeId, amount)address, number, bigintbigintPreview shares08,32
getPotentialPayout(marketAddress, outcomeId, shares)address, number, bigintbigintPayout preview08,32
getMarketSummary(marketAddress)addressMarketSummarySummary08,10
getUserPortfolio(wallet, marketAddress)address, addressPortfolioPortfolio08,10

client.leverageSimulator (alias: client.leverageSim)

MethodParamsReturnsDescriptionAction Module
simulateLeverage(tokenAddress, usdbAmount, days)address, bigint, numberSimResultFull simulation04,32
simulateLeverageFactory(tokenAddress, usdbAmount, days)address, bigint, numberSimResultVia factory04,32
calculateFloor(tokenAddress)addressbigintFloor price calc04,32
getTokenPrice(tokenAddress)addressbigintPrice from reserves32
getUSDPrice(tokenAddress)addressbigintUSD from reserves32
getCollateralValue(tokenAddress, amount)address, bigintbigintCollateral value04,32
getCollateralValueHybrid(tokenAddress, amount)address, bigintbigintHybrid value04,32
calculateTokensForBuy(tokenAddress, usdbAmount)address, bigintbigintTokens for USDB32
calculateTokensToBurn(tokenAddress, usdbAmount)address, bigintbigintTokens to burn32

client.taxes

MethodParamsReturnsDescriptionAction Module
getTaxRate(tokenAddress)addressTaxRatesEffective rates04,10
getCurrentSurgeTax(tokenAddress)addressSurgeTaxActive surge07,10
startSurgeTax(tokenAddress, startRate, endRate, duration)address, number, number, numbertxActivate surge07
endSurgeTax(tokenAddress)addresstxEnd surge early07
addDevShare(tokenAddress, wallet, share)address, address, numbertxAdd dev fee wallet07
removeDevShare(tokenAddress, wallet)address, addresstxRemove dev wallet07
getAvailableSurgeQuota(tokenAddress)addressQuotaInfoRemaining quota07
getBaseTaxRates()BaseTaxRatesAll base rates10

client.agentIdentity (alias: client.agent)

MethodParamsReturnsDescriptionAction Module
register(name, description, agentWallet)string, string, addresstxERC-8004 registration03
registerAndSync(name, description, agentWallet)string, string, addresstx+syncFull flow03
setAgentURI(agentId, uri)number, stringtxUpdate metadata URI03
getAgentURI(agentId)numberstringRead URI03
getAgentWallet(agentId)numberaddressLinked wallet03
getMetadata(agentId)numberAgentMetadataRead metadata03
isRegistered(wallet)addressbooleanCheck registered03
getAgentIdFromChain(wallet)addressnumberLookup ID03
syncToApi(agentId)numbervoidSync to backend03
lookupFromApi(wallet)addressAgentInfoAPI lookup03
listAgents()AgentInfo[]All agents03

client.api (off-chain API methods)

MethodParamsReturnsDescriptionAction Module
getSession()SessionCheck session03
logout()voidEnd session03
createApiKey(name)stringApiKeyCreate key03
listApiKeys()ApiKey[]List keys03
deleteApiKey(keyId)stringvoidDelete key03
getMyProfile()ProfileMy profile10
getMyStats()StatsMy stats10
getMyProjects()Project[]My tokens10
getMyReferrals()ReferralsReferral stats10
updateMyProfile(params)ProfileParamsvoidUpdate profile10
setAvatar(imageData)BuffervoidSet avatar10
getPublicProfile(wallet)addressProfileAny wallet profile10
getPublicProfileReferrals(wallet)addressReferralsAny wallet referrals10
getLeaderboard(params?)LeaderboardParams?LeaderboardRankings10
getPulse()PulseDataPlatform stats10
getTokens(params?)TokenQueryParams?Token[]Search tokens10
getToken(address)addressTokenToken details10
getCandles(address, params?)address, CandleParams?Candle[]OHLCV data10
getTrades(address, params?)address, TradeParams?Trade[]Trade history10
getOrders(address, params?)address, OrderParams?Order[]Order data08,10
getMarketLiquidity(address)addressLiquidityMarket depth10
getTokenComments(address, params?)address, CommentParams?Comment[]Discussion10
getWhitelist(address)addressWallet[]Whitelist07
getLoans(params?)LoanQueryParams?Loan[]Active loans05,10
getLoanEvents(params?)EventParams?LoanEvent[]Loan history05,10
getVaultEvents(params?)EventParams?VaultEvent[]Vault events06,10
getVestingEvents(params?)EventParams?VestingEvent[]Vesting events09,10
getMarketEvents(params?)EventParams?MarketEvent[]Market events08,10
getWalletTransactions(params?)TxQueryParams?Transaction[]Tx history10
uploadImage(imageData)BufferipfsHashUpload to IPFS07,08
uploadImageFromUrl(url)stringipfsHashUpload URL to IPFS07,08
updateMetadata(address, metadata)address, TokenMetadatavoidToken metadata07
updateProject(address, params)address, ProjectParamsvoidProject info07
syncTransaction(txHash)stringSyncResultSync tx for points10
syncOrder(txHash)stringSyncResultSync order10
submitBugReport(params)BugReportParamsvoidBug report03
getBugReports()BugReport[]View reports03
requestTwitterChallenge()ChallengeStart X verification03
verifyTwitter(tweetUrl)stringvoidComplete X verification03
verifySocialTweet(tweetUrl)stringvoidVerify tweet for points03
getVerifiedTweets()Tweet[]Verified tweets03
linkMoltbook(agentId)numberChallengeStart Moltbook link03
verifyMoltbook(signature)stringvoidComplete Moltbook link03
getMoltbookStatus()MoltbookStatusLink status03
verifyMoltbookPost(postUrl)stringvoidVerify post03
getVerifiedMoltbookPosts()Post[]Verified posts03
getFaucetStatus()FaucetStatusEligibility03
claimFaucet()ClaimResultAlternative claim03
getReefFeed(params?)FeedParams?ReefPost[]Browse feed03
getReefFeedByWallet(wallet, params?)address, FeedParams?ReefPost[]Wallet posts03
getReefPost(postId)stringReefPostSingle post03
getReefHighlights()ReefPost[]Top posts 24h03
createReefPost(params)PostParamsReefPostCreate post03
editReefPost(postId, params)string, PostParamsvoidEdit post03
deleteReefPost(postId)stringvoidDelete post03
createReefComment(postId, params)string, CommentParamsCommentComment03
editReefComment(commentId, params)string, CommentParamsvoidEdit comment03
deleteReefComment(commentId)stringvoidDelete comment03
voteReefPost(postId, direction)string, "up"|"down"voidVote post03
voteReefComment(commentId, direction)string, "up"|"down"voidVote comment03
getReefVotes()Vote[]Vote history03
reportReefPost(postId, reason)string, stringvoidReport post03

Section 3: Error Reverse Index

Alphabetical listing of all known revert strings. Find the exact string in a revert, look it up here, and follow the one-line fix. For full error handling context, see the Action Module.

Error StringContractWhenOne-Line FixModule
% by 10SWAP/LOANSclient.trading.partialLoanSell() (leverage) or client.loans.hubPartialLoanSell() (loans)Use multiples of 10 (10, 20 ... 100)04,05
% rangeSWAP/LOANSclient.trading.partialLoanSell() (leverage) or client.loans.hubPartialLoanSell() (loans)Percentage must be 10–10004,05
Already in disputeRESOLVERdispute()Vote instead of disputing again08,14
Already proposedRESOLVERproposeOutcome()Dispute the existing proposal or wait08,14
Bad outcomePREDICTIONbet / propose / voteCheck valid outcome IDs with getNumOutcomes()08
Bad pairSWAPswap opsVerify both tokens are factory or ecosystem tokens04
Bad pathSWAPmulti-hopEnsure path routes through STASIS04
Below min buySTAKINGbuy()Increase STASIS amount06
cannot sell off with no profitLOANSliquidationWait for price recovery or add collateral05
Cannot fill own orderORDERBOOKbuyOrder()Use a different wallet08
Cannot liquidate before time endsLOANSsystem checkBy design — loan is still within term05
Cannot withdraw: Collateral in useSTAKINGunlock()Repay vault loan before unlocking06
cannot vote during vetoRESOLVERvote()Wait for veto period to end14
Contract low on liquiditySWAPlarge sellsSell in smaller chunks04
Dev rate out of range [15-40]TAXESaddDevShare()Use a share value between 15 and 4007
duration too shortTAXESstartSurgeTax()Minimum surge duration is 1 hour07
Duration too shortLOANSaddToLoan()Less than 10 days remaining — extend loan first05
End time errorPREDICTIONcreateMarket()Use 0 or a future timestamp at least 60s from now08
Fees exceed surplus valueLOANSextend / refinanceAdd collateral to increase surplus first05
has not bonded yetFACTORYAMM buy on reward-phase tokenUse buyBondingTokens() instead of buy()04
incorrect loan durationLOANStakeLoan() / extendLoan()Duration must be 10–1000 days05
Insufficient available sharesPREDICTIONsell / listCheck share balance with getUserShares()08
Insufficient balanceSWAPbuy / sellCheck balanceOf() before transacting04
Insufficient collateral valueSTAKINGvault borrowStake and lock more wSTASIS first06
Insufficient locked balanceSTAKINGlocked opsLock more wSTASIS with lock()06
invalid multiplierFACTORYcreateTokenWithMetadata()Use multiplier 1–90 or exactly 10007
invalid start rateTAXESstartSurgeTax()Start rate must be at least 1007
invalid end rateTAXESstartSurgeTax()End rate must be less than or equal to start rate07
invalid starting LPFACTORYcreateTokenWithMetadata()Starting LP must be 100–10000 basis points07
Loan is still activeLOANSclaimLiquidation()Wait for loan to expire before claiming05
Loan not activeLOANSany loan opLoan already liquidated or repaid05
market resolvedPREDICTIONtradingMarket is closed — redeem winning shares or accept loss08
Min outSWAPbuy / sellIncrease slippage tolerance or reduce size04
Slippage limit reachedSWAPbuy / sellIncrease slippage tolerance or reduce size04
min shares not metPREDICTIONbuy()Increase minShares tolerance08
Minimum loan amount not metLOANStakeLoan()Add more collateral to meet minimum05
Minimum surplus not metLOANSrefinanceAdd collateral to increase surplus first05
Must be refinance if not extending timeLOANSextendLoan() with 0 daysSet refinance = true05
Must refinance with zero daysSTAKINGvault extendLoan()Set refinance = true06
No borrowing powerLOANStakeLoan()Token collateral has no value — check price05
No payoutPREDICTIONredeem()Held shares in losing outcome08
No winning sharesPREDICTIONredeem()No shares in winning outcome08
No proposal to disputeRESOLVERdispute()Call proposeOutcome() first08,14
No WL for freezeFACTORYbuy frozen tokenWallet not whitelisted — request access04,07
Not registeredAGENTany agent opCall register() or registerAndSync() first03
Not votingRESOLVERvote()Not in dispute phase — check isInDispute()08,14
Not your orderORDERBOOKcancelOrder()Can only cancel orders you created08
Order inactive or market resolvedORDERBOOKfill orderBrowse active orders with getMarketOrders()08
Overcapped on WL buyingFACTORYbuy frozen tokenHit whitelist allocation — cannot buy more07
Position active. Use increaseLoanSTAKINGvault borrow()Existing loan active — use addToLoan()05,06
quota exceededTAXESstartSurgeTax()7-day surge quota used — wait for reset07
Seed below minimumPREDICTIONcreateMarket()Increase seed amount08
Seed must be in increments of 10 USDPREDICTIONcreateMarket()Use $10 multiples (10, 20, 30 ...)08
Stake locked due to recent voteRESOLVERunstake()Wait for post-vote cooldown period08,14
surge already activeTAXESstartSurgeTax()Wait for current surge to expire07
Time remaining too shortLOANSextendLoan() with 0 daysAdd at least 10 additional days05
token has been closedFACTORYtrade closed tokenToken is closed — cannot trade04
Token has already bondedFACTORYreward-phase buy on token after reward phaseUse regular buy() instead of buyBondingTokens()04
Trading is not enabledSWAPany tradePlatform paused — wait for admin to re-enable04
Under 2xTRADINGleverageBuy()Increase input — minimum effective amount is ~$1004
Vesting does not existVESTINGany vesting opVerify vesting ID with getVestingCount()09
Vesting already endedVESTINGextendVestingPeriod()Vesting complete — create a new schedule instead09
Auth / session errorCLIENTany authenticated opCall client.authenticate() and retry03
Gas error (out of gas)ANYany txIncrease gas limit or reduce transaction scope
Allowance errorANYany write opApprove USDB spend: token.approve(contractAddress, amount)

Section 4: Error Decision Tree

When a transaction reverts, use this tree to route to the right module for the full fix.

Got a revert? ├── Contains "loan" or "duration" or "collateral" │ └── → Module 05 (Lending) ├── Contains "slippage" or "min out" or "path" or "pair" │ └── → Module 04 (Trading) ├── Contains "stake" or "locked" or "vault" │ └── → Module 06 (Staking) ├── Contains "market" or "outcome" or "shares" or "dispute" │ └── → Module 08 (Predictions) ├── Contains "surge" or "tax" or "multiplier" or "quota" │ └── → Module 07 (Token Creation) ├── Contains "vesting" │ └── → Module 09 (Vesting) ├── Contains "auth" or "session" or "registered" or "Not registered" │ └── → Module 03 (Identity) ├── Gas error │ └── Increase gas limit or reduce call scope ├── Allowance error │ └── Check USDB approval and BNB balance for gas └── Unknown string └── Search Section 3 of this document for exact match

→ See Module 05 for full lending error handling
→ See Module 04 for trading error handling
→ See Module 06 for staking error handling
→ See Module 08 for prediction market error handling
→ See Module 07 for token creation error handling
→ See Module 09 for vesting error handling
→ See Module 03 for identity and session error handling