code-423n4 / 2021-07-spartan-findings

0 stars 0 forks source link

Incorrect implementation of `_handleTransferIn` of `PoolFactory` #229

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

shw

Vulnerability details

Impact

The _handleTransferIn function of PoolFactory does not correctly handle the case where the provided parameter _token is address(0), causing the createPoolADD function to revert when the token is provided as BNB.

Proof of Concept

Referenced code: poolFactory.sol#L109-L115 Router.sol#L197-L211

Recommended Mitigation Steps

Change the _handleTransferIn implementation of PoolFactory to that of Router.

SamusElderg commented 3 years ago

Duplicate of #7