QuantAMM

QuantAMM
49,600 OP
View results
Submission Details
Severity: high
Invalid

Reentrancy

Summary

Location: QuantAMMWeightedPool.sol (lines 590-614)

The setWeights function only checks that the caller is the
updateWeightRunner contract but does not validate the integrity of the weight values
themselves. This could allow manipulation of pool weights if the
updateWeightRunner contract is compromised.

Vulnerability Details

Location: QuantAMMWeightedPool.sol (lines 590-614)

The setWeights function only checks that the caller is the
updateWeightRunner contract but does not validate the integrity of the weight values
themselves. This could allow manipulation of pool weights if the
updateWeightRunner contract is compromised.

Code Snippet:

function setWeights(
int256[] calldata _weights,
address _poolAddress,
uint40 _lastInterpolationTimePossible
) external override {
require(msg.sender == address(updateWeightRunner), "ONLYUPDW");
require(_weights.length == _totalTokens * 2, "WLDL");
...
}

Impact


Complete draining of contract funds, manipulation of contract state.

Tools Used

Recommendations

Add additional validation checks for weight values including:
- Minimum/maximum bounds for individual weights
- Rate limiting on weight changes
- Validation of weight sum normalization
- Time delays for significant weight changes

Updates

Lead Judging Commences

n0kto Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.