code-423n4 / 2022-01-xdefi-findings

0 stars 0 forks source link

Use calldata arrays #170

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

Czar102

Vulnerability details

Impact

Usage of memory arrays in, expecially as external functions' arguments, increases gas costs.

Proof of Concept

There are possible optimizations in XDEFIDistribution.sol in #77, #165, #186, #205, #320.

Recommended Mitigation Steps

Consider changing external functions' memory arguments to calldata variables.

deluca-mike commented 2 years ago

Agreed. We should have done this. Will change.

deluca-mike commented 2 years ago

Duplicate #29