Zynk Labs-Solana V2

Zynk Labs-Solana V2 Smart Contract Audit Report

Share
Share
SolanaSolana
EscrowTimed Token Transfer
SolanaSolana
EscrowTimed Token Transfer

QuillAudits audited the Zynk Labs-Solana V2 smart contracts on Solana between Jul 10, 2025 and Jul 28, 2025. The audit found 6 issues: 3 medium, 2 low, 1 informational, of which 6 resolved and 0 acknowledged.

Project Description

The Zynk Protocol is a Solana-based smart contract that facilitates token transfers between different parties through a managed operator system. It implements a sophisticated architecture with timelock mechanisms, signature verification, and order tracking capabilities.

Timeline

S1
Jul 10, 2025
S2
Jul 28, 2025

Scope of Audit

The scope of this Audit was to analyze the Zynk Labs Smart Contracts for quality, security, and correctness.

Methodology: the QuillAudits smart contract audit process.

speedometer
0
50%
60%
70%
90%
100%
98.3%
AUDIT SCORE
icon

Critical

High

Medium

Low

Informational

open00000
acknowledged00000
partially resolved00000
resolved00321
Zynk Labs-Solana V2

Zynk Labs-Solana V2

Medium Severity Issues

Replenish allows worthless tokens

Resolved
arrow-right
Description

The `replenish` instruction is designed to allow the partner deposit wallet to replenish tokens to the protocol's operator wallet's token account. However, the current implementation does not properly validate the mint of the token accounts involved in the transfer. Specifically, the only constraint on the destination account (`zow_token_account`) is that it is owned by `zynk_op_wallet`:

```rust
#[account(
   mut,
   constraint = zow_token_account.owner == config.zynk_op_wallet @ CustomError::InvalidTokenMint
)]
pub zow_token_account: Box>,
```

On Solana, anyone can create a token account for any mint and set the owner to any address. This means a malicious partner deposit wallet can create a token account for a worthless mint (not the intended protocol mint), set its owner to
`zynk_op_wallet`, and supply it as `zow_token_account`. The same applies to the source account (`pdw_token_account`). The replenish instruction will then transfer worthless tokens and increment `order_tracker.amount_in` as if valid tokens were replenished.

There is no check that the mint of `
pdw_token_account` and `zow_token_account` matches the expected protocol mint or each other. This allows attackers to replenish with arbitrary, valueless tokens, undermining the integrity of the protocol's accounting and token balances.

Contract

lib.rs

Recommendation

- Enforce Mint Validation: Add constraints to ensure both pdw_token_account and zow_token_account
have the same mint and that this mint matches the intended protocol mint. For example

rust #[account( mut, constraint = pdw_token_account.mint == zow_token_account.mint @ CustomError::InvalidTokenMint, constraint = zow_token_account.mint == EXPECTED_PROTOCOL_MINT @ CustomError::InvalidTokenMint, constraint = zow_token_account.owner == config.zynk_op_wallet @ CustomError::InvalidTokenMint )] pub zow_token_account: Box>,

Where EXPECTED_PROTOCOL_MINT is a constant or a field in your config/account that stores the correct mint address.- Validate in Instruction Logic: In addition to account constraints, validate the mint addresses in the instruction logic before performing the transfer and updating order_tracker.amount_in.

Guardian Initialization can be frontran

Resolved
arrow-right
Description

The protocol’s Config struct includes a guardian field, which is critical for security-sensitive operations such as pausing the contract and bypassing timelocks. However, the initialize function does not set the guardian field during deployment, leaving it as Pubkey::default(). The set_guardian function is then used to assign the guardian, but it currently allows any account to call it as long as the guardian is unset. This creates a frontrunning vulnerability: any user can race to set themselves as guardian before the intended admin, potentially taking control of privileged actions

Contract

lib.rs

Recommendation

- Set Guardian During Initialization: Add a guardian parameter to the initialize function and set it at deployment, removing the need for a separate assignment.- Restrict Access to set_guardian: If post-deployment assignment is required, restrict set_guardian so only the admin can call it

rust pub fn set_guardian(ctx: Context) -> Result<()> { let config = &mut ctx.accounts.config; require!(config.guardian == Pubkey::default(), CustomError::AlreadyExecuted); require!(ctx.accounts.authority.key == config.admin, CustomError::UnauthorizedAdmin); config.guardian = ctx.accounts.authority.key(); Ok(()) }

Unpause Execution Does Not Verify Timelock Action Type

Resolved
arrow-right
Description

The execute_unpause function does not verify that the timelock request being executed is actually an "Unpause" action. It only checks the execution status and timing/ack conditions, but does not enforce that req.action corresponds to the TimelockAction::Unpause variant.

Recommendation

Add a check to ensure that req.action is equal to the value for TimelockAction::Unpause before proceeding with the unpause logic. For example:

// ...existing code...
let action: TimelockAction = req.action.try_into()?;
require!(action == TimelockAction::Unpause, CustomError::InvalidAction);
// ...existing code..

Low Severity Issues

Informational Issues

Appendix

Disclaimer

Zynk Labs-Solana V2

Zynk Labs-Solana V2

Medium Severity Issues
Low Severity Issues
Informational Issues
Appendix
Disclaimer
View Report PDF

Get an Audit done today for your Smart Contract

Join 1500+ leaders who secured themselves from losing Billion Dollars

cta-banner
cta-banner-bgcta-banner-bg-mobile

Related audits

WE SECURE EVERYTHING YOU BUILD.

From day-zero risk mapping to exchange-ready audits, QuillAudits helps projects grow with confidence. Smart contracts, dApps, infrastructure, compliance: secured end to end.

QuillAudits Logo


ISO 27001Circle Alliance Program
Uniswap FoundationAethiropt-collectivePolygon SPNBNB Chain Kickstart

All Rights Reserved. © 2026. QuillAudits - LLC