code-423n4/2021-11-nested-findings

change variable location to memory from storage in getAmountsDue (view function)

Closed this issue · 2 comments

Handle

hack3r-0m

Vulnerability details

https://github.com/code-423n4/2021-11-nested/blob/main/contracts/FeeSplitter.sol#L82

TokenRecords storage _tokenRecords is not written and read twice so can be changed to memory location

This can't be done for the following reason:
TypeError: Type struct FeeSplitter.TokenRecords is only valid in storage because it contains a (nested) mapping.

Dispute accepted.