TrustNet Score
The TrustNet Score evaluates crypto projects based on audit results, security, KYC verification, and social media presence. This score offers a quick, transparent view of a project's credibility, helping users make informed decisions in the Web3 space.
Real-Time Threat Detection
Real-time threat detection, powered by Cyvers.io,
is currently not
activated
for this project.
This advanced feature provides continuous monitoring and instant alerts to safeguard your assets from potential security threats. Real-time detection enhances your project's security by proactively identifying and mitigating risks.
For more information, click here.
Security Assessments
Summary and Final Words
No crucial issues found
The contract does not contain issues of high or medium criticality. This means that no known vulnerabilities were found in the source code.
Ownership is not renounced
The owner retains significant control, which could potentially be used to modify key contract parameters.
Contract is not upgradeable
The contract does not use proxy patterns or other mechanisms to allow future upgrades. Its behavior is locked in its current state.
Scope of Work
This audit encompasses the evaluation of the files listed below, each verified with a SHA-1 Hash. The team referenced above has provided the necessary files for assessment.
The auditing process consists of the following systematic steps:
- Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
- Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
- Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
- Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
- Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
- Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
- Actionable Recommendations: Provide detailed, specific, and actionable steps to secure and optimize the smart contracts.
A file with a different Hash has been intentionally or otherwise modified after the security review. A different Hash may indicate a changed condition or potential vulnerability that was not within the scope of this review.
Final Words
The following provides a concise summary of the audit report, accompanied by insightful comments from the auditor. This overview captures the key findings and observations, offering valuable context and clarity.
Smart Contract Analysis Statement
Contract Analysis
The Flowlex Vault system is a per-user Uniswap V3 liquidity vault made of a factory that deploys one minimal-proxy clone per user and a personal vault that custodies the user's liquidity NFTs and working balances so a server-side keeper can rebalance and compound positions automatically. The design is non-custodial by construction: every path that moves funds out of a vault is restricted to the vault owner, and the keeper can only perform value-neutral work that stays inside the vault. The code is mature, well documented, and supported by a strong existing test suite, and our manual review together with symbolic proofs, fuzzing and invariant testing confirmed that no keeper, admin or external attacker can come to hold a user's funds.
Ownership Privileges
The ownership of the contract has been split between a per-vault owner, who is the end user, and a factory admin, who controls shared configuration. The owner retains full privileges including:
- Depositing funds and opening, claiming, withdrawing and emergency-exiting positions at any time, including while the system is paused.
- Selecting, overriding or fully disabling the keeper for their own vault, with automation off by default until the owner opts in.
- Setting their own policy: maximum keeper slippage, a personal commission ceiling, keeper cooldown, a per-window operation cap, and gates for out-of-range rebalances and keeper closes.
- Sweeping any stray tokens out of the vault to an address of their choosing, with no commission and no third-party authorization.
- The factory admin can pause new deposits and all keeper activity, but cannot block owner exits.
- The factory admin sets commission rates (hard-capped at ten percent per operation), the treasury address, and the default keeper, all of which take effect immediately with no timelock.
- The factory admin cannot change a vault's owner, cannot move funds out of any vault, and cannot push new logic into existing clones.
- Vault ownership is fixed at creation and is not transferable in this version; migration is done by exiting and creating a new vault.
Security Features
The contract implements several positive security features:
- A strict non-custodial perimeter where every fund-exit path is owner-only and the keeper has no function that sends funds to an external address.
- Keeper operations are bounded on-chain by a price-dislocation check against the pool's time-weighted average, a per-operation slippage cap, a cooldown, and a rolling per-window operation cap.
- Reentrancy protection on every mutating entry point, rejection of unsolicited incoming NFTs, disabled initializers on the implementation, and a one-vault-per-user mapping that prevents initialization front-running.
- A per-vault commission ceiling that lets a user cap, in advance, the fee they are willing to pay, so an admin cannot raise fees beyond a user's pre-authorized limit on growth operations, while clean exits always remain possible.
The most material residual risks are operational rather than code defects: a colluding or compromised admin-and-keeper could, against a vault that opted into automation with default settings, bleed bounded value through repeated commissioned rebalances, and a misbehaving treasury could temporarily deny service to growth and keeper operations. Neither breaks the non-custodial guarantee, and both are addressed by the governance hardening - separate keys, a multisig owner and treasury, and a timelock on admin changes - that the team has already scheduled.
Note - This Audit report consists of a security analysis of the Flowlex Vault smart contract system. This analysis did not include economic analysis of the contract's tokenomics. Moreover, we only audited the vault contracts for the Flowlex team. Other contracts associated with the project were not audited by our team. We recommend investors do their own research before investing.
Files and details
Functions
public
/
State variables
public
/
Total lines
of code
/
Capabilities
Hover on items
/
Functions
public
/
State variables
public
/
Total lines
of code
/
Capabilities
Hover on items
/
Functions
public
/
State variables
public
/
Total lines
of code
/
Capabilities
Hover on items
/
Functions
public
/
State variables
public
/
Total lines
of code
/
Capabilities
Hover on items
/
Functions
public
/
State variables
public
/
Total lines
of code
/
Capabilities
Hover on items
/
Functions
public
/
State variables
public
/
Total lines
of code
/
Capabilities
Hover on items
/
Findings and Audit result
medium Issues | 3 findings
Pending
#1 medium Issue
Commission churn enables value extraction from opted-in vaults
Each keeper-eligible growth operation takes a commission on freshly realized token amounts and sends it to the factory treasury. A rebalance closes the whole old position, so the commission basis is the entire position value, not just yield. The cap that protects the user defaults to ten percent at initialize, the out-of-range gate is off by default, and the default window allows ten keeper operations per day. A party that controls both the factory admin (which can raise the commission to ten percent and appoint itself the default keeper) and the keeper can repeatedly rebalance an opted-in, in-range position and route up to ten percent of the realized value to the treasury on each run. The live deployment currently uses one account for owner, treasury and keeper, so a single key compromise is enough. Funds never reach an arbitrary external address and the owner can always exit, but the economic loss to an opted-in user is real.
Pending
#2 medium Issue
Push-based commission can be denied service by a misbehaving treasury
Commission is transferred to the treasury inside every commission-bearing operation. If the treasury cannot receive a token, for example because it is blacklisted on USDC or is a contract that reverts on receipt, those operations revert. The impact is broader than growth and automation: because the commission transfer runs even on the clamped exit path, the owner exits claim and withdraw also revert when commission is non-zero. The only exits that remain reliable under a blocked treasury are emergency NFT withdrawal and sweep, which never take commission, plus claim and withdraw once the owner sets their per-vault commission cap to zero. User funds are therefore never locked, but the set of available exits is narrower than a clamped-commission reading suggests, and growth plus automation are denied service until the admin points the treasury elsewhere.
Pending
#3 medium Issue
Keeper close-then-compound is a churn and value-extraction primitive that bypasses the rebalance gate
Closing a position decreases liquidity and collects proceeds into the vault, charging the withdraw commission on the full realized principal, but does not burn or untrack the now-empty position. Because compound uses the vault's full token balances, a keeper can immediately redeploy those proceeds by increasing liquidity on the still-tracked position. For a vault that opted into keeper close, this creates a close-then-compound churn loop that takes commission on principal each cycle and is not constrained by the out-of-range rebalance gate, since that gate only applies to rebalance. The mitigation proposed for the commission-churn finding (defaulting the out-of-range gate on) therefore does not cover this path. Funds stay inside the vault and the owner can always exit, so this is bounded by the cooldown, window cap, slippage and TWAP gates, but under a compromised or colluding admin-and-keeper it extracts value via commission independently of the rebalance gate. Severity is conditional on the owner having enabled keeper close, which is off by default.
low Issues | 4 findings
Pending
#1 low Issue
Operations use block.timestamp as deadline and swaps have none
All position-manager calls pass the current block timestamp as the deadline, which is always satisfied at execution time and so offers no protection against a transaction being held and mined later. The router swap takes no deadline at all. The practical protection is the caller-supplied minimum-output on swaps and minimum-amounts on the liquidity legs, which for keeper swaps are additionally policy-bounded and TWAP-gated, so a late execution still cannot exceed the accepted slippage. The impact is therefore limited.
Pending
#2 low Issue
Single-step factory ownership transfer
The factory transfers ownership in a single step with only a zero-address check. A mistyped target address would hand admin control to an unrecoverable address. User funds are not at risk because vaults keep working and owners retain full control and open exits, but the admin functions for pause, pool whitelist, commission and keeper would be permanently lost.
Pending
#3 low Issue
TWAP gate fails closed on insufficient observation cardinality
The keeper price-dislocation gate reads a ten-minute observation window from the pool. If the pool's observation ring buffer cannot serve that window, the observation call reverts and the keeper operation reverts. This fail-closed behavior is intentional, but it means any whitelisted pool whose cardinality has not been grown will silently break all keeper automation for vaults using it. There is no fund risk because the owner bypasses the gate and can always operate; the impact is keeper liveness for a misconfigured pool.
Pending
#4 low Issue
Whitelisted pool address is an unauthenticated price oracle
Adding a pool validates only that one side is USDC; it does not verify the address is a genuine Uniswap V3 pool. A malicious or compromised admin could whitelist a contract that mimics the token and fee getters but returns fabricated price and observation data. Because the keeper slippage check and the TWAP-dislocation gate both read this same admin-supplied pool address, a fabricated pool neutralizes both on-chain keeper safety checks at once, not just one of them. This raises it above a pure trust assumption: in the same admin-collusion scenario considered for the commission-churn finding, it removes the keeper's price backstop entirely. The owner can still disable the keeper and exit, which bounds the impact.
optimization Issues | 5 findings
Pending
#1 optimization Issue
Batch repeated factory reads
Several operations make multiple separate external calls to the factory for commission, treasury, pool config, pause and default keeper. Reading more than one of these in the same operation could be batched into a single view to save call overhead.
Pending
#2 optimization Issue
Redundant allowance pre-read in approval reset
The approval reset reads the current allowance before zeroing it. Because the code already uses a force-approve helper, the pre-read is defensive and adds a read that can be removed when the spender is known to consume the full allowance.
Pending
#3 optimization Issue
Redundant event on initialize
Initialize emits both a vault-initialized event and a policy-updated event describing the default policy. The second event duplicates information already implied by initialization and can be removed to save gas.
Pending
#4 optimization Issue
Empty revert in receive
The receive function rejects ETH with an empty revert. A named custom error would make the rejection clearer to integrators at negligible cost.
Pending
#5 optimization Issue
Cache keeper override read
The authorization check calls the effective-keeper helper, which re-reads the keeper override that the surrounding logic may already have available. Caching the value once per call avoids a redundant storage read.
informational Issues | 6 findings
Pending
#1 informational Issue
Spot price is used for slippage and out-of-range checks
The keeper slippage estimate and the out-of-range gate read the manipulable spot price. This is backstopped by the TWAP-dislocation gate, which a same-block flash manipulation cannot move, so pushing spot to weaken these checks also trips the TWAP gate and reverts the operation. The residual point is only that the spot-based checks are themselves approximate.
Pending
#2 informational Issue
TWAP gate conflates basis points with ticks
The deviation threshold compares an absolute tick difference against the user's slippage setting in basis points, treating one tick as roughly one basis point. The two units are only approximately equal. The approximation is conservative for small deviations, but the mixed units should be documented.
Pending
#3 informational Issue
Duplicate interface definitions across modules
The swap router and position manager interfaces are defined in both the lp and vault interface folders. Maintaining two copies of the same interface invites divergence and is a code-quality concern rather than a security one.
Pending
#4 informational Issue
Only standard ERC20 tokens are supported, enforced off-chain
Fee-on-transfer, rebasing and callback-bearing tokens would break the balance-based accounting and must be vetted before a pool is whitelisted. There is no on-chain guard enforcing this; it is a documented operational constraint.
Pending
#5 informational Issue
Reentrancy guard is not the first modifier
On the owner-or-keeper path, the authorization checks and the factory pause read run before the reentrancy guard engages. The external reads target the trusted factory, so the practical risk is negligible, but the conventional ordering puts the reentrancy guard first.
Pending
#6 informational Issue
Non-indexed address parameters in factory events
The treasury-updated and default-keeper-updated events carry an address argument that is not indexed, which makes filtering these events by address harder for indexers and monitoring tools.