Open thebkr7 opened 6 years ago
I didn't find any particular bugs in the code of the smart contract but two issues that should be considered.
1. This is a minor issue but why does createBounty(uint256 _bountyId)
take the _bountyId
as input, shouldn't the ID of each bounty be managed internally by the contract and just incremented by 1 if a new bounty is created? Right now anyone can just create a bounty with any ID which still works but it seems kinda unnecessary and confusing.
2. Currently the creator/poster of a bounty can just use the rewardUser()
function to send the reward to an address of himself. Therefore, the creator only has to pay the bountyFee
even if someone submitted a valid solution. This kinda defeats the whole purpose of having the ether
locked in the contract in the first place. A developer working on a bounty has to trust the creator to be a fair player and not just withdraw the locked ether
after a solution is submitted.
Edit: I just noticed that the bounty creator can do basically the same by using cancelBounty()
which shouldn't even be possible after someone already submitted a solution in my opinion.
I found 4 vulnerabilities in your contract:
My ETH address is 0x00f9474f1f603de1c3ba6fbe525de1ffb389125b
@catageek @nflaig You've both been rewarded. Sorry for the delay.
We are offering a bounty for finding bugs in this bounty smart contract. Please post your findings in this Github Issue along with you ETH address.