RSTAR

Error reference

Every rejection has its own stable code, returned as custom program error: 0x.. (hex). The SDK's errorName(code) returns the name.

CodeNameWhenWhat to do
0InvalidInstructionthe data does not decoderebuild the instruction with the SDK
1NotUpgradeAuthorityinit_config not signed by the upgrade authoritysign with the upgrade authority
2NotAuthorityan authority-only action signed by another keysign with the config authority
3NotPendingAuthorityaccept_authority signed by a key that was not namedsign with the pending authority
4NotPostera print action signed by neither keeper nor authorityuse the keeper or authority key
5InvalidQuoteMintthe quote mint is not the configured USDCpass the config's quote mint
6InvalidProgramAccounta token or system program account is wrongpass the right program id
7InvalidAccountKindan account is not an RSTAR config or marketcheck the account order
8AccountMismatcha vault, mint, treasury or token account does not match the marketderive accounts from this market
9InvalidMonthmonth outside 1 to 12, or year out of rangelist a real calendar month
10InvalidTargetRatetarget_mid above the 25% ceilingpass a midpoint in rate units
11ZeroAmountamount of zerosend a positive amount
12MathOverflowa checked counter or sum would overflowuse a smaller amount
13MarketSettledminting or posting into a settled marketredeem with redeem_settled instead
14MarketNotSettledredeem_settled before settlementwait for settle_market, or use redeem_pair
15InvalidPrintDatethe date is not a valid yyyymmddpost the NY Fed effectiveDate
16PrintOutOfOrderthe date is not after every earlier printpost dates in increasing order
17PrintOutsideMonththe date is before the seed lookback or after the monthpost only this month's prints and its seed
18NoCarryRatea print after the 1st with no earlier rate to carrypost the seed print first
19PrintNotFinalposted before 19:30 UTC on the day after the datewait for the NY Fed's finality
20RateOutOfRangerate above 25%check the units (1% = 10000)
21MonthClosedthe final print already closed the monthsettle the market
22InvalidFinalFlaga seed print marked finalpost the seed without the final flag
23PendingQueueFull8 prints already waitfold ready prints, then post
24PrintIndexOutOfRangethe index points past the queueread pending_len first
25DisputeWindowClosedthe print's 24 hours have passedthe print is permanent once folded
26AlreadyDisputedthe print is already disputedcorrect or void it
27SettlementNotReadythe final print has not folded and the fallback time has not comewait, or fold ready prints
28InvalidSideside other than 0 or 10 for LONG, 1 for SHORT
29InvalidBucketbucket other than 0 or 10 operations, 1 reserved
30ClaimExceedsBalanceclaiming more than the bucket accruedread the claimable amount first
31BuybackDestinationUnsetbucket 1 claimed before its destination was setset it with update_config
32InvalidPdaan account is not at its derived addressderive it from the seeds
33CloseTooEarlyclose_market before settlement plus 90 dayswait
34OutstandingSupplya side that still pays has holderswait until it is redeemed
35LiveMarketsclose_config with a market still openclose every market first