Hey guys, I have found a reentrancy in my contract. However, I tried it and all transactions reverted, but I see 5 transactions (I tried to withdraw 1 ether and then ran the reentrancy contract). Does that mean the reentrancy does not work? My vulnerable function is if(msg.sender.transfer(_value)){ eth[msg.sender] = 0}. There were 5 eth in the contract and still are. It shows 5 transaction in one so it looked like the vulnerability is there but it got reverted for me.
Nov 27, 2020, 4:48 AM
Phone :D
Nov 27, 2020, 4:48 AM
We can't say if reentrancy is present or not in your contract as we do not know how exactly you tried to exploit it. If I remember correctly, transfer forwards only 2300 gas so that is not enough to execute arbitrary code in the fallback function
Nov 27, 2020, 5:41 AM
I posted the code of the contract. It does not do more before than regular checks (have enough balance etc.).
I mean it worked but it got reverted. Can I see somehow why it got reverted?
I mean it worked but it got reverted. Can I see somehow why it got reverted?
Nov 27, 2020, 2:07 PM