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

0 stars 0 forks source link

lack of zero address validation for recipent in _transfer() of pool.sol, synth.sol #213

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

JMukesh

Vulnerability details

Impact

Due to lack of zero address validation for recipient address funds can be lost

Proof of Concept

https://github.com/code-423n4/2021-07-spartan/blob/e2555aab44d9760fdd640df9095b7235b70f035e/contracts/Pool.sol#L130

Tools Used

manual review

Recommended Mitigation Steps

add require condition to check recipient address

verifyfirst commented 3 years ago

Purely user preference - don't send to a zero address and funds won't be lost

ghoul-sol commented 3 years ago

Burning by sending to address(0) is a valid use case.