The AaveDIVAWrapperCore
contract allows users to create contingent pools via the _createContingentPool
function. However, inadequate validation of the provided PoolParams
introduces risks of protocol misconfiguration, economic exploitation, and financial instability. Attackers can exploit this flaw to manipulate pools, causing instant liquidation, unauthorized claims, or locked collateral, undermining the protocol’s economic integrity and user trust.
The _createContingentPool
function lacks sufficient validation for critical pool parameters such as:
Expiry Dates: Pools can be created with expiry dates set in the past or excessively far in the future.
Strike Prices: Strike prices can be set to economically unrealistic values, creating arbitrage opportunities.
Collateral Ratios: Collateral ratios can be configured too low (causing immediate liquidation) or too high (locking excess collateral).
Code Reference:
No Checks on Expiry Time: expiryTime
is not validated to ensure it is in the future or within a reasonable range.
No Checks on Strike Prices or Collateral Ratios: Parameters like inflection
, cap
, and gradient
are not validated for economic realism.
An attacker creates a pool with an expiry date set to the current block or a past block.
The pool is created in an expired state, allowing the attacker to immediately resolve the pool and claim unauthorized funds.
Impact:
Unauthorized Claims: The attacker drains the pool’s collateral without actual economic activity.
Protocol Financial Losses: Legitimate users lose their funds to attackers exploiting misconfigured pools.
The attacker creates a pool with an unreasonably low strike price relative to the market price of the underlying asset.
The attacker manipulates the pool resolution process, creating a scenario where the payout heavily favors their position.
Impact:
Economic Exploitation: The attacker generates arbitrage profits at the expense of other users.
Protocol Instability: Manipulated pools disrupt market equilibrium within the protocol.
A legitimate user creates a pool with an excessively high collateral ratio.
The pool locks collateral unnecessarily, preventing liquidity providers from efficiently utilizing their funds.
Impact:
User Frustration: Collateral remains inaccessible for long periods.
Liquidity Drain: Protocol liquidity is artificially constrained, reducing efficiency.
Unauthorized Fund Claims:
Attackers can drain collateral by exploiting expired or misconfigured pools.
Economic Manipulation:
Arbitrary strike prices enable attackers to profit at the expense of the protocol and legitimate users.
Protocol Instability:
Misconfigured pools disrupt liquidity and reduce trust in the protocol.
Implement strict validation for all critical parameters:
Expiry Dates: Ensure the expiry date is in the future and within a reasonable range:
Strike Prices: Validate strike prices relative to the market price of the underlying asset:
Collateral Ratios: Enforce reasonable collateral ratios to prevent excessive locking or insufficient coverage:
Integrate price oracles to fetch real-time data and dynamically validate parameters like strike prices and collateral ratios:
referenceAsset
and poolSize
:require(_poolParams.referenceAsset != address(0), "Invalid reference asset");require(_poolParams.poolSize > 0, "Pool size must be greater than zero");
Restrict the number of pools a single user can create within a specific timeframe to mitigate abuse:
Deploy the contract and create a pool with the following parameters:
Expiry date: block.timestamp - 1
(past block).
Collateral ratio: 0.1
(insufficient coverage).
Exec:
Call _createContingentPool
with the manipulated parameters.
Observe that the pool is created successfully despite being misconfigured.
Impact:
Immediate exploitation of expired pool for unauthorized claims.
Locked collateral due to invalid configurations.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.