Swap Tokens Trending New Tokens Wallets Guides FAQ About

Solana Swap Security: What a Non-Custodial Frontend Can and Cannot Do

A non-custodial swap removes one specific class of risk — custodial loss — and leaves the rest in place. This page states exactly where the boundary is: what the wallet controls, what the frontend controls, what the DEX contracts control, and what a user should verify on their own rather than take on trust. It is written for readers who would rather check the claims than believe them.

The security boundary, in one sentence

SwapKing is a router frontend. It constructs transactions and hands them to the wallet for approval. It does not hold keys, does not hold balances, does not deploy contracts that hold funds, and does not possess the ability to authorize a transfer. Everything a swap can do to a wallet is done by the wallet's own signature, in response to a transaction the user chose to sign. Everything else in the flow — the quote, the route, the fee display, the confirmation message — is either a convenience the user can verify or a dependency that can fail. The boundary is clear, and it is worth being precise about which side of it each guarantee lives on.

What the wallet controls

The wallet holds the private key and is the only party in the flow that can produce a signature. That is the single most important property of a non-custodial swap, and it is worth spelling out what it means in practice. When SwapKing asks the wallet to sign a transaction, the wallet renders that transaction in its own interface before the user approves — the input amount, the minimum output amount, the fee, and the accounts the transaction will touch. The user sees those details before any signature is produced. If the details do not match what the user intended, the correct response is to reject. The wallet is the one place in the flow where a user can catch a mistake before it is permanent.

The wallet also holds the connection itself. A wallet connection can be revoked at any time, and revoking it does not affect tokens that have already been swapped — those tokens are in the wallet's accounts, not in any SwapKing-controlled account. The connection grants two narrow abilities and nothing more: the ability to read the public key, which lets the frontend display balances and fetch token accounts, and the ability to request a signature on a specific transaction. It does not grant the ability to sign without user approval, and it does not grant the ability to spend without a signature. Those are properties of the wallet's design, not of SwapKing's, and they hold regardless of which frontend the wallet is connected to.

What the frontend controls

The frontend chooses which quote to display, which route to build into the transaction, and how the resulting transaction is presented in the interface. Those are consequential choices, and they are the frontend's entire contribution to the swap. A frontend that returns a suboptimal route produces a worse fill than an alternative frontend would. A frontend that constructs a transaction with the wrong minimum output amount produces a transaction that the wallet will show, and that the user can catch before signing. A frontend that displays a stale quote produces a transaction whose expected output differs from the current pool state — and the slippage bound is what protects the user in that case, by causing the transaction to revert if the pool has moved too far.

The frontend is also the layer where a malicious actor would most plausibly attempt an attack — by serving a counterfeit version of the site, or by injecting code that constructs a transaction different from the one described. That is why the three verification checks below are worth the two minutes they take. The frontend's honesty is not something a user should take on faith; it is something that can be checked, and checking it is the difference between a trustless flow and a flow that relies on trust.

What the DEX contracts control

The pools that execute the swap are separate smart contracts, each with its own logic, its own fee tier, and its own history of audits and incidents. The frontend does not audit those contracts, does not endorse them, and does not guarantee their behavior. A pool can contain bugs, can be exploited, can be paused by its operators, or can lose depth to a bank run. When any of those things happens, the transaction may fail, may execute at a worse price than the quote suggested, or may execute correctly but deliver tokens whose value is lower than expected. None of that is something SwapKing can prevent, and none of it is something the frontend's design changes.

The token itself is a separate risk. A token can be counterfeit — a mint address that differs by a few characters from a legitimate one — or legitimate but badly designed, with a transfer tax, a freeze authority, a mint authority that lets the issuer inflate supply, or a supply concentrated among wallets that can dump on the market. Those are properties of the token, not of the swap, and no frontend can remove them. The countermeasure is to verify the mint address against a trusted source before signing, and to understand the token's authorities before buying it.

The three checks a user can run without trusting any claim

Check the wallet's rendering. When the wallet shows the transaction for approval, compare the input amount, the minimum output amount, and the fee against what the swap card displayed. A transaction whose details differ is a transaction to reject. This is the single most effective check available, and it requires no technical knowledge beyond reading the numbers the wallet presents.

Check the on-chain signature. Every confirmed swap leaves a signature on Solana. Paste it into an explorer and the balance delta, the fee paid, and the accounts touched are all visible. A signature whose delta does not match the intended swap is a signature to investigate. This check is definitive: the explorer shows what actually happened, not what any frontend claimed would happen.

Check the JavaScript bundle. The frontend is a static site, and its JavaScript is visible to anyone who opens developer tools. A user with technical literacy can compare the bundle against the behavior described on this page and identify discrepancies. This check is not available to everyone, but it is the strongest check available for users who can perform it — it distinguishes between a frontend that is what it claims to be and one that has been substituted.

What non-custodial architecture removes, and what it does not

It removes custodial risk. There is no exchange balance to freeze, no withdrawal queue to wait through, no platform insolvency that can strand the position, and no customer service request that can be denied. That is a real and specific benefit, and it is the reason many users prefer non-custodial venues. It is worth being honest that it is also the only thing the architecture removes — every other risk in the flow remains.

It does not remove token risk. A token can be counterfeit, fraudulent, badly designed, or concentrated in a small number of wallets. It does not remove contract risk. A pool can be exploited or paused, and no frontend can prevent that. It does not remove wallet risk. A device with malware, a browser extension with excess permissions, or a seed phrase entered into a counterfeit site can compromise the wallet regardless of the frontend being used. It does not remove network risk. Solana can be congested or halted, and a transaction can fail for reasons that have nothing to do with the swap. It does not remove decision risk. A user can sign an amount larger than intended, accept a slippage bound wider than the market warrants, or buy a token whose properties they did not check. Those five categories cover the majority of ways funds are lost on Solana, and none of them is removed by using a non-custodial venue rather than a custodial one.

Third-party dependencies, stated plainly

RPC providers read chain state and broadcast transactions. An unreliable RPC causes latency or failed submissions. A malicious RPC can withhold a transaction or return incorrect state, but it cannot move funds — the signature is already applied and the transaction is either executed or not.

DEX aggregator and venue APIs provide quote and route data. An unreliable aggregator produces a missing or stale quote. A malicious aggregator can return a suboptimal route, which produces a worse fill but not a loss of funds beyond what the route itself costs.

Price feeds provide USD reference values. An unreliable feed produces a stale display. A malicious feed can mislead about the notional size of the trade, but it cannot change the actual transaction.

Hosting and CDN serve the frontend. An unreliable host produces an outage. A malicious host can substitute the frontend, which is why the bundle check above is the most important check for users who can perform it.

The status of the SwapKing-controlled components is on the Status page. The status of the third-party services is published by those services, and this page does not re-report it.

What this page does not claim

This page does not claim that SwapKing is "safe" in any absolute sense. Non-custodial architecture removes custodial loss and does not remove token risk, contract risk, wallet risk, network risk, or decision risk. This page does not claim a specific audit or certification. If an audit is commissioned in the future, the auditor, the scope, and the date will be listed here and on the Status page. This page does not claim that the frontend cannot be compromised — it can, and the bundle check is the mechanism by which a user can detect such a compromise. The honest summary is that non-custodial swap architecture provides a specific and valuable property — the absence of a custodian who can lose, freeze, or deny access to user funds — and does not provide the property of making a swap risk-free.

Reporting a security issue

Write to [email protected] with reproduction steps, the affected URL or Solana route, and any relevant transaction signatures. A report with a timestamp and a signature is substantially more useful than a report without, because the former can be correlated with logs and the latter cannot. Reports are acknowledged on receipt and followed up as quickly as the team's capacity allows.

Related

How Swap Works Methodology Status Avoid Scam Tokens Verify a Contract

Questions Worth Asking About the Boundary

What can SwapKing actually do with a connected wallet?

Two things. It can read the public key, which lets it display the wallet's SOL balance and fetch its token accounts. It can request a signature on a specific, fully-constructed transaction when the user initiates a swap. That is the entire scope. The frontend has no ability to sign on its own, no ability to move funds without the wallet's signature, and no ability to freeze or reverse anything on-chain. The distinction matters because "connected wallet" is often treated as a binary state in informal discussion, when the actual grant is narrow: a public key and a per-transaction signature request, both of which the wallet can refuse or the user can revoke.

Does SwapKing request token approvals?

No. Solana's SPL token model does not use the approve-and-transferFrom pattern that ERC-20 tokens on Ethereum use. Each Solana swap is a single transaction that atomically transfers the input token into a pool and the output token out of it. There is no "unlimited approval" to grant, because there is no delegate authority that persists between transactions. If a wallet interface ever shows an approval prompt that looks like an ERC-20 approval while using SwapKing, that prompt is coming from a different source — a malicious site, a malicious browser extension, or a wallet misconfiguration — and the correct response is to reject and investigate before signing.

What risks remain after a wallet is connected and a swap is signed?

Several. The DEX pool contracts that execute the swap can contain bugs, be exploited, or be paused by their operators. The token being bought can be a counterfeit with a similar name, or a legitimate token with a freeze authority, a transfer tax, or a mint authority that lets the issuer change supply after purchase. The wallet itself can be compromised by malware on the device. The RPC endpoint that broadcasts the transaction can be malicious or unreliable, and while it cannot move funds, it can withhold the transaction or return incorrect state. The Solana network can be congested or halted. The user can make a decision error in the transaction, such as signing an amount larger than intended or accepting a slippage bound wider than the market move warrants. Non-custodial architecture removes custodial loss, not any of these.

Can SwapKing freeze or reverse a swap after it confirms?

No, and neither can any other frontend. A confirmed Solana transaction is executed by validators and recorded in the ledger. No frontend, aggregator, or DEX can reverse it. The only party that can freeze a balance is the issuer of a token that carries a freeze authority in its contract — Circle for USDC, Tether for USDT — and even that freeze is scoped to specific token accounts, not to the wallet, and cannot reverse an already-confirmed swap. If a swap was signed at the wrong price, at the wrong amount, or into the wrong token, the record stands.

What does "non-custodial" actually remove from the risk profile?

It removes custodial risk, in the narrow and specific sense: no third party holds the tokens between the user and the pool. There is no exchange balance to be frozen, no withdrawal queue to wait through, no platform insolvency that can strand the position, and no customer service request that can be denied. What it does not remove: token risk (a token can be counterfeit, fraudulent, or badly designed), contract risk (a pool can be exploited), wallet risk (a device can be compromised), network risk (Solana can be congested), and decision risk (a user can sign a transaction they should not have). Those five categories cover the majority of ways a user actually loses funds on Solana, and none of them are removed by switching from a custodial venue to a non-custodial one.

What third-party services does the swap actually depend on?

Four categories, each with a distinct failure profile. RPC providers read chain state and broadcast transactions — an unreliable RPC causes latency, a malicious RPC can withhold a transaction but cannot move funds. DEX aggregator and venue APIs provide quotes and route data — an unreliable aggregator causes missing or stale quotes, a malicious one can return a suboptimal route but cannot sign. Price feeds provide USD reference values — an unreliable feed causes a stale display, a malicious one can mislead on the notional size of the trade. Hosting and CDN serve the frontend itself — an unreliable host causes an outage, a malicious host can substitute the frontend. The status of the SwapKing-controlled components is on the Status page; the status of the third-party services is published by those services.

How would a user verify that SwapKing is behaving correctly?

Three checks are available without trusting any claim on this page. First, the wallet renders the transaction before signing, including the input amount, the minimum received, and the fee — a transaction whose details differ from what the quote panel showed is a transaction to reject. Second, every confirmed swap leaves a signature on Solana, and the signature can be inspected on an explorer to see the exact balance delta and accounts touched — a signature that does not match the intended swap is a signature to investigate. Third, the frontend is a static site with a small JavaScript bundle, and the bundle is publicly visible to anyone who opens developer tools — a bundle that does not match the behavior described on this page is evidence of tampering. None of these checks requires trusting SwapKing; all of them require some technical literacy.

Is SwapKing audited?

SwapKing is a router frontend and does not deploy smart contracts that hold user funds. There is no contract to audit. What can be audited is the frontend's JavaScript, and no such audit is currently published. If one is commissioned in the future, the auditor, the scope, and the date will be listed on this page and on the Status page. In the absence of a published audit, users who want assurance should rely on the three verification checks described above — the wallet's rendering, the on-chain signature, and the visible JavaScript bundle — rather than on any claim of safety in the abstract.

What is the most common real-world attack against a Solana swap user?

Phishing, by a wide margin. The most frequent pattern is a counterfeit frontend at a lookalike URL that asks the user to connect a wallet and then requests a signature on a transaction that transfers funds to an attacker-controlled address, or that grants ongoing authority the legitimate frontend would never request. The second most common is a counterfeit token with a ticker identical to a well-known one and a mint address that differs by a few characters. The third is a compromised wallet extension or a malicious extension granted permissions it should not have. None of these are vulnerabilities in the frontend being used; they are attacks on the user's ability to verify what they are signing. The countermeasures are the same as for any non-custodial venue: check the URL, verify the mint, read the transaction before signing, and revoke permissions periodically.