Hey, I really like your content. I did read through the comments and didn't understand your reasoning for why we don't have the current block number. So, I tried it in Remix and it works.
Dont they have different block number? If you are deploying it at different instances of time, they must be included in different blocks of Local Blockchain. How is this possible?
They are deployed at different times. But the block at which the two functions (attack and guess) are called are on the same block. blockhash, block.number and block.timestamp are values when those functions are called, not when the contract was deployed
I understand that we don't know the block number when the the function is called and executing, but we should not know the block.timestamp with the same reason? ! Please advise, thanks!
hey question for tokens that have random Lottery winners / Is it really random or can it be manipulated ??? if the same wallets win multiple times for random draws ?
Vulnerability 0:23
Vulnerable smart contract 0:52
Code for exploit 4:32
Demo setup 6:12
Demo 7:17
whenever i have interviews i always come to your channel to revise.....best one for advanced topics...great job 👍👍
Hey, I really like your content. I did read through the comments and didn't understand your reasoning for why we don't have the current block number. So, I tried it in Remix and it works.
This Chanel so underrated, bet It will blow up in 1 - 2 yrs
Thanks for this Unique Content : )
you said can't calculate blockhash for current block, then how can you have block.timestamp as well? shouldnt it be (block-1).timestamp
That’s pretty crazy to see the hack of a random number ~~ thanks for the 🙏 good video !!!
Thanks keep up the good work 😊 Amazing video
WholeSome Content
Dont they have different block number? If you are deploying it at different instances of time, they must be included in different blocks of Local Blockchain.
How is this possible?
They are deployed at different times. But the block at which the two functions (attack and guess) are called are on the same block. blockhash, block.number and block.timestamp are values when those functions are called, not when the contract was deployed
@@smartcontractprogrammer thanks for the awesome video and taking the time to answer my question. Thank you.
you are god's gift to smart contract teaching. thank you !
I really like it
I understand that we don't know the block number when the the function is called and executing, but we should not know the block.timestamp with the same reason? ! Please advise, thanks!
block.timestamp can be nudged by miners
hey question for tokens that have random Lottery winners / Is it really random or can it be manipulated ???
if the same wallets win multiple times for random draws ?
hard to tell without looking at the code
@@smartcontractprogrammer 0x9c9d4302a1a550b446401e56000f76bc761c3a33 that's the token contract
@@SaintsUp1 that's not a contract, probably a scam
Muchas gracias por estos videos. Muy buenos. Many thanks for all your videos!
thanks for watching and feedback
It took me a while to get this. Even though they are deployed in different blocks the function call execution will always happen at same block
Can you elaborate? didn't get it
Nice try, but attacker just bit himself in the finger because he forgot to add a withdrawal function - now the jackpot is locked forever 😂
how to fix ?
use oracle
This Chanel so underrated, bet It will blow up in 1 - 2 yrs