The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Protocol can break for a token with a proxy and implementation contract (like `TUSD`)

Summary

Tokens whose code and logic can be changed in future can break the protocol and lock user rewards.

Vulnerability Details

For a token like TUSD (supported by Chainlink TUSD/USD price feed), which has a proxy and implementation contract, if the implementation behind the proxy is changed, it can introduce features which break the protocol, like choosing to not return a bool on transfer(), or changing the balance over time like a rebasing token, which will break claim reward mechanism because it is depend on total asset amount:

                    uint256 _portion = asset.amount * _positionStake / stakeTotal;
                    .   .   .   .   .   .   .   .   .   .
                    rewards[abi.encodePacked(_position.holder, asset.token.symbol)] += _portion; // <----

Impact

Protocol may break in future for this collateral and block user funds deposited as collateral. Also can cause bad loans to be present with no way to liquidate them.

Tools Used

Manual review

Recommendations

Developers integrating with upgradable tokens should consider introducing logic that will freeze interactions with the token in question if an upgrade is detected. (e.g. the TUSD adapter used by MakerDAO).
OR have a token whitelist which does not allow such tokens.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Out of scope
Assigned finding tags:

informational/invalid

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Out of scope
Assigned finding tags:

informational/invalid

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.