Incompatibility With Rebasing/Deflationary/Inflationary tokens #252
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Handle
defsec
Vulnerability details
Impact
Stream protocol allows different tokens to be used as collateral or underlying. The Dex contracts do not appear to support rebasing/deflationary/inflationary tokens whose balance changes during transfers or over time. The necessary checks include at least verifying the amount of tokens transferred to contracts before and after the actual transfer to infer any fees/interest.
Proof of Concept
Stream whitelists a rebasing/deflationary/inflationary token to be used as collateral or underlying by accident. This leads to miscalculations between internal Pool accounting and the balances in the token contracts.
https://github.com/code-423n4/2021-11-streaming/blob/main/Streaming/src/Locke.sol#L424
Tools Used
Code Review
Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: