vPOP

vPOP Smart Contract Audit Report

Share
Share
EthereumEthereumBaseBase
DeFiPrediction Market
EthereumEthereumBaseBase
DeFiPrediction Market

QuillAudits audited the vPOP smart contracts on Ethereum and Base between Jun 17, 2025 and Jun 30, 2025. The audit found 10 issues: 2 critical, 1 high, 4 medium, 3 low, of which 7 resolved and 3 acknowledged.

Project Description

VPOP is a prediction market contract that allows users to
create markets around numerical predictions within specified
bounds. The system operates in two phases: a commit phase
where users submit hashed predictions with wagers, and a
reveal phase where they disclose their actual positions.
Winners are determined by proximity to the weighted
consensus position, with a configurable winning percentile
threshold. The contract supports both ETH and ERC20
tokens, implements whitelist functionality via Merkle proofs,
and charges platform, creator, and “ape” fees on wagers.
Markets can be permissioned (owner-only creation) or public,
with optional market creation fees. The consensus
mechanism calculates a weighted average of all revealed
positions, with earlier commits receiving higher weights
based on a decay factor.

Timeline

S1
Jun 17, 2025
IA
Jun 28, 2025
S2
Jun 30, 2025

Scope of Audit

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

Methodology: the QuillAudits smart contract audit process.

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

Critical

High

Medium

Low

Informational

open00000
acknowledged00210
partially resolved00000
resolved21220

Critical Severity Issues

Market Creator Can Steal All User Funds by Manipulating Reveal Duration

Resolved
arrow-right
Description

The VPOP contract contains a critical vulnerability in the market creation and resolution mechanism that allows malicious market creators to steal all user funds by manipulating the reveal duration parameter. When creating a market through the initializeMarket function, creators can set an extremely short _revealDuration (such as 5 seconds) while setting a reasonable _commitDuration to attract users. This creates a scenario where users have sufficient time to commit their wagers during the commitment phase, but an impossibly short window to reveal their commitments.

The vulnerability manifests in the resolve function’s logic, which allows resolution when either all commitments are revealed or the reveal phase has ended. The critical flaw lies in the condition bool revealPhaseEnded = block.timestamp > market.createdAt + market.commitDuration + market.revealDuration combined with the requirement require(allRevealed || revealPhaseEnded, “Market not ready for resolution”). A malicious creator can exploit this by being the only participant who successfully reveals their commitment within the artificially short reveal window, then immediately calling resolve to become the sole winner eligible to claim the entire prize pool through the claim function.

The contract calculates winnings based on the proportion of winning wagers using winnings = Math.mulDiv(commitment.wager, consensus.totalWinnings, consensus.winningWagers). When only the creator’s commitment is revealed and wins, they receive 100% of the totalWinnings, which represents the sum of all user wagers minus fees. This mechanism effectively allows creators to siphon funds from legitimate users who are unable to reveal their commitments due to the manipulated timing.

Contract

contracts/vpop.sol

Recommendation

The primary remediation requires implementing a minimum reveal duration constraint in the initializeMarket function to prevent creators from setting unreasonably short reveal periods.

Market Creators Can Manipulate Reward Distribution Through Improper minWager Setting

Resolved
arrow-right
Description

The vulnerability stems from an incorrect coupling between the market creation parameters and reward distribution logic in the VPOP contract. During market initialization via the initializeMarket function, creators can set _minWager to zero for non-whitelisted markets. This parameter setting improperly triggers equal distribution of rewards in the claim function through the conditional branch if (market.minWager > 0), despite the market not being an actual whitelisted market (which would be properly indicated by whitelistRoots[marketId] != bytes32(0)). The core issue arises from the contract’s assumption that zero minimum wager automatically indicates a whitelisted market, when in reality this should be explicitly verified against the whitelist root hash. This f lawed assumption allows malicious creators to artificially force equal reward distribution regardless of participants’ actual wager amounts, breaking the intended proportional reward mechanism

Contract

contracts/vpop.sol

Recommendation

The solution requires decoupling the reward distribution logic from the minimum wager parameter and properly tying it to the actual whitelist status. The claim function should be modified to explicitly check the whitelist status through the root hash rather than inferring it from the minimum wager. The proportional reward calculation should become the default case, with equal distribution reserved only for properly configured whitelisted markets.

High Severity Issues

Medium Severity Issues

Low Severity Issues

Appendix

Disclaimer

vPOP

vPOP

Critical Severity Issues
High Severity Issues
Medium Severity Issues
Low Severity 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