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

InceptionVaultsCore:Unsupported fee-on-transfer tokens #61

Open
code423n4 opened this issue Apr 29, 2022 · 2 comments
Open

InceptionVaultsCore:Unsupported fee-on-transfer tokens #61

code423n4 opened this issue Apr 29, 2022 · 2 comments
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-04-mimo/blob/b18670f44d595483df2c0f76d1c57a7bfbfbc083/core/contracts/inception/InceptionVaultsCore.sol#L123-L124

Vulnerability details

Impact

_inceptionCollateral is specified when calling the initialize function of the InceptionVaultsCore contract.
When _inceptionCollateral is fee-on-transfer tokens, in the deposit function, the actual amount of tokens received by the contract will be less than the _amount, so that users can deplete the tokens deposited by other users by continuously depositing and withdrawing.

Proof of Concept

https://github.com/code-423n4/2022-04-mimo/blob/b18670f44d595483df2c0f76d1c57a7bfbfbc083/core/contracts/inception/InceptionVaultsCore.sol#L67-L68
https://github.com/code-423n4/2022-04-mimo/blob/b18670f44d595483df2c0f76d1c57a7bfbfbc083/core/contracts/inception/InceptionVaultsCore.sol#L123-L124

Tools Used

None

Recommended Mitigation Steps

Consider getting the received amount by calculating the difference of token balance (using balanceOf) before and after the transferFrom.

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels Apr 29, 2022
code423n4 added a commit that referenced this issue Apr 29, 2022
@m19 m19 added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label May 5, 2022
@m19
Copy link
Collaborator

m19 commented May 5, 2022

We agree that fee-on-transfer tokens are currently not supported.

@gzeoneth gzeoneth added QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Jun 5, 2022
@gzeoneth gzeoneth closed this as completed Jun 5, 2022
@gzeoneth
Copy link
Member

gzeoneth commented Jun 5, 2022

Treating as warden's QA report.

@gzeoneth gzeoneth added duplicate This issue or pull request already exists and removed duplicate This issue or pull request already exists labels Jun 5, 2022
@gzeoneth gzeoneth reopened this Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

3 participants