Closed code423n4 closed 3 years ago
shw
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.
_handleTransferIn
PoolFactory
_token
address(0)
createPoolADD
Referenced code: poolFactory.sol#L109-L115 Router.sol#L197-L211
Change the _handleTransferIn implementation of PoolFactory to that of Router.
Router
Duplicate of #7
Handle
shw
Vulnerability details
Impact
The
_handleTransferIn
function ofPoolFactory
does not correctly handle the case where the provided parameter_token
isaddress(0)
, causing thecreatePoolADD
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 ofPoolFactory
to that ofRouter
.