Reentrancy Attack explained with code demo | Smart Contract Exploit

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

ความคิดเห็น • 14

  • @tayeabidakun4527
    @tayeabidakun4527 11 หลายเดือนก่อน +1

    Beautiful explanation.

  • @mustafaosman759
    @mustafaosman759 ปีที่แล้ว +1

    best re-entrancy attack explanation!

  • @web3devp
    @web3devp ปีที่แล้ว +2

    But i think this code never works because i tried it and it shows warning and when deployed with warning and attacked it returns error (failed to send ethers)

    • @HeyTiGBeats
      @HeyTiGBeats ปีที่แล้ว

      I was getting an error, and in my case it was because I wasn't sending in 1 eth as mentioned @ 6:27

  • @web3devp
    @web3devp ปีที่แล้ว

    Why in this format of payable the reentrancy fails yet the balance is updated lastly
    function withdraw() public {
    uint bal = balances[msg.sender];
    require(bal > 0);

    require(payable(msg.sender).send(bal), "failed");
    balances[msg.sender] = 0;
    }

  • @splitextreme4933
    @splitextreme4933 ปีที่แล้ว

    So deposit funds is contract from victim?

  • @bhsrikrishna
    @bhsrikrishna 2 ปีที่แล้ว +1

    Explained well 👍🏻

  • @halchalram4585
    @halchalram4585 ปีที่แล้ว

    ma'am from where you learn about crypto

  • @LEOSTRIBE
    @LEOSTRIBE ปีที่แล้ว

    The transaction has been reverted to the initial state.
    Reason provided by the contract: "Failed to send Ether".
    Debug the transaction to get more information.
    getting this error while I am hitting attack button

  • @karishmayadav6986
    @karishmayadav6986 2 ปีที่แล้ว

    Hello ma'am can you help me in understanding smart contract vulnerabilities.

  • @Radek__
    @Radek__ ปีที่แล้ว

    thanks. Explained very well.
    But one bad thing, which you all "teachers" don't consider is that, you are teaching curious good people, but also you are teaching bad people how to preform an attack, you all provide them, a step by step instrucions. I would prefer to live in the world where noone explains how bad things were made, but only provide solutions how to prevent it.

    • @DissonantCat
      @DissonantCat ปีที่แล้ว

      A programmer needs to understand fully the vulnerability in order to develop a proper solution. Making the vulnerability more known also raises awareness in the community.

    • @bluespirium2878
      @bluespirium2878 6 หลายเดือนก่อน

      you can't prevent it if you don't know how it's done 😂