Cheerful Taffy Dolphin - Zero-Value Operation Bypass in Vault Update Function Enables Economic Manipulation Through Artificial Checkpoint Creation #48
Labels
Sponsor Disputed
The sponsor disputed this issue's validity
Cheerful Taffy Dolphin
Medium
Zero-Value Operation Bypass in Vault Update Function Enables Economic Manipulation Through Artificial Checkpoint Creation
Summary
A critical vulnerability has been identified in Perennial V2's Vault implementation that allows manipulation of core economic mechanisms through zero-value operations. The vulnerability exists in the vault's
_update()
function, which manages deposits, redemptions, and claims. While the function implements checks for minimum deposits and single-sided operations, it fails to properly validate zero-value state transitions. This oversight allows an attacker to influence share price calculations, manipulate loss socialization, and force unnecessary market interactions—all without committing economic value to the system.The severity of this issue is amplified by the vault's role as a core capital management component of the Perennial V2 protocol, directly affecting user funds and protocol stability. The primary risk lies in the manipulation of profit distribution and performance metrics, potentially impacting all vault participants through degraded price discovery and increased operational costs.
The
_update()
function's validation sequence creates a critical flaw in the vault's economic safeguards by failing to properly validate zero-value operations:https://github.com/sherlock-audit/2025-01-perennial-v2-4-update/blob/main/perennial-v2/packages/vault/contracts/Vault.sol#L331
This validation structure allows zero-value operations to trigger legitimate state changes in both global and local contexts:
Each artificial state change cascades through the system, affecting profit calculations via the checkpoint mechanism:
The impact amplifies when these state changes trigger unnecessary position adjustments:
Attack Surface
The primary attack vector exploits checkpoint creation through zero-value operations to manipulate share pricing and profit distribution:
An attacker can front-run legitimate deposits by creating artificial checkpoints that affect the profit calculation mechanism.
This manipulation affects both immediate share price calculations and long-term performance metrics through the high-water mark system. By strategically timing zero-value operations during price volatility, attackers can influence profit distribution and performance fee calculations.
Artificial state changes affect loss socialization calculations:
By submitting zero-value operations during high volatility, attackers can force recalculation of the socialization ratio. The denominator (context.global.assets) becomes vulnerable to manipulation through pending claims, affecting loss distribution across all vault participants.
Market Position Griefing:
Attackers can front-run significant market updates with zero-value operations that trigger unnecessary rebalancing. This causes:
The vulnerability stems from a fundamental architectural flaw in the vault's state transition model. By placing economic validity checks after state transition logic, the system fails to distinguish between meaningful and artificial state changes. This architectural weakness transforms zero-value operations from administrative actions into vectors for economic exploitation.
These design flaws allow an attacker to systematically degrade the vault's economic integrity through targeted zero-value operations, affecting share price discovery, loss socialization, and market position management.
Fix
This fix prevents artificial checkpoint creation and ensures all operations have economic substance before affecting vault state.
The text was updated successfully, but these errors were encountered: