The FeeDistributionBranch
contract is vulnerable to asset and fee manipulation, allowing attackers or malicious users to manipulate the amounts of fees distributed, introduce invalid assets, or inflate/deflate fee values. This weakness arises due to insufficient checks and reliance on external inputs, making the contract susceptible to exploits that could disrupt fee calculations or lead to an unfair redistribution of fees.
Potential Manipulations:
Invalid or Malicious Asset Inclusion:
The receiveMarketFee
function allows any asset
address to be used, without checking whether it is a valid token or part of a trusted list. Attackers can introduce fake or malicious tokens, causing disruptions in fee processing.
Fee Inflation or Deflation:
The amount
parameter in receiveMarketFee
is entirely controlled by the caller. Attackers can pass excessively high values to skew fee distributions or extremely low values to evade proper fee sharing mechanisms.
Manipulation in Fee Claiming:
The claimFees
function lacks safeguards against assets with no accrued fees or invalid balances, allowing unnecessary gas expenditure or denial-of-service risks.
Underlying Cause:
Over-reliance on user-provided inputs (e.g., asset
, amount
) without verifying their validity or correctness.
Lack of controls to ensure the asset
exists in an approved list or the amount
is within expected bounds.
Economic Loss: Incorrect fee distributions may lead to significant losses for legitimate users or stakeholders.
Denial of Service: Introducing fake or malicious assets could consume excessive gas or cause failures in fee-related operations.
Unfair Distribution: Attackers could manipulate fees to favor specific entities or themselves, violating the fairness of the system.
Manual Review
Whitelist Valid Assets:
Maintain a mapping of approved tokens and validate all asset
parameters against this whitelist.
Example:
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.