code-423n4 / 2022-11-redactedcartel-findings

3 stars 2 forks source link

tokens can get lost at some mint process #410

Closed code423n4 closed 1 year ago

code423n4 commented 2 years ago

Lines of code

https://github.com/code-423n4/2022-11-redactedcartel/blob/684627b7889e34ba7799e50074d138361f0f532b/src/PxERC20.sol#L45-L55 https://github.com/code-423n4/2022-11-redactedcartel/blob/684627b7889e34ba7799e50074d138361f0f532b/src/vaults/PirexERC4626.sol#L60-L78 https://github.com/code-423n4/2022-11-redactedcartel/blob/684627b7889e34ba7799e50074d138361f0f532b/src/vaults/PirexERC4626.sol#L80-L97

Vulnerability details

tokens can get lost at some mint process

Impact

In AutoPxGmx.receiver and AutoPxGlp.deposit it is being checked to not be address(0) in order of not losing tokens by error, however in other places they are not being checked and can cause a loss of assets

Possible loss of assets

Mitigation

Check not to send tokens to 0 address

Picodes commented 1 year ago

address(0) checks fall within QA

c4-judge commented 1 year ago

Duplicate of https://github.com/code-423n4/2022-11-redactedcartel-findings/issues/408