Part of CertiK’s series
CertiK reviewed SquidGrow (SilentSwap - Privacy Cross Chain Aggregator Phase) on 23 Aug 2024: 7 findings, 0 critical; none marked fixed.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 0 | 0 |
| Medium | 1 | 0 | 0 |
| Low | 6 | 0 | 0 |
The swap function can take an unusually long time to complete. In the cryptocurrency ecosystem, where asset prices can fluctuate wildly within short periods, this delay can significantly impact the estimated value of a swap. The longer execution time might cause the final swap value to differ markedly from the initially quoted value, leading to potential losses for the user.
The Cross-Site WebSocket Hijacking involves a Cross-Site Request Forgery (CSRF) vulnerability on a WebSocket handshake. WebSockets are not constrained by the same-origin policy, allowing an attacker to initiate a WebSocket request from a malicious webpage targeting the `wss://` endpoint of the target URL. Since this request is a regular HTTPS request, browsers send cookies and HTTP-Authentication headers along, even cross-site. During testing, only the `quote` action could be executed because the backend performs multiple checks on the rest of the actions that prevent the exploitation of this vulnerability.
The codebase contains if statements with two or more subsequent branches have duplicated code. This redundancy increases code complexity and introduces unnecessary processing. - `packages/server/src/osmosis/osmosis-concentrated-liquidity-pool.ts:82,86,90` ```typescript=80 if(e_quote instanceof Error) { // ignore not enough liquidity errors if(/[nN]ot enough (quoted|ticks|liquidity)/.test(e_quote.message)) { return 0n; } // ignore spot price errors else if(/[sS]pot price can't be/.test(e_quote.message)) { return 0n; } // negative fee charge else if(/[fF]ee charge should be non-negative/.test(e_quote.message)) { return 0n; } ``` - `packages/server/src/shade/shade-stableswap-pool.ts:64,67,70` ```typescript=61 if(e_calculate instanceof Error) { const s_msg = e_calculate.message; if(/slippage/.test(s_msg)) { return YG_ZERO; } else if(/[tT]rade size must be positive/.test(s_msg)) { return YG_ZERO; } else if(/price impact/.test(s_msg)) { return YG_ZERO; } } ```
**Dependency/Library** Important operations within the application, such as address/wallet generation, transaction signing, and broadcasting transactions to the blockchain, is implemented by calling functions in third-party dependencies listed below. The scope of the penetration test treats out-of-scope libraries as black boxes and assumes their functional correctness. However, in the real world, out-of-scope libraries can contain vulnerabilities, and this may lead to lost or stolen assets. - @blake.regalia/belt - @solar-republic/* - @axelar-network/axelarjs-sdk - @shadeprotocol/shadejs - @osmosis-labs/* - @0xsquid/sdk **On-chain Smart Contract** To swap tokens, the application interacts with Axelar's and CCTP Smart Contracts, and differents Cosmos applications.
SilentSwap application is designed with a focus on maintaining user privacy during token swaps. However, the web application sends both the source and destination addresses to the backend. The centralization of these data could pose a privacy risk for the user. Specifically, due to the sender address. The sender address is used by SilentSwap in the `enforce_aml_blacklist()` function. This function checks the address against the Chainanalysis blacklist and it is called from the `engage()` function in `packages/server/src/flow/engage.ts:82` ```typescript export async function engage(k_user: User, g_req: EngageRequest): Promise<EngageResponse> { ... // validate the send from address if(s_addr_send_from) { // check AML blacklist await enforce_aml_blacklist(g_req.sendFrom=getAddress(s_addr_send_from)); } ... ``` The sender address is also used to obtain the swap route from the Squid SDK in `packages/server/src/flow/engage-axelar.ts:110`. ```typescript const gc_squid: GetRoute = { fromChain: n_evm_chain_id, fromAddress: s_addr_send_from? getAddress(s_addr_send_from): S_ADDR_EVM_PHONY, fromToken: s_addr_token_source, toChain: si_cosmos_chain, toAddress: sa_reducer, toToken: k_token.denom, fromAmount: g_source.amount, slippage: X_SLIPPAGE_SQUID_PCT, enableExpress: true, }; ``` However, the `fromAddress` parameter is not used in some test files in the Squid repository. For example: - https://github.com/0xsquid/squid-sdk/blob/9ed0d84f12fec1b982721e873b1d39e439e9503b/src/scripts/utils.ts:110 During the tests it was not possible to test the SDK since an `integrationId` is required. In the same file, the sender address is also used at line 444. ```typescript const y_transferred = y_receipt.logs.map(y_log => yi_erc20.parseLog(y_log)) .find(y_desc => 'Transfer' === y_desc?.name && s_addr_send_from === y_desc.args['from']); ``` Although SilentSwap does not store the source address on its server, it could be recorded in server logs, either on SilentSwap's servers or on Squid's servers. This centralization and potential logging of sensitive information could compromise user privacy, although it has been classified as an informative finding since no active storage is performed.
The function `Event.returnValue()` is deprecated. - `packages/client/src/screens/OrderTracking.svelte:112` ```typescript const f_on_unload = (d_event: Event) => { d_event.preventDefault(); d_event.returnValue = true; }; ``` For more information: - https://developer.mozilla.org/en-US/docs/Web/API/Event/returnValue
The result of the "npm audit" command run against repository shows that the application is using outdated libraries with known vulnerabilities. Server package:  Client package:  Shared package: 
The report names a repository or files. Open the report to see its scope.
1,045 projects reviewed · 1,376 reports · latest May 2025
See CertiK’s auditsSomething wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.
Tell us