Only an identity anchored to the deployed program may initialize the vault's permanent authority state.
The answer in 30 seconds
Fair Casino directly engaged Zealynx to review a Solana vault program that held token deposits in a Program Derived Address (PDA) and authorized withdrawals through Ed25519 instruction introspection. The reviewed initialize_vault instruction accepted any signer as the initial vault authority. Because the PDA could be initialized only once, the first successful caller—not necessarily the deployer—could permanently choose the authority and withdrawal signer.[1][2]
Zealynx tested initialization as an authority-creation boundary rather than a routine setup call. The report recommended linking the initializer to the current program's upgrade authority through the program and program-data accounts. Fair Casino implemented the change, and the report records the High-severity issue as fixed and verified.[1]
This is a direct Zealynx technical engagement narrative based on public provider-authored evidence, not a customer transformation story. It does not claim exploitation, production deployment, customer sentiment, monetary exposure, or continuing assurance.
The buyer decision: who may create the first authority?
The reviewed Rust program used a PDA-controlled vault, separate vault-authority and withdrawal-signer roles, replay protection, timestamp-based withdrawal expiry, emergency pause controls, and authority-transfer operations. The public report identifies one in-scope file of approximately 280 normalized lines at commit 955864f390f5599bd2fcbc3702fe460dd354efed.[1][2]
For a Solana founder or program lead, the relevant release decision is: what on-chain fact proves that the caller creating permanent vault state is authorized to do so? A transaction signature proves control of the signing key; it does not prove that the signer deployed or governs the program.
The invariant was:
Only an identity anchored to the deployed program may initialize the vault's permanent authority state.
The dangerous assumption: the legitimate team will call first
The vulnerable instruction used Anchor's init constraint to create the vault PDA and wrote the supplied signer into the authority field. The report found no constraint connecting that signer to the program's upgrade authority.[1]
That left authorization to transaction ordering:
- the program is deployed;
- the vault PDA does not yet exist;
- an arbitrary signer calls
initialize_vaultfirst; - the program stores that signer as vault authority and accepts its chosen withdrawal signer;
- the legitimate initialization then fails because the PDA already exists.[1]
The dangerous assumption was that one-time initialization is self-protecting. init prevents a second initialization, but without an identity check it can make an unauthorized first initialization permanent.
How Zealynx tested the initialization invariant
1. Identify every value that becomes authoritative
The review traced the caller-controlled authority and withdrawal-signer inputs into the newly created vault state. It then mapped what those roles could do: pause and resume operations, rotate the withdrawal signer, and transfer authority.[1]
2. Separate account uniqueness from caller authorization
A deterministic PDA constrains which account is created. Anchor's init constraint ensures that creation happens once. Neither property establishes who is entitled to perform that creation, so the review treated PDA derivation, account creation, and signer authorization as separate checks.[1]
3. Model the first transaction after deployment
Instead of beginning from a correctly initialized vault, Zealynx began from the real pre-initialization state. The report modeled another signer reaching initialize_vault before the intended deployer and followed the resulting authority state through the available administrative operations.[1]
4. Anchor authorization to program governance
The recommendation added the program-data and program accounts to the initialization context. The constraints were designed to prove that the initializer matched the program's upgrade authority and that the supplied program data belonged to the current program, rather than another program with a different authority.[1]
The pivotal mechanism: one-time creation amplified a missing check
The failure involved three different properties that are easy to collapse into one:
PDA seeds determine which vault account is created
+
Anchor `init` permits creation only while it is absent
+
caller constraints determine who may create its authority state
The first two properties did not supply the third. Once an unauthorized caller won the initialization race, the same one-time account rule prevented the intended team from replacing that initial state through the normal initialization path.[1]
The reusable lesson is that initialization is privileged state creation. A unique account and a valid signer are necessary controls, but neither is an authorization policy.
Before, intervention, and verified after-state
| Before the review | Zealynx intervention | Verified after-state in the report |
|---|---|---|
Any signer could call initialize_vault while the PDA was absent | Modeled the first post-deployment transaction as an adversarial race | H-01 is recorded as fixed and verified |
| The first caller selected the vault authority and withdrawal signer | Traced those roles into pause, signer-rotation, and authority-transfer powers | Initialization was restricted to the program upgrade authority |
| PDA uniqueness prevented re-initialization but did not authorize the first caller | Separated account identity from caller identity | Program and program-data linkage was added to prevent borrowing another program's authority |
“Fixed and verified” is limited to the remediation recorded in the January 2026 report. The public evidence does not identify a final remediation commit or independently establish production deployment.[1]
A reusable Solana initialization review
Before deploying a program with one-time authority or custody setup:
- List permanent choices: identify every authority, signer, mint, treasury, oracle, and configuration value written during initialization.
- Define the identity proof: state which on-chain identity may initialize and why that identity is authoritative.
- Bind related accounts: verify that program-data, mint, token, and configuration accounts belong to the exact program or asset expected.
- Test the first-caller race: submit initialization from an unrelated signer before the intended transaction and require failure.
- Test replay behavior: confirm a second initialization cannot overwrite valid state.
- Review upgradeability: decide how initialization authorization behaves if the program becomes immutable or its upgrade authority changes.
- Plan recovery deliberately: if a failed or hostile setup can strand state, define a narrowly scoped recovery path before deployment.
- Verify the deployment sequence: treat program deployment and initialization as one operational security ceremony, not unrelated transactions.
Impact and evidence limits
The strongest supported outcome is control-specific: the report documents a High-severity path in which an arbitrary first caller could become vault authority, and it records deployer-bound initialization as fixed and verified.[1]
The wider review reported five findings—one High, one Medium, and three Low—and records all five as fixed.[1][2] Those statuses do not establish that every component, deployment, later version, or operational process is secure.
No public source establishes that an unauthorized initialization occurred, that the reviewed program was deployed, or that a dated amount of assets entered the vault. This narrative makes no claim about funds protected, money saved, avoided loss, customer sentiment, or business impact.
Evidence and attribution
- Canonical technical record: the public Zealynx report identifies Fair Casino, Zealynx's audit role, the reviewed commit and scope, the unrestricted initializer, the first-caller sequence, the recommended program-data constraints, and the verified status.[1]
- Public audit record: Zealynx's engagement page reports the one-file Rust scope, direct audit team, finding distribution, and aggregate remediation state.[2]
- Attribution class: direct Zealynx engagement. The report identifies Zealynx as the independent audit provider and contains no partner-delivery attribution.[1]
- Evidence cutoff: the public report dated January 19, 2026 and the corresponding audit record.
- Limitations: provider-authored evidence supports technical scope and recorded remediation, but not deployment, exploitation, customer sentiment, commercial impact, or later-code security.
Preparing a Solana program for deployment?
Zealynx can test initialization, PDA constraints, signer boundaries, instruction introspection, token-account validation, and authority recovery before permanent state is created. Explore Solana smart contract audits, review the security methodology, or request a deployment-boundary review.
Frequently asked questions
Why did the PDA not prevent the takeover path?
PDA derivation identified the vault account, and init prevented it from being created twice. The missing control was caller authorization: the report found no check proving that the first signer was entitled to assign the vault's authority state.[1]
What identity did the remediation use?
The report recommended requiring the initializer to match the current program's upgrade authority. It also linked the supplied program-data account to the current program so another program's authority could not satisfy the check.[1]
Why is initialization different from an ordinary admin call?
Initialization creates the state that later admin checks trust. If the initial authority is wrong, ordinary has_one or signer checks can consistently enforce the attacker's authority rather than repair it.
Was the issue fixed?
Yes, within the report's evidence boundary. Fair Casino marked H-01 fixed and Zealynx marked it verified. The public evidence does not identify a final remediation commit or prove deployment.[1]
Were all findings fixed?
The report and public audit record list all five findings as fixed. This narrative focuses on H-01 and does not turn the aggregate status into a guarantee about the complete system.[1][2]
How much value did the review protect?
The public evidence supplies no dated, scoped balance for the reviewed vault. No monetary exposure or value-protected claim is supportable from the available record.
Sources
[1] https://raw.githubusercontent.com/ZealynxSecurity/audits/main/web3/2026-01-zealynx-fair-casino-solana.pdf — Fair Casino Solana Vault Program Smart Contract Audit [2] https://zealynx.io/audits/fair-casino/solana-vault-program-q1-2026 — Fair Casino Solana Vault Program audit record