buyFee
is passed a parameter in the constructor and isn't hardcoded, a user can deploy the same contract and have super cheap fees for the tokens.buyFee
is passed in the constructor as a parameter, which then prevents the fees from being set to 0, and should be set at a reasonable fee.
Since the buyFee
isn't hardcoded someone can deploy the same contract since it's public and easy to copy, and they can set the buyFee
to have lower fees for the tokens.
Likelihood: High
Since the buyFee
isn't hardcoded and the contract is public and easy to copy, it can happen at any moment.
Impact: High
If a user does copy the contract they can deploy the same contract but their own cheaper fees allowing others to buy the token at a cheaper prices than intended and now they access the snowman NFT more easily
-Bob copies the contract and deploys it.
-Bob then sets the buyFee
to a very low fee
-Bob and others can now buy the token at a cheaper price than the original contract.
-Bob and others can now get the Snowman NFT more easily due to the cheaper fees, while the users in the original contract have a harder time getting the NFT due to higher intended Fees.
You should remove buyFee
from the constructors parameter and also remove buyeFee
equal to s_buyFee
.
Instead have the buyFee
be hardcoded in the constructor
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.