Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 1.13 KB

`DAOfiV1Pair.deposit()` accepts deposits of zero, blocking the pool.md

File metadata and controls

27 lines (23 loc) · 1.13 KB

DAOfiV1Pair.deposit() is used to deposit liquidity into the pool.

Only a single deposit can be made, so no liquidity can ever be added to a pool where deposited == true.

The deposit() function does not check for a nonzero deposit amount in either token, so a malicious user that does not hold any of the baseToken or quoteToken can lock the pool by calling deposit() without first transferring any funds to the pool.

Recommendation:

Require a minimum deposit amount with non-zero checks


Slide Screenshot

008.jpg


Slide Text

  • ConsenSys Audit DAOfi Finding 4.5
  • Denial-of-Service
  • Medium Severity
  • Zero Liquidity Deposit
  • Single Deposit
  • Check Non-Zero Deposit Amount

References


Tags