Zynk Labs V3

Zynk Labs V3 Smart Contract Audit Report

Share
Share
SolanaSolana
Ed25519 Signature VerificationCross-ChainPausable+2
SolanaSolana
Ed25519 Signature VerificationCross-Chain+3

QuillAudits audited the Zynk Labs V3 smart contracts on Solana between Feb 3, 2026 and Feb 18, 2026. The audit found 13 issues: 5 medium, 5 low, 3 informational, of which 12 resolved and 1 acknowledged.

kyc
KYC VerificationQuillAudits Verified
icon
kyc
Verified ContractsContract Verification Status
icon
kyc
Vigilant SquadQuillAudits Multilayered Audit
icon

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
Feb 3, 2026
IA
Feb 11, 2026
S2
Feb 18, 2026

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.

icon
speedometer
0
50%
60%
70%
90%
100%
99.0%
QUILLAUDITS SCORE
Remediation Score100
Operational Resilience98
Governance & Centralization70
Tests, Coverage & Doc84

Critical

High

Medium

Low

Informational

open00000
acknowledged00001
partially resolved00000
resolved00552
Zynk Labs V3

Zynk Labs V3

Medium Severity Issues

Incomplete Ed25519 Signature Verification — Missing num_signatures and Offset Validation

Resolved
arrow-right
Description

The verify_signature_syscall function checks raw byte data at hardcoded positions within the Ed25519 instruction but never validates the num_signatures header field or the offset/index fields that tell the Ed25519 precompile where to read the pubkey, signature, and message. An Ed25519 instruction can be constructed that passes all of the program's checks while the precompile actually verifies against a completely different public key.

pub fn verify_signature_syscall(
    ix_sysvar_account: &AccountInfo,
    signer_pubkey: &Pubkey,
    msg: String,
    signature: [u8; 64]
) -> Result<()> {
    let ed25519_instruction_result = load_instruction_at_checked(0, ix_sysvar_account);
    // ...
    let data = &ed25519_instruction.data;
    let message: Vec = msg.into_bytes();
    // ❌ Only checks program_id, account count, and total length
    // ❌ Never checks data[0] (num_signatures)
    // ❌ Never checks bytes 2-15 (offset/index fields)
    if ed25519_instruction.program_id != ED25519_ID
        || ed25519_instruction.accounts.len() != 0
        || data.len() != 16 + 32 + 64 + message.len() {
        return Err(ProgramError::InvalidInstructionData.into());
    }
    // Reads data at FIXED positions, assumes offsets point here
    let data_pubkey = &data[16..48];
    let data_signature = &data[48..112];
    let data_message = &data[112..];
    if data_pubkey != &signer_pubkey.to_bytes()
        || data_signature != signature
        || data_message != message {
        return Err(CustomError::InvalidEd25519Message.into());
    }

    Ok(())
}

Recommendation

// Verify num_signatures == 1
require!(data[0] == 1, ProgramError::InvalidInstructionData);


// Verify offsets point to expected positions
let sig_offset = u16::from_le_bytes([data[2], data[3]]);
let sig_ix_idx = u16::from_le_bytes([data[4], data[5]]);
let pk_offset  = u16::from_le_bytes([data[6], data[7]]);
let pk_ix_idx  = u16::from_le_bytes([data[8], data[9]]);
let msg_offset = u16::from_le_bytes([data[10], data[11]]);
let msg_size   = u16::from_le_bytes([data[12], data[13]]);
let msg_ix_idx = u16::from_le_bytes([data[14], data[15]]);


require!(
    pk_offset == 16 && pk_ix_idx == 0xFFFF &&
    sig_offset == 48 && sig_ix_idx == 0xFFFF &&
    msg_offset == 112 && msg_ix_idx == 0xFFFF &&
    msg_size == message.len() as u16,
    ProgramError::InvalidInstructionData
);

Zero-Amount Transfer in pull_and_create_order

Resolved
arrow-right
Description

Unlike create_order which guards with if amount != 0 before transferring (line 481), pull_and_create_order has no zero-amount guard. With amount=0, two zero-amount SPL transfers proceed (PDV->ZOW, ZOW->beneficiary), an OrderTracker is created with amount_in=0, amount_out=0, and the order is immediately closeable since the deficiency check passes (0 >= 0). This creates costless orders that pollute on-chain state and emit misleading events.
// lib.rs:346-430 - pull_and_create_order has no zero-amount check
pub fn pull_and_create_order(..., amount: u64, ...) -> Result<()> {
    // No `require!(amount > 0)` check here
    // Both SPL transfers proceed with amount=0 (no-ops)
    // OrderTracker created with amount_in=0, amount_out=0
}
// Compare with create_order (lib.rs:481) which HAS a guard:
if amount != 0 {
    // ... token transfer only happens for non-zero amounts

Recommendation

// Add at the start of pull_and_create_order:
require!(amount > 0, CustomError::InvalidAmount);

Protocol Initialization is Vulnerable to Front-Running

Resolved
arrow-right
Description

The initialize function doesn’t check who’s calling it - whoever calls it first becomes the Admin:
// initialize (lib.rs:259-273)
pub fn initialize(
    ctx: C>,
    zynk_op_wallet: Pubkey,
    guardian: Pubkey,
    manager: Pubkey,
) -> Result<()> {
    let c>= &mut ctx.accounts.c>;
    c>.admin = ctx.accounts.admin.key(); // Caller becomes admin
    // ...
}

Since the Config PDA uses constant seeds (b"config"), anyone can calculate its address ahead of time. An attacker monitoring for deployment transactions could front-run the legitimate initialization call.

Contract

fff

Recommendation

Restrict initialization to the program’s upgrade authority, put a check in the initialize function that only a specific address i.e ADMIN , can initialize the program.

Duplicate Mutable Accounts Enable Phantom Orders

Resolved
arrow-right
Description

No constraint prevents zow_token_account == beneficiary_token_account in the CreateOrder account struct. When both accounts point to the same SPL token account, the token transfer becomes a self-transfer (no-op in SPL Token), but the OrderTracker still records the full amount_out as a debt obligation. This creates phantom orders with recorded debt but zero actual token movement.


// lib.rs:1082-1094 - No constraint preventing account overlap
#[account(mut,
    constraint = zow_token_account.owner == config.zynk_op_wallet @ CustomError::UnauthorizedSigner,
    constraint = config.whitelisted_token_mints.contains(&zow_token_account.mint) @ CustomError::InvalidTokenMint
)]
pub zow_token_account: Box>,
#[account(mut,
    constraint = beneficiary_token_account.mint == zow_token_account.mint @ CustomError::InvalidTokenMint,
    // MISSING: constraint = beneficiary_token_account.key() != zow_token_account.key()
)]
pub beneficiary_token_account: Box>,

Recommendation

#[account(mut,
    constraint = beneficiary_token_account.mint == zow_token_account.mint @ CustomError::InvalidTokenMint,
    constraint = beneficiary_token_account.key() != zow_token_account.key() @ CustomError::DuplicateAccounts,
)]
pub beneficiary_token_account: Box>,

Delimiter Injection in attest_order Signature Messages

Resolved
arrow-right
Description

The attest_order signed message uses :: delimiters with unvalidated string inputs (origin, proxy_asset, target_chain, proxy_txn). If any input contains ::, different parameter combinations produce identical message bytes, enabling signature reuse across different routing paths. This is a structural cryptographic issue distinct from V1 L-6 (which covers general input length/format validation).


// lib.rs:640 - Delimiter injection via free-form string inputs
let message = format!("{}::{}::{}::{}::{}", DOMAIN_SEPARATOR, origin, proxy_asset, target_chain, proxy_txn);
// Example collision:
// proxy_asset = "0xBridge::relay", target_chain = "0xRecv"
// produces IDENTICAL bytes as:
// proxy_asset = "0xBridge", target_chain = "relay::0xRecv”

Recommendation

Use length-prefixed serialization (e.g., Borsh) or validate inputs don't contain :::
require!(!origin.contains("::") && !proxy_asset.contains("::") &&
         !target_chain.contains("::") && !proxy_txn.contains("::"),
         CustomError::InvalidInput);

Low Severity Issues

Informational Issues

Appendix

Disclaimer

Zynk Labs V3

Zynk Labs V3

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