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

[Hacken 2022-12-21 High #03] Data Consistency #71

Open
zlace0x opened this issue Dec 22, 2022 · 1 comment
Open

[Hacken 2022-12-21 High #03] Data Consistency #71

zlace0x opened this issue Dec 22, 2022 · 1 comment
Labels
status:invalid This doesn't seem right status:wontfix This will not be worked on

Comments

@zlace0x
Copy link
Contributor

zlace0x commented Dec 22, 2022

The approvals performed in the Funnel contract are not connected with the approvals done in the _baseToken tokens.

The EIP-5827 should check if it has enough allowance in _baseToken in functions, transferFrom(), and transfer().

In situations where the allowance in _baseToken is less than the allowance calculated by Funnel, there will be data inconsistency and denial of service in transfer functions.

Path: ./src/Funnel.sol : allowance(), transferFrom(), transfer()

Recommendation: Consider checking allowance from _baseToken and compare it with _ramainingAllowance. React to the result in a friendly user manner.

Status: Reported (A fix was applied only to the allowance function. Provide a reasoning for why changes were not applied to the transferFrom and transfer functions)

@zlace0x
Copy link
Contributor Author

zlace0x commented Dec 22, 2022

Resolution: Wont fix
Reason: Checking ERC20 allowance is out of scope of EIP5827 as it is solely responsible for the additional check on renewable allowance. Also, the additional gas cost is also does not justify the additional check when it is meant to be used after allowance is delegated to the funnel.

Finally, ERC20 allowance is already checked and throw by the underlying ERC20 token.

@zlace0x zlace0x added status:invalid This doesn't seem right status:wontfix This will not be worked on labels Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:invalid This doesn't seem right status:wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant