You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.
sherlock-admin opened this issue
May 24, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelHighA valid High severity issueRewardA payout will be made for this issue
chainNue
high
Missing crucial modifier on
mintRebalancer
andburnRebalancer
functionsSummary
Missing crucial modifier on
mintRebalancer
andburnRebalancer
functionsVulnerability Detail
In the
USSD
contract, there are functions which open for public,mintRebalancer
andburnRebalancer
. This basically will mint to and burn the token fromUSSD
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 largetotalSupply
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
The text was updated successfully, but these errors were encountered: