sujithsomraaj / lifi-swap-facet-audit

1 day review - 4/20
0 stars 0 forks source link

Increase code coverage #10

Open sujithsomraaj opened 6 months ago

sujithsomraaj commented 6 months ago

Context: GenericSwapFacet.sol#L62, GenericSwapFacet.sol#L114, GenericSwapFacet.sol#L164, GenericSwapFacet.sol#L172, GenericSwapFacet.sol#L183, GenericSwapFacet.sol#L267, GenericSwapFacet.sol#L277, GenericSwapFacet.sol#L284, GenericSwapFacet.sol#L289, GenericSwapFacet.sol#L300

Description: The GenericSwapFacet contract is a critical component of the LiFi swap functionality and handles various token swaps. However, upon review, it has been found that the test coverage for this contract is significantly low and could be improved to avoid unexpected behaviors.

Line Coverage: 72.7%
Function Coverage: 100%
Branch Coverage: 50%

Recommendation: Consider increasing the test coverage before using the contract for production.

LI.FI:

Researcher:

0xDEnYO commented 6 months ago

it is great that you point that out. We have discussed this and will force ourselves in general to increase code coverage of tests. We will close this issue for now (duly noted) but will improve test coverage of our whole repo in the near future.

Which tool is the best one in your opinion to check/analyze test coverage?