Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

chainNue - Missing crucial modifier on mintRebalancer and burnRebalancer functions #744

Closed
sherlock-admin opened this issue May 24, 2023 · 0 comments
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label High A valid High severity issue Reward A payout will be made for this issue

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented May 24, 2023

chainNue

high

Missing crucial modifier on mintRebalancer and burnRebalancer functions

Summary

Missing crucial modifier on mintRebalancer and burnRebalancer functions

Vulnerability Detail

In the USSD contract, there are functions which open for public, mintRebalancer and burnRebalancer. This basically will mint to and burn the token from USSD contract itself.

Either this is overlooked by the USSD team, or intended-low-hanging fruits, and it's unlikely a protocol design (because it can be abusive thing to do, for example to mint a large amount supply, which then affecting the rebalance() function)

Impact

Anyone can front-run any rebalance, and increase the supply amount, resulting invalid calculation on rebalance, especially when the uint256 amount = IUSSD(USSD).balanceOf(USSD); being used.

Another case, it will make collateralFactor to be 0, because the large totalSupply

Code Snippet

https://github.com/sherlock-audit/2023-05-USSD/blob/main/ussd-contracts/contracts/USSD.sol#L204-L210

Tool used

Manual Review

Recommendation

Add modifer onlyBalancer to the functions.

Duplicate of #777

@github-actions github-actions bot closed this as completed Jun 5, 2023
@github-actions github-actions bot added High A valid High severity issue Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label labels Jun 5, 2023
@sherlock-admin sherlock-admin added the Reward A payout will be made for this issue label Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate A valid issue that is a duplicate of an issue with `Has Duplicates` label High A valid High severity issue Reward A payout will be made for this issue
Projects
None yet
Development

No branches or pull requests

1 participant