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

DepositBatch does not null out approvals in the end #26

Open
hats-bug-reporter bot opened this issue Jun 20, 2024 · 1 comment
Open

DepositBatch does not null out approvals in the end #26

hats-bug-reporter bot opened this issue Jun 20, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@hats-bug-reporter
Copy link

Github username: @@deadrosesxyz
Twitter username: @deadrosesxyz
Submission hash (on-chain): 0xc5ed71f74eeb4d930c8236894220feab15a74b51a9fb1aed95376f8c49ef2ad9
Severity: medium

Description:
Description
DepositBatch will be unusable with tokens like USDT

Attack Scenario
Tokens like USDT cannot be set a non-zero approval if they already have a non-zero approval set. When depositing via DepositBatch, the entire balance is approved to the Portfolio contract, although it is not necessary that all of it will be used (due to the ratios of the tokens). If the entire approval is not used, next deposit including USDT will fail.

Attachments

  1. Proof of Concept (PoC) File
  1. Revised Code File (Optional)
@hats-bug-reporter hats-bug-reporter bot added the bug Something isn't working label Jun 20, 2024
@langnavina97
Copy link

DUPLICATE #3

@deadrosesxyz

@langnavina97 langnavina97 added duplicate This issue or pull request already exists and removed bug Something isn't working labels Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

1 participant