Access Modifier of function which is very import which Function is call by everyone and which one is for internal used only.
In the come way if updateFor(calculate share) and updated (which updated ratio) both should be call by internal not public.
It will call by any one which updated ratio value without deposit function or withdraw function call which actual change or updated value,
It used balanceOf:ERC20 function to check contract balance which is used to change the ratio value without check does user deposit anything or not, if I transfer directly amount to this contract then, I am able to change index to make other which is used to increase the claim amount value.
It will effect on index which we are using to calculate the claim reward, it will effect it.
Foundry, Remix and Code Review
Make them internal instead of public.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.