DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: medium
Invalid

Incorrect Withdrawal Logic in _freeFunds Function

Vulnerability Details

The _freeFunds function uses the getUnexchangedBalance method to determine the withdrawable funds. However, the function incorrectly assumes the withdrawable amount corresponds to the synthetic token. The withdrawable funds represent the underlying asset, as determined by the getUnexchangedBalance method.

This logic results in an inaccurate calculation, as the expected behaviour is to withdraw the correct amount of the underlying asset.

Impact

The current implementation may lead to incorrect accounting of the underlying asset, potentially causing imbalances between the synthetic and underlying tokens within the system.

Recommendations

Update the _freeFunds logic to ensure clarity about the withdrawable funds being the underlying asset.

Updates

Appeal created

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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