Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: low
Invalid

uninitialized local variable `makerRefundAmount`

Summary:

DeliveryPlace.settleAskMaker(address,uint256).makerRefundAmount (src/core/DeliveryPlace.sol#275) is a local variable never initialized

Vulnerability Details:

Problem: The local variable makerRefundAmount is used in various operations but is only conditionally initialized. If _settledPoints is not equal to offerInfo.usedPoints, the variable remains uninitialized.
Potential Vulnerability: Using an uninitialized variable can lead to unpredictable behavior or unintended consequences. In Solidity, uninitialized variables might contain default values (e.g., 0 for uint256), which can cause logic errors or unintended behavior in the contract.

Impact:

If the makerRefundAmount variable is used without being properly initialized, it may result in incorrect refund amounts being calculated or processed. This can affect the financial accuracy of the settlement process.

Tools Used:

slither, Manual

Recommendations:

Initialize Variables: Ensure that makerRefundAmount is initialized with a default value before any conditional logic. For example:

uint256 makerRefundAmount = 0;

This guarantees that the variable has a defined value even if none of the conditional blocks execute.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Appeal created

0xshadow1 Submitter
over 1 year ago
0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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

Give us feedback!