Open code423n4 opened 2 years ago
@LilYeti: We are using wrappers to keep track of these style of tokens where the amount changes over time.
These will be vetted before adding to whitelist
That should be added to the documentation, issue is valid.
Handle
defsec
Vulnerability details
Impact
Yeti protocol allows different tokens to be used as output token. The contracts do not appear to support rebasing/deflationary/inflationary tokens whose balance changes during transfers or over time for the collateral. 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
https://github.com/code-423n4/2021-12-yetifinance/blob/1da782328ce4067f9654c3594a34014b0329130a/packages/contracts/contracts/BorrowerOperations.sol#L731
Tools Used
Code Review
Recommended Mitigation Steps
Make sure output token for any rebasing/inflation/deflation Add support in contracts for such tokens before accepting user-supplied tokens.