Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of check for address(0) in LendingPair.depositUniPosition #112

Open
code423n4 opened this issue Sep 29, 2021 · 2 comments
Open

Lack of check for address(0) in LendingPair.depositUniPosition #112

code423n4 opened this issue Sep 29, 2021 · 2 comments

Comments

@code423n4
Copy link
Contributor

Handle

GalloDaSballo

Vulnerability details

Impact

The function depositUniPosition is not checking if the deposit address is different from address(0)
https://github.com/code-423n4/2021-09-wildcredit/blob/c48235289a25b2134bb16530185483e8c85507f8/contracts/LendingPair.sol#L103

Interestingly enough, only one depositor could make the mistake before the position is irrevocably lost and no-one else would be able to deposit for address(0)

Recommended Mitigation Steps

Add a check
require(_account != address(0));

@code423n4 code423n4 added 1 (Low Risk) bug Something isn't working labels Sep 29, 2021
code423n4 added a commit that referenced this issue Sep 29, 2021
@talegift
Copy link
Collaborator

talegift commented Oct 1, 2021

Checking this would increase gas costs for all users while only making it a bit safer for an absolute edge case of users who try to use etherscan directly and enter zero address into the accounting field for some reason.

I suggest lowering the severity to 0.

This doesn't sound like a good tradeoff.

@ghoul-sol
Copy link
Collaborator

best practice recommendation, non-critical

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants