
| Audited | sendaifun/solana-agent-kit at commit 1254fe550872ee48d42f168fc8ca854c87ab6eff |
|---|---|
| Date | 11 October 2026 (audited again; first audit 11 October 2026) |
| How it ran | local run on our workstation, full audit, Standard review |
| Verdict after review | Fail (Fail if a High finding remains after review, otherwise Pass with notes) |
Compared with the first audit
Same commit as the first audit: the project's default branch has no later commits (checked 11 October 2026), so nothing could have been fixed upstream in between. Each finding of the first audit (11 October 2026) was checked again against the code audited now. 140 findings in the first audit; 139 still open (97 found again, 42 not reported again but still present); 1 not in the code, so the first audit was wrong there. This audit has 185 findings after review, 71 of them new.
| First audit | Finding | Reviewed rating then | Now | In this audit |
|---|---|---|---|---|
| #1 | Login trusts client-supplied email/wallet (crossmint-sak-v2) | Medium | Still open | not reported again |
| #2 | Mobile backend auths by wallet-address header | Medium | Still open | #103 |
| #3 | Agent signs raw tx bytes from caller | Medium | Still open | #99 |
| #4 | Vendor-built txs signed without inspection | Low | Still open | #12 |
| #5 | Vendor-supplied account metas / signer flags | Low | Still open | #71 |
| #6 | Vendor sets uncapped tip | Low | Still open | #84 |
| #7 | Send loop reports success on "processed" | Low | Still open | #8 |
| #8 | Confirmation results ignored | Low | Still open | #10, #9 |
| #9 | Explorer reply overrides on-chain revert | Low | Still open | #11 |
| #10 | Transfers hard-wired to classic token program | Low | Still open | #3, #6 |
| #11 | Pool creation: no Token-2022 extension / owner checks | Low | Still open | #7 |
| #12 | Balance listings ignore Token-2022 | Low | Still open | #4, #5 |
| #13 | Creator-fee claim uses referral wallet | Low | Still open | #1 |
| #14 | Fee payer / user wallet from caller input | Low | Still open | #154 |
| #15 | Vendor HTTP responses used unchecked | Low | Still open | #19, #13, #14, #16, #17, #27 |
| #16 | Oracle prices without freshness check | Low | Still open | #15, #18 |
| #17 | Sanctum rebuild loses lookup-table accounts | Low | Still open | #144 |
| #18 | Failure messages unreadable | Low | Still open | #26 |
| #19 | Misleading or raw error text | Low | Still open | #26, #11 |
| #20 | Missing balances reported as zero | Low | Still open | #21 |
| #21 | ||/?? defaults hide missing data | Low | Still open | #24, #22, #23, #25 |
| #22 | Undocumented vendor endpoint used as API | Low | Still open | #27 |
| #23 | Phantom results used with wrong shape | Low | Still open | not reported again |
| #24 | Phantom init without secure-context check | Low | Still open | not reported again |
| #25 | MWA path on every Android device | Low | Still open | not reported again |
| #26 | System colour-scheme check inverted | Low | Still open | not reported again |
| #27 | Theme after first paint / white splash | Low | Still open | #32 |
| #28 | Hard-coded colours / one-theme logo | Low | Still open | #37, #38 |
| #29 | Responsive image sizes invalid | Low | Still open | not reported again |
| #30 | Login modal interrupts typing | Low | Still open | not reported again |
| #31 | EVM wallet cached at module level | Medium | Still open | #55 |
| #32 | SolutioFi client cached once for all agents | Low | Still open | #74 |
| #33 | Para example: one agent, wallet swapped per request | Medium | Still open | not reported again |
| #34 | Next.js LangChain example: shared thread and wallet | Medium | Still open | not reported again |
| #35 | Order-confirmation polling always times out | Low | Still open | #42 |
| #36 | Drift client polls every 10 ms, leaks on error | Medium | Still open | #44, #43 |
| #37 | Confirmation polled, not subscribed | Low | Still open | #45 |
| #38 | Plugin registration not atomic | Low | Still open | #47 |
| #39 | Two adapters bypass executeAction | Low | Still open | #157 |
| #40 | Constants recomputed per call | Low | Still open | #59 |
| #41 | Fixed sleep stands in for confirmation | Low | Still open | #141 |
| #42 | Dead persistence code | Low | Still open | not reported again |
| #43 | In-progress flag can stick, not atomic | Low | Still open | not reported again |
| #44 | Message overwritable by id across chats | Low | Still open | #104 |
| #45 | User and assistant message ids collide | Low | Still open | not reported again |
| #46 | Identity columns lack uniqueness | Low | Still open | not reported again |
| #47 | MCP example starts with zero tools | Low | Still open | not reported again |
| #48 | API key read from process.env, not config | Low | Still open | #67 |
| #49 | Missing credentials become empty strings | Low | Still open | #67 |
| #50 | Oversized files | Low | Still open | #79 |
| #51 | Duplicated logic and types | Low | Still open | #72, #89, #95, #56 |
| #52 | Runtime logic in types layer, import cycle | Low | Still open | #78 |
| #53 | CI runs no tests, lint:fix | Low | Still open | #85 |
| #54 | Test suite: zero assertions, dead imports | Low | Still open | #86, #87, #96 |
| #55 | Jest scripts, Jest not installed | Low | Still open | #86 |
| #56 | Unresolved confirm TODOs | Low | Still open | not reported again |
| #57 | Token table copied five times | Low | Still open | #72 |
| #58 | Priority-fee request written three times | Low | Still open | not reported again |
| #59 | Results logged as warnings | Low | Still open | #91 |
| #60 | CI ignores lockfile | Low | Still open | #172 |
| #61 | Previous-version scripts remain | Low | Still open | #173 |
| #62 | Batch send throws after first broadcast | Medium | Still open | #98 |
| #63 | Sign-only mode bypassed by plugins | High | Still open | #116, #83, #84, #17 |
| #64 | Production vendor key hard-coded | Medium | Still open | #128 |
| #65 | Fallback Allora key hard-coded | Low | Still open | #62 |
| #66 | Pump.fun launch never signs with mint key | Low | Still open | #109 |
| #67 | Pump.fun initial buy: SOL used as token amount | Low | Still open | #49 |
| #68 | Third-party wallet is default token creator | Medium | Still open | #61 |
| #69 | Signing methods passed without their object | Medium | Still open | #112 |
| #70 | Legacy txs built without fee payer | Medium | Still open | not reported again |
| #71 | Market account not signed by its keypair | Low | Still open | #129 |
| #72 | Close-empty-accounts crashes under 40 | Low | Still open | #108 |
| #73 | Compressed airdrop action wrong arguments | Low | Still open | #110, #111 |
| #74 | NFT mint sends same tx twice | Low | Still open | #101 |
| #75 | Domain registration swaps ATA args | Low | Still open | #121 |
| #76 | Priority-fee lookup crashes on no samples | Low | Still open | #115 |
| #77 | Each send signs twice; signed tx to third party | Low | Still open | #113 |
| #78 | Remote priority fee uncapped, mainnet host | Low | Still open | #118 |
| #79 | Float maths for base units | Low | Still open | #75 |
| #80 | OpenAI adapter optionals required, aborts on unions | Medium | Still open | #158 |
| #81 | MCP adapter makes optionals required | Medium | Still open | #156 |
| #82 | Vercel AI tools named by array index | Low | Still open | #159 |
| #83 | Tool limit drops 128th tool | Low | Still open | #89 |
| #84 | Dependent market txs in parallel | Medium | Still open | #152 |
| #85 | CoinGecko URLs end in "undefined" | Low | Still open | #63 |
| #86 | API key logged via raw HTTP error | Low | Still open | #168 |
| #87 | SPL branch of priority-fee transfer broken | Low | Still open | #117 |
| #88 | Debug script opens mainnet position | Low | Still open | #97 |
| #89 | Exact old core versions as peers | Low | Still open | #169 |
| #90 | require in ES-module package | Low | Still open | #160 |
| #91 | Prices truncated to two decimals | Medium | Still open | #20 |
| #92 | Ticker lookup picks highest FDV | Low | Still open | #166 |
| #93 | Per-tx failures swallowed in burn/close/merge | Low | Still open | #66 |
| #94 | Mayan schema requires unused field | Low | Still open | #164 |
| #95 | Jupiter swap ignores slippage | Low | Still open | #48 |
| #96 | Voltr withdraw uses deposit endpoint | Low | Still open | #71 |
| #97 | Drift stake-account check never detects missing | Low | Still open | #137 |
| #98 | Drift perp amount: tokens documented, USD used | Medium | Still open | #142 |
| #99 | Vault withdrawal always 6-decimal | Low | Still open | #140 |
| #100 | Adrena shorts derive long position address | Low | Still open | #70 |
| #101 | Adrena leverage unit contradicts protocol | Low | Still open | #69 |
| #102 | Flash: hard-coded 10% slippage, no preflight | Medium | Still open | #80 |
| #103 | Bridge affiliate fee/recipient from model | Low | Still open | #146 |
| #104 | Order ids are random floats | Low | Still open | #130 |
| #105 | Lavarage slippage unbounded | Low | Still open | not reported again |
| #106 | Network detected from RPC URL substring | Low | Still open | #147 |
| #107 | OpenAI secret key shipped in client bundles | High | Still open | #105 |
| #108 | Turnkey org private key shipped to browser | High | Still open | not reported again |
| #109 | Model output rendered as unsanitised HTML | Medium | Still open | not reported again |
| #110 | BackHandler cleanup uses removed API | Low | Not in the code: the first audit was wrong here | not reported again |
| #111 | Typing animation restarts after unmount | Low | Still open | #30 |
| #112 | Clipboard imported from RN core | Low | Still open | #28 |
| #113 | Helius key bundled in mobile app | Low | Still open | #177 |
| #114 | Release build signed with debug keystore | Low | Still open | #183 |
| #115 | Key shares readable/deletable by email, no auth | Medium | Still open | not reported again |
| #116 | Chat server functions skip auth/ownership | Low | Still open | not reported again |
| #117 | Session secret hard-coded | Low | Still open | not reported again |
| #118 | Unauthenticated file upload | Low | Still open | #176 |
| #119 | Saved parts replaced by placeholder | Low | Still open | not reported again |
| #120 | TG bot puts private key in prompt, plaintext store | Medium | Still open | not reported again |
| #121 | Group bot posts private key into chat | Medium | Still open | not reported again |
| #122 | Bots/routes let any user spend one shared wallet | Medium | Still open | not reported again |
| #123 | Telegram webhook accepts unauthenticated updates | Medium | Still open | not reported again |
| #124 | Bot timeout never covers the stream | Low | Still open | not reported again |
| #125 | Invite redemption/keypair creation race | Low | Still open | not reported again |
| #126 | Discord history stores replies as user messages | Low | Still open | not reported again |
| #127 | Wallet delete removes only link | Low | Still open | not reported again |
| #128 | Autonomous loop, no spending limit | Low | Still open | not reported again |
| #129 | Wormhole example: removed constructor, RegExp from input | Low | Still open | not reported again |
| #130 | Discord example reads two RPC variables | Low | Still open | not reported again |
| #131 | Token deploy ignores authority options | Low | Still open | #51 |
| #132 | 3Land tool calls SDK with empty credentials | Low | Still open | #52 |
| #133 | Multisig transfer uses member wallet, vault 0 | Low | Still open | #2, #119 |
| #134 | Mobile chat retries whole generations | Medium | Still open | #106 |
| #135 | Message signature wrapped as text bytes | Low | Still open | not reported again |
| #136 | Overlay/audio permissions in main manifest | Low | Still open | #40, #184 |
| #137 | Signer stubs return unsigned tx | Low | Still open | not reported again |
| #138 | Server-wallet signAllTransactions malformed | Low | Still open | not reported again |
| #139 | Example prints full keypair | Low | Still open | not reported again |
| #140 | OKX DEX starter wrong numbers, swap before confirm | Low | Still open | not reported again |
Each finding keeps the number it has in the audit report. The rating shown first is the one after review; the first automated rating is listed with it. 147 findings were first rated Medium or High; 69 of them are Medium or High after review. Text marked "From the report" is quoted from the audit report; fixes are suggestions and were not tested. Code locations link to the file and line at the audited commit.
High after review (1)
From the report
Evidence: import { OPENAI_API_KEY } from "@env"; / apiKey: OPENAI_API_KEY || "dummy-key-placeholder",
anyone with the app can extract the key and spend the owner's quota.
call the model through the backend, and rotate any key that was ever bundled.
Medium after review (68)
From the report
Evidence: const ix = await pumpSdk.collectCoinCreatorFeeInstructions(REFERRAL_WALLET); and payerKey: REFERRAL_WALLET,
the transaction pays fees from, and claims for, a hard-coded third-party wallet. The agent cannot sign as that wallet, so the claim always fails.
use agent.wallet.publicKey as both the creator and the fee payer.
From the report
Evidence: fromPubkey: agent.wallet.publicKey, and createTransferInstruction(fromAta, toAta, agent.wallet.publicKey, adjustedAmount)
inside a multisig vault transaction only the vault can sign. The proposal therefore cannot execute, or it would move funds from the wrong account.
use the vault address as the source and as the token authority, and create the recipient's token account when it is missing.
From the report
Evidence: const fromAta = await getAssociatedTokenAddress(mint, agent.wallet.publicKey); and } catch { ... createAssociatedTokenAccountInstruction(
Token-2022 mints derive the wrong accounts and fail. Any RPC error is also read as "account missing".
read the owning program of the mint, pass it to every token helper, catch only the not-found error, and use idempotent account creation.
From the report
Evidence: const signature = await agent.connection.sendTransaction(signedTx, { skipPreflight: true, });
a failed USDC payment is followed straight away by order handling, as if it had been paid.
keep preflight on, confirm with the signed blockhash, check value.err, and only then report the order.
From the report
Evidence: const adjustedPrice = price.mul(new BN(100)); ... ${priceStr.slice(0, -2)}.${priceStr.slice(-2)}
prices under 0.10 are rendered wrongly, for example 0.05 becomes "0.5", and sub-cent prices become "0.0". Trading decisions can follow from that.
return the raw price and exponent, or format with exact decimal arithmetic.
From the report
Evidence: await agent.connection.getTokenAccountBalance(token_address); and return token_account.value.uiAmount || 0;
the documented input, a mint address, fails. A null amount is reported as 0. get_balance_other.ts also masks with || 0.
derive the owner's token account for the mint, and return null or an error instead of 0.
From the report
Evidence: basisPoints: options.royaltyBasisPoints || 500,
"no royalties" collections are created with 5% royalties.
use ?? 500.
From the report
Evidence: const pollInterval = setInterval(async () => { ... return { success: true, status: "completed", order } ... return { success: false, error: "Payment confirmation timeout" };
values returned from the interval callback go nowhere, so the function returns "timeout" at once while the timers keep running. Checkout has already sent the USDC payment, and then reports "Failed to fetch order status". An agent may retry and buy twice.
poll with an awaited loop and a deadline, return the real status, and clear every timer.
From the report
Evidence: const { driftClient, cleanUp } = await initClients(agent); ... } catch (e) { throw new Error(\Failed to create user account: ...\); }
cleanUp() runs only on success. Errors, and the manager branches in drift_vault.ts (line 395 and others), leave subscribed polling clients alive, which exhausts RPC limits.
call cleanUp in finally everywhere, and reuse one client per operation.
From the report
Evidence: accountLoader: new BulkAccountLoader(agent.connection, "processed", 10),
each client makes about 100 requests per second, multiplied by the leaked clients, at a commitment level that can be rolled back.
poll at 1 s or slower with "confirmed" commitment, or fetch once for one-shot reads.
packages/core/src/utils/send_tx.ts:163From the report
Evidence: const signature = await agent.connection.sendTransaction(signedTransaction as VersionedTransaction, { maxRetries: 0, skipPreflight: false });
the same transaction is re-sent every second. Once it lands, preflight rejects the next send as already processed, and that error discards the success.
send once, poll the status, re-send only while the status is null and the blockhash is valid, and treat "already processed" as success.
From the report
Evidence: _slippageBps: number = DEFAULT_OPTIONS.SLIPPAGE_BPS, ... &dynamicSlippage=true
a caller who asks for a slippage cap gets none, even though the action's example promises 1%.
honour the value as a maximum, or remove it from the schema and examples.
From the report
Evidence: input.initialLiquiditySOL, and in the tool: getBuySolAmountFromTokenAmount(global, bondingCurve, new BN(amount), true)
the default 0.0001 becomes BN(0) tokens, and the user's slippage and priority fee are ignored.
convert SOL to a token amount explicitly, and carry slippage and fee through.
From the report
Evidence: create(umi, { asset: assetSigner, collection: collection, name: metadata.name, uri: metadata.uri,
the sellerFeeBasisPoints and creators values that are accepted never reach the asset.
pass them to the royalties setting, or remove them from the signature.
From the report
Evidence: defaultAuthority.updateAuthority = new PublicKey(authority?.updateAuthority); ... defaultAuthority.isMutable = authority?.isMutable;
a request for an immutable token silently produces a mutable one.
apply both values to the create call, or reject them.
From the report
Evidence: slippage: input.slippage, while create_bridge_order.ts builds its query without it.
the user believes a slippage limit applies when none does.
forward the fields, or remove them from the schema.
From the report
Evidence: let evmWallet: Wallet | null; ... if (!evmWallet) { if (agent.config?.ETHEREUM_PRIVATE_KEY) { evmWallet = new Wallet(...)
in a server that hosts several agents, a later agent's cross-chain swap is signed with the first agent's private key and spends that user's funds.
create the wallet per call from the calling agent's configuration, or cache it per agent.
From the report
Evidence: createInstruction(mint.publicKey, metadata.name, metadata.symbol, metadataUri, REFERRAL_WALLET, agent.wallet.publicKey)
when the referral setting is unset, the creator of every launched token, and therefore its creator fees, is a vendor address. There is no warning.
default the creator to the agent wallet, and require the referral to be configured explicitly.
From the report
Evidence: .../search/trending${agent.config?.COINGECKO_DEMO_API_KEY && ?x_cg_demo_api_key=...}
without a key, the URL ends in trendingundefined and the 404 body is returned as data. get_token_price_data.ts has the same problem.
build query strings with URLSearchParams, adding the key only when it is set.
From the report
Evidence: } catch (_error) { continue; }
failed closes, burns, merges and spreads disappear, and the action prints "Successfully closed N accounts" anyway.
collect per-transaction errors and report partial failure.
From the report
Evidence: const position = AdrenaClient.findPositionAddress(owner, custody.pubkey, "long",
closing or opening a short targets the long position's account, at line 63 and again at line 442.
pass "short", and move the shared account resolution into one side-aware helper.
From the report
Evidence: lamports: amount * LAMPORTS_PER_SOL, and const adjustedAmount = amount * Math.pow(10, mintInfo.decimals);
values like 1.1 SOL give non-integer lamports, and the transfer throws. The same pattern is in the Helius, Squads, compressed-airdrop, Fluxbeam, Adrena, Flash and Orca tools.
convert decimal strings to integers with exact arithmetic, and reject excess precision.
From the report
Evidence: const slippageBps = new BN(1000);
the caller cannot tighten slippage on a leveraged open, and closes use a different fixed 1%.
expose a validated, bounded slippage parameter with a conservative default.
packages/core/src/types/wallet.ts:163From the report
Evidence: return ( await agent.wallet.signAndSendTransaction(instructionsOrTransaction) ).signature;
most tools pass Transaction objects. These go to a basic send with no confirmation, so tools report success for transactions that may never land.
route signed transactions through the same confirm-and-retry function.
From the report
Evidence: await builder.sendAndConfirm(umi, { confirm: { commitment: "processed" } });
the tool always broadcasts, even for sign-only agents, and confirms at the weakest commitment.
build the transaction and send it through the shared helper.
From the report
Evidence: if (agent.wallet.signAndSendTransaction) { const { signature } = await agent.wallet.signAndSendTransaction(tx); ... { skipPreflight: true, maxRetries: 3 }
there is no confirmation and no sign-only handling, and the tip amount comes straight from the vendor.
fix the duplicated dependency that forced the workaround, send through the shared helper, and cap the tip.
packages/core/src/types/wallet.ts:141From the report
Evidence: txSigs.push(signature); } / throw new Error("Wallet does not support signAndSendTransaction ...");
for any array of transactions, for example when cancelling limit orders, the first one lands, an error is thrown, its signature is lost and the rest are never sent. Retries then duplicate the effects.
check wallet support before the loop, and put the throw in an else branch.
From the report
Evidence: const txBuffer = Buffer.from(transactionData.substring(2), "hex"); / const transaction = VersionedTransaction.deserialize(txBuffer); / return await signOrSendTX(agent, transaction);
prompt-injected text can make the agent sign a transaction that drains the wallet.
never accept raw transaction bytes from the model. Keep the order server-side behind an id, or decode the bytes and allow-list programs and destinations.
From the report
Evidence: return https://${network}.g.alchemy.com/v2/${apiKey}; where network comes from the action's z.string().optional() field.
a value such as evil.example/x? sends the key to that host.
allow-list the network values, and treat the network as configuration, not as model input.
Review: ` in rpcRequest.ts:41, used at urls.ts:22; needs prompt injection, leaks a vendor key not funds)
From the report
Evidence: const sigOrTx = await signOrSendTX(agent, tx); ... await signOrSendTX(agent, tx);
the second send fails as already processed, so the call reports failure. A retry mints a duplicate asset and pays again.
delete the second call.
From the report
Evidence: if (params.fromAmount) { ... txSig = signature; } and if (params.toAmount) { ... txSig = signature; }
the model can supply both optional fields, and then two swaps run, the second in reverse direction. The success message also prints an undefined amount.
require exactly one field in the schema and use if/else. Check the quote response, and compute slippage as an integer.
From the report
Evidence: const walletAddress = req.headers['x-wallet-address'] as string || req.query.walletAddress as string; / const user = await User.findOne({ walletAddress });
anyone can read and delete another user's chats. A query object can also inject filter operators.
verify a session token or signature on the server, coerce the address to a string, and sanitize filters.
From the report
Evidence: const shouldRetry = isTransactionRelated(messageContent) && retryCount < MAX_RETRIES; / return executeWithRetry(operation);
a network error after a transfer or swap was broadcast re-runs the prompt, and the transaction can be sent again.
never retry after a tool with side effects has run, or make tools idempotent.
From the report
Evidence: signAndSendTransaction: async tx => { setCurrentOperation("Signing and sending transaction..."); ... with tools: solanaTools, maxSteps: 5,
injected text in chat content or token metadata can move the user's funds.
require a confirmation dialog showing recipient, asset, amount and fee, and add spend limits.
From the report
Evidence: for (let i = 0; i < Math.max(0, MAX_INSTRUCTIONS - spl_token.length); i++) { transaction.add(token_2022[i]);
the loop reads past the end of the array and throws before the "nothing to close" check. The sign-only path also signs without a blockhash.
bound the loop by the array length, check for emptiness first, and set the blockhash before signing.
Review: ` throws before the size check at 40; sign-only path signs before the blockhash is set at 57)
From the report
Evidence: const tx = new VersionedTransaction(messageV0); ... const txHash = await signOrSendTX(agent, tx);
every launch fails signature verification after the metadata upload.
add tx.sign([mint]) before wallet signing.
Review: `; fails after the Pinata upload)
From the report
Evidence: const txs = await sendCompressedAirdrop(mintAddress, amount, decimals, recipients, ...
the agent argument is missing and strings are passed where public keys are expected, so the action always fails.
pass the agent and PublicKey values.
From the report
Evidence: const transaction = Transaction.from(setupTransaction.serialize());
serialization throws without a fee payer and blockhash. Flattening every batch into one transaction exceeds size limits.
add instructions directly, and send one transaction per batch.
Review: has no blockhash/payer; flattened compressInstructionSet` at 185)
From the report
Evidence: signAllTransactions: agent.wallet.signAllTransactions, / agent.wallet.signTransaction,
with the built-in keypair wallet, signing throws because this is undefined. The same happens in the Tensor trade and NFT utilities.
pass arrow wrappers.
packages/core/src/types/wallet.ts:187From the report
Evidence: const signedTransaction = await agent.wallet.signTransaction(transaction); ... return sendTx(agent, ...), and in send_tx.ts:66 a signed transaction is posted to the fee service.
wallets prompt twice, and valid signed transactions leave the process.
sign once, and estimate fees from unsigned messages.
packages/core/src/types/wallet.ts:149From the report
Evidence: instructionsOrTransaction instanceof Transaction || instructionsOrTransaction instanceof VersionedTransaction, then signAndSendTransaction(instructionsOrTransaction)
required extra signatures, for example in Tensor trades, are silently dropped.
apply the extra signers on every branch.
From the report
Evidence: const signature = await agent.connection.sendTransaction(signedTx, {
a sign-only agent still broadcasts the checkout payment, the task payment (create_gibwork_task.ts:62) and cross-chain swaps.
send through the shared helper that enforces sign-only mode.
Review: earlier row 63 graded the whole class HIGH
From the report
Evidence: transaction: bs58.encode(transaction.serialize()),
an empty, unsigned transaction fails serialization. Creating the recipient account unconditionally also fails when it already exists.
serialize without signature verification after adding instructions, and use idempotent account creation.
Review: ` of an empty unsigned tx at 126; non-idempotent ATA create at 147)
From the report
Evidence: transactionIndex: input.transactionIndex.toString(), with the schema field z.number().optional()
with the documented default, a completed approval is reported as an error and may be retried.
use optional chaining, and return the resolved index.
Review: on an optional field, after multisig_approve_proposal` ran)
From the report
Evidence: getAssociatedTokenAddressSync(agent.wallet.publicKey, TOKENS.USDC,)
the USDC payment account is wrong, so registration cannot pay.
call it with (TOKENS.USDC, agent.wallet.publicKey).
Review: `)
From the report
Evidence: for (const tld of tlds) { const domains = await getAllDomains(agent.connection, new PublicKey("namesLP..."));
the same full scan runs once per suffix, and every name is labelled with every suffix.
query per suffix correctly, or run the scan once.
From the report
Evidence: const { feedAddress, crossbarUrl } = input; while the schema defines feed.
the feed is always undefined and the action always fails.
read feed.
From the report
Evidence: result: getTokenPriceData(agent, input.tokenAddresses),
the result serializes as {}, and a rejection escapes the error handling.
add await.
Review: without await` inside try)
From the report
Evidence: result: await getTopGainers(input.duration),
the duration lands in the agent parameter, and the call always fails.
call getTopGainers(agent, input.duration).
Review: ; with the string in the agent slot agent.config?.COINGECKO_PRO_API_KEY` is undefined, so it always throws)
From the report
Evidence: handler: async (input: Record<string, any>) => {
the input is read from the agent object, so the account and instruction parsing actions always fail.
use async (_agent, input).
Review: ` in parseAccount.ts:39 and parseInstruction.ts:39)
From the report
Evidence: const API_KEY = "lv2_..."; (a production API key; only the first 4 characters are shown)
every user shares one published key, and it cannot be rotated without a release.
remove and rotate it, and read the key from configuration.
From the report
Evidence: const marketKeypair: Keypair = Keypair.generate(); ... return [await signOrSendTX(agent, tx), marketKeypair.publicKey.toBase58()];
account creation fails signature verification.
pass [marketKeypair] as an extra signer.
From the report
Evidence: input.token_a_amount, while the schema defines tokenAamount.
the amounts become NaN, and the pool request is sent with null amounts.
align the key names.
From the report
Evidence: const marketId = new PublicKey(input.marketId); / const startTime = new BN(input.startTime);
the action always throws.
add marketId, read openTime, and scale the amounts by the token decimals.
Review: ` throws)
From the report
Evidence: const configId = new PublicKey(input.configId);
the action always throws.
add the field to the schema and validate it.
From the report
Evidence: const tokenAMint = new PublicKey(input.tokenAMint); while the schema defines tokenAAddress, and amounts described "in lamport units" are multiplied by 10 ** decimals again.
the action always throws, and once that is fixed the deposits would be far too large.
align the names and use one unit per field.
From the report
Evidence: const activationType = input.activationType ?? 1;
the pool is misconfigured, and an activation point of 0 is dropped.
map the string to the library's enum, and check !== undefined.
From the report
Evidence: try { await driftClient.connection.getAccountInfo(...); } catch (e) { if (e.message.includes("Account not found")) { shouldCreateAccount = true;
the call returns null rather than throwing, so the account is never initialized and the stake fails.
check for null.
From the report
Evidence: handleRate: z.number().optional(), while the handler reads input.hurdleRate.
the hurdle rate can never be updated.
rename the field.
From the report
Evidence: redeemPeriod: new BN(params.redeemPeriod * 86400), / managementFee: new BN(params.managementFee)
2.5% becomes 2% and 0.1 becomes 0, written on chain. The period is documented in seconds but computed as days.
convert with explicit rounding, and make the documentation match the units.
Review: truncates, redeemPeriod * 86400` against docstring "in seconds" at line 114)
From the report
Evidence: params.amount / convertToNumber(baseAssetPrice.price, PRICE_PRECISION)
a request for "50 SOL" opens a position of about $50.
align the unit, and add a worst-price limit to market orders.
From the report
Evidence: depositTokenAmount * Math.pow(10, mintAAccount.decimals)
the deposit is far too large, or the call throws.
use one unit and decimal-safe conversion.
From the report
Evidence: feeTier: z.number().refine((val) => val in FEE_TIERS, ...).describe("... (e.g., 0.3 for 0.3%)")
the documented value is rejected.
use basis points in both the description and the example.
From the report
Evidence: const txPayload = await txBuilder[0].build();
positions can be left partly closed or unclaimed.
send every builder in order.
From the report
Evidence: const txs = await Promise.all(transactions.map(async (tx) => {
later steps can land first and fail, leaving funded, half-created accounts.
send sequentially with confirmation.
packages/adapter-mcp/src/index.ts:43From the report
Evidence: result[key] = isZodOptional(value) ? value.unwrap() : value;
MCP clients must invent values for optional fields.
keep the optional wrapper.
Review: `)
packages/core/src/openai/utils.ts:76From the report
Evidence: case "ZodNullable": ... if (!jsonSchema.enum) { jsonSchema.enum = [""]; }
optional fields become required, and nullable fields accept only the empty string.
emit nullable types and map null back to undefined.
Review: at 123/172; nullable part holds only for optional-and-nullable via the enum: [""]` case at 77-85)
From the report
Evidence: }, [walletAddress, fetchTransactions]);
each response re-triggers a reset fetch that bypasses the rate limit, and "load more" pages are replaced.
key the effect on the wallet address only, and keep transient state in refs.
Low after review (110)
From the report
Evidence: programId: TOKEN_PROGRAM_ID,
Token-2022 balances are missing from the result.
query both token programs and merge the results.
From the report
Evidence: const fromAta = await getAssociatedTokenAddress(splmintAddress, agent.wallet.publicKey); and const mintInfo = await getMint(agent.connection, splmintAddress);
Token-2022 mints fail.
detect the mint's program, pass it everywhere, and use a checked transfer that carries the decimals.
From the report
Evidence: const fromAta = await getAssociatedTokenAddress(mint, agent.wallet.publicKey); and const mintInfo = await getMint(agent.connection, mint);
deposits of Token-2022 tokens fail. The transfer-out tool has the same gap.
resolve the program from the mint account owner and pass it to every helper.
From the report
Evidence: const baseMintInfo = await getMint(agent.connection, baseMint);
Token-2022 mints fail, or are decoded under the wrong assumptions. The same applies to the Raydium CPMM/CLMM and Meteora DLMM tools.
verify that the owner is one of the two token programs and pass it on.
packages/core/src/utils/send_tx.ts:172From the report
Evidence: if (statuses.value[0]) { if (!statuses.value[0].err) { return signature; } and throw new Error("Transaction timeout");
a "processed" transaction can still be dropped, yet it is reported as success. After a timeout the caller has no signature to check and may retry a transfer that lands anyway.
require "confirmed" or "finalized", track lastValidBlockHeight, and include the signature in the timeout error.
From the report
Evidence: const latestBlockhash = await agent.connection.getLatestBlockhash(); await agent.connection.confirmTransaction({ signature, blockhash: latestBlockhash.blockhash,
a failed or expired payment is reported as "success". The confirmation also uses a fresh blockhash instead of the one that was signed.
use the signed blockhash and its height, check value.err, and check apiResponse.ok.
From the report
Evidence: if (result?.value.err) { throw new Error(... reverted!) } ... } catch (error) { ... if (res.status !== 200) { throw error; } return swapRes.signature;
the revert is caught by the same catch block as a timeout. An HTTP 200 from the explorer then turns the revert into success.
treat an on-chain error as final, and use the explorer only for confirmation timeouts. Do not put the serialized transaction into error text.
From the report
Evidence: const transaction = VersionedTransaction.deserialize(swapTransactionBuf); and return await signOrSendTX(agent, transaction);
the same pattern appears in the checkout, task, staking, game, lending, Solayer, Fluxbeam and Lavarage tools. A faulty or compromised vendor could have arbitrary transfers signed.
before signing, decode the transaction and check the fee payer, the program ids and the net debit against the request.
From the report
Evidence: const data = await response.json(); return { webhookURL: data.webhookURL, webhookID: data.webhookID, };
a failed call, including a missing API key sent as api-key=undefined, still returns "success" with undefined ids.
check response.ok and the presence of a webhook id, and validate the key up front.
From the report
Evidence: if (response.ok) { return await response.json(); } return null;
the action prints "successfully verified" when submission failed, and also when a job was merely queued.
throw with the status on failure, and report "job submitted" together with its id.
From the report
Evidence: const data = await response.json(); const parsedData = data.parsed; if (parsedData.length === 0) {
an error response surfaces as a TypeError, and stale prices are returned as current.
check response.ok, reject prices older than a stated bound, and expose the confidence value.
From the report
Evidence: const token = (await response.json()) as JupiterTokenData; and return token;
the action reports success with an error payload.
check response.ok and confirm that the returned address matches the requested mint.
From the report
Evidence: } else { return "failed"; }
the action wraps "failed" as status: "success". The bet is not confirmed before the outcome call, and the prize claim is sent fire-and-forget.
throw on failure, confirm each transaction, and build follow-up URLs with new URL(href, base) after checking the origin.
From the report
Evidence: price: hermesPriceOracle, emaPrice: hermesEmaOracle, isStale: false,
a stale or wide-confidence price sizes a real leveraged position.
compute staleness from publish_time, reject wide confidence intervals, and remove the unused extra fetch.
From the report
Evidence: const res = await fetch(url); const data = await res.json(); return data;
rate-limit and auth errors reach the model as data, or as opaque TypeErrors. The same pattern is in the other CoinGecko tools, the OtterSec status tools, Messari, the Jupiter quote and swap calls, Lulo, deBridge status, and the domain lookup that returns null on any error.
check the status and throw a descriptive error, preferably through one shared helper.
From the report
Evidence: price: input.price || 0, and sellerFee: input.sellerFeeBasisPoints || 0,
if the model omits the price, the asset can be listed for free.
require the price for single items and reject the call when it is missing.
From the report
Evidence: tokenParams.decimals = tokenParams.decimals || 6;
an explicit 0 decimals, which the schema allows, launches a token with the wrong decimals. Supply has the same problem, and the code also mutates the caller's object.
use ?? and work on a copy.
From the report
Evidence: ...(params.affiliateFeePercent && { affiliateFeePercent: ...
a value of 0 for slippage, a fee or a reward is silently omitted.
use !== undefined checks.
From the report
Evidence: throw new Error(\Transfer failed: ${error}\);
approve, reject and execute all say "Transfer failed". Elsewhere:
- an insurance-fund stake says "Failed to get APYs";
- a Lulo withdrawal says "Lending failed";
- Magic Eden passes
e.messageas a secondErrorargument, so it is lost; - Orca prints
JSON.stringify(error), which shows{}.
use operation-specific messages that include error.message.
From the report
Evidence: https://worker.jup.ag/blinks/swap/So1111.../jupSoLaHX.../${amount}
the endpoint can change without notice, and the response status is not checked.
use a supported API, check the response, and gate the feature behind configuration.
From the report
Evidence: import { ... Clipboard, ... } from 'react-native'; and Clipboard.setString(walletAddress);
tapping to copy throws at runtime.
use the expo-clipboard package, which is already a dependency, with error feedback.
From the report
Evidence: const operationTimer = setTimeout(() => { ... const secondTimer = setTimeout(() => { and return () => clearTimeout(secondTimer);
the cleanups returned from the timer callbacks do nothing. Timers and the in-flight model or tool run outlive the screen.
keep the timer ids in a ref, clear them in finally and on unmount, and pass an abort signal to the model call.
From the report
Evidence: ]).start(() => { animateDots();
stopping the animation triggers the callback, which starts it again, so it keeps running after the indicator unmounts.
restart only when finished is true, or use Animated.loop.
From the report
Evidence: setChats(fetchedChats); setFilteredChats(fetchedChats); and }, [loadChats, loading, refreshing])
the user loses the active search and selection, and every load triggers a second load.
derive the filtered list from the chats plus the search text, keep the selection, and key the focus effect on loadChats only.
examples/embedded-wallets/privy-sak-react-native/android/app/src/main/res/values/colors.xml:2From the report
Evidence: <color name="splashscreen_background">#FFFFFF</color> and in styles.xml: <item name="android:statusBarColor">#ffffff</item>
every cold start flashes white before the dark interface appears.
match the launch and window colours to the dark theme, or follow night mode.
From the report
Evidence: setChats(prev => prev.filter(...)); setFilteredChats(prev => prev.filter(...));
every mutation must touch both arrays, and the reload path already lets them diverge.
keep one source list and compute the filtered view from it.
From the report
Evidence: flatListRef.current?.scrollToEnd({ animated: true });
opening an existing chat scrolls slowly through all of it.
jump without animation on the first load, and animate only for newly appended messages.
From the report
Evidence: position: 'absolute', bottom: 20, left: 20, right: 20, zIndex: 1000,
typing is blocked for 5 seconds.
anchor the toast above the input row or at the top of the screen.
From the report
Evidence: <TouchableOpacity onPress={() => handleSearch('')}> <Ionicons name="close-circle" size={20}
several controls are well under 48 dp. A single tap on an unlabelled icon logs the user out without confirmation.
add padding or hitSlop, a logout confirmation, and accessibility labels.
examples/embedded-wallets/privy-sak-react-native/android/app/src/main/res/values/styles.xml:7From the report
Evidence: <item name="android:statusBarColor">#ffffff</item> and <item name="android:textColor">@android:color/black</item>
nothing adapts to dark mode, and values-night is empty.
reference theme attributes and supply night overrides.
From the report
Evidence: colors={isUser ? ['#32D4DE', '#2AABB3'] : ['#2A2A2A', '#303030']}
the theme provider is never consumed, so colours drift between screens.
use the theme tokens everywhere and delete the unused parallel palettes.
From the report
Evidence: const { width } = Dimensions.get('window'); and const tabBarHeight = Platform.OS === 'ios' ? 90 : 70;
split screen, foldables and the system navigation inset are not handled.
use useWindowDimensions and the safe-area insets.
From the report
Evidence: "react-native": "0.76.9", with "@react-native/babel-preset": "0.77.0",
mismatched toolchain packages cause hard-to-trace build problems.
pin the @react-native/* packages to the React Native version.
packages/core/src/utils/send_tx.ts:160From the report
Evidence: while (Date.now() - startTime < timeoutMs) { ... setTimeout(resolve, remainingTime)
the loop adds load and latency where a native confirmation mechanism exists.
use confirmTransaction with the blockhash and height, and keep re-broadcast as a bounded fallback.
packages/core/src/agent/index.ts:81From the report
Evidence: plugin.initialize(this as SolanaAgentKit); ... throw new Error(\Method ${methodName} already exists in methods\);
a name collision part-way through leaves a half-registered plugin that can never be added again.
validate all names first, then register methods, actions and the plugin together.
From the report
Evidence: handler: async (_agent, input) => { ... const result = await createCollection({}, collectionOpts);
the SDK runs with empty store options, under whatever identity it falls back to, and the network flag is not passed for collections.
build the options from the agent and isMainnet, or reject the action.
From the report
Evidence: managementFee: params.managementFee ? new BN(params.managementFee)... : null,
setting a fee, profit share, hurdle rate, redeem period or minimum deposit to 0 is silently skipped, and the call reports success.
test !== undefined for each field.
packages/plugin-token/src/index.ts:152From the report
Evidence: if (typeof method === "function") { this.methods[methodName] = method; }
every plugin's initializer assigns each method to itself, and its comment wrongly claims agent binding happens there.
remove the loop, or implement the intended binding.
From the report
Evidence: export async function signAndSendTransactions(connection: Connection, transactions: VersionedTransaction[], signer: Keypair,
this unused sender skips preflight and confirmation. Other examples:
- an unreachable account-creation branch in the compressed airdrop;
- an unused blockhash fetch in the transfer tool;
- a random keypair exported at import time in the Orca utilities.
delete them.
From the report
Evidence: const response = await fetch("https://lite-api.jup.ag/tokens/v2/tag?query=verified");
wasted bandwidth and latency on every lookup.
use the server's search, or cache the list with a time limit.
From the report
Evidence: agent.config?.ALLORA_API_KEY || "UP-d..." (an API key literal, also in get_all_topics.ts and get_inference_by_topic_id.ts)
every user shares one embedded key. An unconfigured deployment silently returns testnet predictions that look like real signals.
remove and rotate the key, and require the key and network to be configured.
From the report
Evidence: "X-API-KEY": apiKey || "", ... return { status: "pending", success: false, error: error.message };
a configuration or auth error looks like an order that is still pending.
fail clearly when the key is missing, and do not map errors to "pending".
From the report
Evidence: "https://staging-sor-api-...run.app",
without configuration, trade requests go to a staging service. A second staging default sits in getPositions.ts.
default to production, or fail when the setting is missing.
From the report
Evidence: "x-api-key": process.env.FLEXLEND_API_KEY!,
misconfiguration surfaces as an opaque remote auth error. The OKX tools default all four credentials to empty strings.
validate the configuration once, with a clear error.
From the report
Evidence: pinataGateway: agent.config.PINATA_GATEWAY || "example-gateway.mypinata.cloud",
the placeholder masks a missing setting.
require the setting, or omit the option.
From the report
Evidence: leverage: z.number().positive().default(2000).describe("Leverage in basis points (2000 = 2x)"), while the constants say 10000 = x1
the model asks for 2x and gets 0.2x. The success message uses a third scale.
use one scale constant for the default, the description, the message and the examples, and add bounds.
From the report
Evidence: https://voltr.xyz/api/remaining-accounts/deposit-strategy?vault=...
the withdrawal can be built with the wrong accounts, and the remote data is used without a status check.
call the withdraw route, check the status, validate the accounts, and share one helper.
packages/core/src/types/action.ts:7From the report
Evidence: export interface ActionExample {...} export type Handler = ... export interface Action {...}, also declared in types/index.ts
duplicated definitions drift. Token constants with a misspelled field, the adapter capping logic, two Zod object helpers and the referral-wallet logic are also copied.
keep one definition of each and import it.
From the report
Evidence: const chainSlug = agent.config?.ALLORA_NETWORK === "mainnet" ? ChainSlug.MAINNET : ChainSlug.TESTNET;
client construction is repeated per tool for Allora, Squads, Helius, CoinGecko, OKX, Ranger and Drift, and the copies already differ.
write one factory per vendor.
From the report
Evidence: if (!solutiofiClient) { solutiofiClient = new SolutioFi({ apiKey: agent.config?.SOLUTIOFI_API_KEY }); await solutiofiClient.authenticate(); }
concurrent callers can use an unauthenticated client. A failed authentication is cached forever, and other agents' keys are ignored.
cache an authentication promise per API key, and clear it on failure.
From the report
Evidence: const tokenBalances = await Promise.all(removedZeroBalance.map(async (v: any) => { ... await getTokenMetadata(
anyone can airdrop dust tokens to the wallet, which grows the call count and can hit rate limits. One token without metadata fails the whole listing.
batch the metadata reads, cap and paginate, and tolerate per-token failures.
packages/plugin-misc/src/index.ts:216From the report
Evidence: const MiscPlugin = { name: "misc", methods: { getAllDomainsTLDs, ... verify_program }, actions: [ ... ] }
every consumer loads every SDK and every action, and one action is not registered at all. Separately, transaction-sending code lives in the core types module.
export one sub-plugin per vendor, and move runtime code out of types/.
From the report
Evidence: a 1,057-line module holding client bootstrap, accounts, trading, the insurance fund, swaps and market maths.
maintenance is hard and copy-paste drift is likely. The Elfa actions file has the same problem.
split the file by concern.
From the report
Evidence: referralCode: params.referralCode?.toString() ?? "21064",
a hidden default attributes all volume to one referrer.
make it explicit configuration, or omit it.
.github/workflows/build.yml:29From the report
Evidence: - name: Run lint and fix / run: pnpm run lint:fix
lint violations are rewritten in place and the job stays green. No tests run.
run lint (check only) and add a test job.
test/index.ts:65From the report
Evidence: .then(() => console.log("All tests completed successfully!"))
every package declares "test": "jest", but jest is not installed and there is no config or test file. The integration runner prints success without assertions. Many of the broken actions above would have been caught.
add a runner with per-action smoke tests, including validating each example input against its schema.
test/tools/okx_quote.test.ts:21From the report
Evidence: const agent = new SolanaAgentKit(process.env.SOLANA_PRIVATE_KEY!, ...); console.log(..., agent.wallet_address.toString());
these tests cannot compile and give a false sense of coverage.
port them or delete them.
packages/core/src/claude/index.ts:54From the report
Evidence: if (actions.length > 128) { console.warn(...) } and for (const action of actions.slice(0, 127)) {
one more action is dropped than the warning says, and in every copy of the adapter.
put the limit in one shared constant and fix all the copies together.
From the report
Evidence: // @ts-expect-error - Redaxios error type mismatch / error.message
suppressions hide real typing defects across the plugins.
add one shared errorMessage(e: unknown) helper.
From the report
Evidence: import { SolanaAgentKit } from "@packages/core/dist";
the published type declarations reference a path consumers cannot resolve. plugin-nft/src/utils.ts does the same.
import from solana-agent-kit.
From the report
Evidence: import { RANGER_SOR_API_BASE } from "../index";
the import is circular, and these actions also send directly without the shared helper.
move the constants into a constants file and route sends through the shared helper.
From the report
Evidence: export async function fetchAlchemyJson<T>(url: string, init: RequestInit): Promise<T> { exists, but the other vendors use bare fetch(.
status checks, timeouts and key handling drift between modules.
promote one helper and use it everywhere.
packages/core/src/claude/index.ts:56From the report
Evidence: const description = \ ${action.description} Similes: ${action.similes.map(`
the copies already differ in separators, truncation and error handling.
use one shared builder.
test/index.ts:51From the report
Evidence: .use(TokenPlugin) / // .use(NFTPlugin) / .use(DefiPlugin)
no run checks unique names across all plugins. All the actions together exceed the adapter cap, so some are silently dropped.
add a test that registers every plugin and asserts unique names and the action count.
From the report
Evidence: } catch (_e) { failed++; return null; }
the script opens a real position, prints no errors or signatures, and can leave the position open if the close step fails.
print and persist every result and signature, and always attempt the close in finally.
examples/embedded-wallets/privy-sak-react-native/server/controllers/messageController.ts:127From the report
Evidence: const existingMessage = await Message.findOne({ id }); / existingMessage.parts = processedParts;
messages are found by id alone and overwritten without an ownership check, and the id can be an operator object.
query by id and the verified chat, and require the id to be a string.
Review: is not chat-scoped, id` is unique; needs a known id; the chat-ownership check is at line 98)
packages/core/src/utils/send_tx.ts:109From the report
Evidence: fees.sort(...)[Math.floor(fees.length * feeTiers[feeTier])].prioritizationFee
on localnet or a quiet cluster every instruction-path send throws.
handle the empty case and clamp the index.
From the report
Evidence: const feeEstimate: number = data.result.priorityFeeEstimate; ... setComputeUnitPrice({ microLamports: feeEstimate })
an extreme estimate, or the model choosing the "UnsafeMax" level, spends unbounded fees.
clamp the fee to a configured maximum.
From the report
Evidence: vaultIndex: 0,
the derived vault and the vault used in the transaction disagree.
pass the parameter through.
From the report
Evidence: productLocator: amazon:${productLocator} while the action describes Amazon or Shopify products, by ID or URL.
Shopify URLs are submitted as Amazon locators with real funds attached.
support a typed locator, or narrow the description.
From the report
Evidence: clientOrderId: Number(Math.random() * 1000),
ids are fractional and collide quickly. A single-order pattern divides by zero and produces NaN prices.
use integer ids from a counter or a wide random range, and validate prices and quantities.
Review: /(numOrders-1), which is NaN-prone when numOrders` is 1; collisions of random floats are unlikely)
From the report
Evidence: price: z.number().positive().describe("Current price of the asset"),
the slippage bounds offer no protection, and closes pass the raw price with no band at all.
read the price from the oracle and apply slippage in the correct direction.
From the report
Evidence: numberToSafeBN(amount, QUOTE_PRECISION), WithdrawUnit.TOKEN,
assets with 9 decimals are off by a factor of 1000.
use the vault asset's decimals.
From the report
Evidence: } catch (e) { if (e.message.includes("Account does not exist")) { ... } await new Promise((resolve) => setTimeout(resolve, 2000));
RPC errors are masked, an unverified address is returned, and managers get a depositor account they do not need (line 376).
rethrow unexpected errors, await confirmation, and check ownership first.
From the report
Evidence: quotedAmount: z.string(), / priorityFee: z.number(),
neither cost nor slippage is controlled.
bound the fee, and fetch the quote inside the tool.
From the report
Evidence: pubkey: messages.staticAccountKeys[i],
transactions that use lookup tables break.
decompile with the resolved lookup tables.
From the report
Evidence: userWalletAddress, passed from model input.
the swap can be built for a wallet other than the signer.
use the agent wallet's address.
From the report
Evidence: ...(params.affiliateFeeRecipient && { affiliateFeeRecipient: params.affiliateFeeRecipient, }),
injected text can redirect fees.
take integrator parameters from configuration only.
From the report
Evidence: if (agent.connection.rpcEndpoint.includes("mainnet")) {
most custom RPC URLs are rejected or misclassified.
take the cluster from configuration or from the genesis hash.
From the report
Evidence: const lpAmountBN = new BN(lpAmount * 1e6);
the wrong amount is removed.
read the decimals from the LP mint.
From the report
Evidence: if (!tradingAccounts.nftTradingAccountPk || !tradingAccounts.nftReferralAccountPK) { throw new Error(...)
the default configuration cannot trade.
make these accounts optional for the default privilege.
packages/plugin-defi/src/index.ts:79From the report
Evidence: only one Orca action is imported, and no Ranger action. The Ranger handlers take ({ apiKey }: IncreasePositionContext) as a third argument.
features that are documented and shipped are unreachable, and would throw if wired up. The module also imports an undeclared dependency and takes the fee payer from model input.
register them or remove them, read the key from configuration, and use the agent wallet as fee payer.
From the report
Evidence: const positions = await lavaApi(/positions?owner=${wallet}&limit=250);
older positions are reported as not found.
query by address, or paginate.
packages/adapter-mcp/src/index.ts:76From the report
Evidence: const result = await action.handler(solanaAgentKit, params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }
an error status is never flagged as an error, and validation is skipped. The LangChain adapter also bypasses the shared executor.
route both adapters through the executor and set the error flag.
packages/core/src/vercel-ai/index.ts:19From the report
Evidence: tools[index.toString()] = tool({
tool names become "0", "1" and so on, which hurts tool selection, and descriptions are truncated.
key the tools by action name.
packages/core/src/utils/owsWallet.ts:26From the report
Evidence: const { exportWallet } = require("@open-wallet-standard/core") as {
the helper fails for ESM consumers, and the catch block hides the real cause.
use an import or createRequire.
From the report
Evidence: let nameLength = data[offset]; while (nameLength === 0) { offset++; ...
names and symbols are truncated or misaligned.
use the maintained metadata decoder.
From the report
Evidence: Math.min(jitoTipLamports || jitoConfig?.defaultTipLamports, jitoConfig?.maxTipLamports) ... jitoAccount: jitoConfig.jitoAccount,
there is no local cap, the recipient is unchecked, and a missing config crashes the swap.
add a local cap and check the recipient against known tip accounts.
Review: uses the remote cap; jitoConfig.jitoAccount` at 99 throws if config is missing; vendor-trust property)
From the report
Evidence: const token = tokens.find((t) => t.symbol.toLowerCase() === symbol.toLowerCase());
a look-alike token can be swapped.
fail on multiple matches, or require the contract address.
From the report
Evidence: recipient: z.string().min(32, "Invalid recipient address"), while the example omits the recipient.
documented calls fail validation. Other cases:
- the cross-chain swap requires an unused
inputAmount; - the collectible action requires traits;
- the limit-order and Magic Eden examples use other field names.
correct the schemas, and test every example against its schema.
From the report
Evidence: inputAsset: z.object({ mint: z.string(), amount: z.string() }) ... inputAsset as InputAssetStruct,
the SDK receives undefined fields.
align the schema with the target type, and validate percentages.
From the report
Evidence: .sort((a: any, b: any) => (b.fdv || 0) - (a.fdv || 0)); return solanaPairs[0].baseToken.address;
a spoofed pair can redirect later trades.
require liquidity thresholds or a verified list, and confirm with the user.
packages/core/src/utils/send_tx.ts:70From the report
Evidence: const response = await fetch(https://mainnet.helius-rpc.com/?api-key=..., {
a stalled upstream service hangs the agent, across core, misc and DeFi.
use one fetch helper with an abort timeout.
From the report
Evidence: console.error("Error creating Crossmint Amazon order:", error);
request headers can end up in logs, and the rethrown message is generic.
log a redacted status and message, and pass the vendor's reason through.
packages/plugin-token/package.json:61From the report
Evidence: "solana-agent-kit": "2.0.7" in peerDependencies, while core is 2.0.10. Pre-release SDKs: "@drift-labs/sdk": "2.108.0-beta.6".
installs hit peer conflicts and a second copy of the core may be installed. Fund-moving code depends on beta and alpha SDKs.
declare peer ranges and use stable dependencies.
packages/adapter-mcp/package.json:7From the report
Evidence: "module": "dist/index.mjs",
bundlers that read this field cannot resolve the package.
point it at dist/index.js.
package.json:23From the report
Evidence: "version-packages": "changeset version",
the release scripts fail; there is no .changeset folder.
initialize changesets, or document the manual release.
.github/workflows/build.yml:26From the report
Evidence: run: pnpm install --no-frozen-lockfile, with version: 9.4.0 and node-version: "23"
builds are not reproducible and do not match the declared tool versions.
use a frozen lockfile, the pnpm version from the manifest, and an LTS Node.
.lintstagedrc:3From the report
Evidence: "eslint . --ext .ts --fix"
the hook fails or lints the whole repository, and it is not shared because the hook folder is git-ignored.
run the project's linter on staged files only.
From the report
Evidence: error.message.includes("Cannot read properties of undefined (reading 'owner')")
a different runtime or a dependency change turns "not found" into a hard failure.
check the SDK's documented not-found result.
From the report
Evidence: router.post('/user', createOrUpdateUser);
anyone can change any user's name and picture.
authenticate the routes and scope writes to the caller.
Review: ` has no middleware; demo profile data)
From the report
Evidence: ${Date.now()}-${uuidv4()}${path.extname(file.originalname)} and if (allowedMimes.includes(file.mimetype)) {
an HTML file labelled as an image is served from the API origin, which allows stored script injection, and anyone can fill the disk.
authenticate uploads, sniff file types on the server, serve uploads as attachments from another origin, and apply quotas.
From the report
Evidence: let url = ${HELIUS_API_ENDPOINT}/addresses/${walletAddress}/transactions?api-key=${HELIUS_API_KEY};
the key can be extracted and abused.
proxy these calls through the backend, or use a restricted key.
From the report
Evidence: } catch (error) { console.error('Google login error:', error); }
the UI's error alert never fires, and users can start several logins at once.
rethrow or return the result, and track a loading state.
From the report
Evidence: console.error('Error fetching chats:', error); return [];
an outage looks like "No chats yet".
return an error result, and render an error state with a retry action.
From the report
Evidence: navigation.dispatch(CommonActions.navigate({ name: 'ChatHistory', params: { chatDeleted: true,
after deleting a chat, the user stays on the deleted chat.
navigate to the registered tab route, or go back.
From the report
Evidence: const cryptoPattern = /(Bitcoin|Ethereum|Solana|ETH|BTC|SOL).*?(\$[\d,]+\.?\d*)/gi;
transaction results and error explanations are hidden behind the card.
render the full text, and show cards in addition to it.
From the report
Evidence: signingConfig signingConfigs.debug
the release build cannot be distributed and anyone can re-sign it.
use a release signing configuration fed from secrets.
examples/embedded-wallets/privy-sak-react-native/android/app/src/main/AndroidManifest.xml:3From the report
Evidence: <uses-permission android:name="android.permission.RECORD_AUDIO"/> / android:allowBackup="true"
a wallet app with unused audio, overlay and storage permissions has a larger attack surface, and its data can be backed up.
remove the unused permissions, and exclude secrets from backup.
From the report
Evidence: const SERVER_BASE_URL = SERVER_URL || 'http://localhost:3000';, while another file uses port 3001 and one has no fallback.
when the setting is missing, server features break silently on devices.
use one config module that fails fast when the value is missing.
Info after review (6)
examples/embedded-wallets/privy-sak-react-native/android/app/src/main/AndroidManifest.xml:5From the report
Evidence: <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
taps that arrive while another app's overlay covers the screen are accepted on sensitive controls.
remove the permission, and filter obscured touches on login, logout and signing controls.
From the report
Evidence: const poolConfig = PoolConfig.fromIdsByName(marketData.pool, "mainnet-beta",
repeated work for a value that is stable per session.
look it up in the existing module-level map.
From the report
Evidence: const signer = evmWallet.connect(getDefaultProvider(quote.fromToken.chainId));
provider pollers accumulate over time.
reuse one provider per chain, or destroy it after use.
From the report
Evidence: const argsLength = buffer.readUInt32LE(offset); for (let i = 0; i < argsLength; i++) {
the work is driven by input-supplied counts. The order generator in manifest_trade.ts has the same pattern.
validate and cap the input size and the counts.
package.json:24From the report
Evidence: "publish-packages": "turbo run build && changeset publish"
broken entry points and type paths ship unnoticed.
pack each package and import both the ESM and CJS entries before publishing.
From the report
Evidence: console.error(error); throw new Error(\Error canceling limit orders: ${error}\);
one failure produces several unstructured log lines, so log counts are useless as a signal.
log once at the boundary, and throw with { cause }.