code-423n4 / 2022-05-factorydao-findings

1 stars 1 forks source link

DOS because of no bound check for tax parameter #213

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Lines of code

https://github.com/code-423n4/2022-05-factorydao/blob/main/contracts/PermissionlessBasicPoolFactory.sol#L77 https://github.com/code-423n4/2022-05-factorydao/blob/main/contracts/PermissionlessBasicPoolFactory.sol#L228

Vulnerability details

Impact

DOS because of no bound check for tax parameter

Proof of Concept

There are no bound checks for tax parameter in PoolFactory. https://github.com/code-423n4/2022-05-factorydao/blob/main/contracts/PermissionlessBasicPoolFactory.sol#L77

If tax is chosen too high (for example 1001) then every withdrawal will revert here: https://github.com/code-423n4/2022-05-factorydao/blob/main/contracts/PermissionlessBasicPoolFactory.sol#L228

If so, users and pool owners will not be able to withdraw invested funds

Tools Used

Manual review

Recommended Mitigation Steps

Check meaningful bounds for tax parameter.

illuzen commented 2 years ago

Duplicate #89