Timeline for Does it make sense to require token value to be anything but negative to prevent hack (more details below...)?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 19, 2019 at 23:38 | vote | accept | Robert Ggg | ||
Nov 19, 2019 at 14:04 | answer | added | Ismael♦ | timeline score: 0 | |
Nov 18, 2019 at 21:25 | comment | added | Robert Ggg | I see...I just googled to get additional better understanding, for instance have a look at a real world contract with lots of $: etherscan.io/address/… - namely the _trasnferfrom, while it doesn't use safemath is checks for underflow and underflow while also checking if from has enough so if uint negative always gets converted to positive big number a hack attempt will fail when it checks if from has enough. | |
Nov 18, 2019 at 21:17 | comment | added | goodvibration | From my experience, that's exactly what it does (at least on web3.js v0.x if I remember correctly; not sure about web3.js v1.x, and not sure about web3.py). | |
Nov 18, 2019 at 21:12 | comment | added | Robert Ggg | Yeah OK so do you mean by "off chain" a client call? For example what will happen if I call it vis web3 say using python and simply send -1 to the blockchain or to the testnet (ropsten)? I guess it will be converted to the 2^256-1 or so... | |
Nov 18, 2019 at 21:02 | comment | added | goodvibration | Read the first comment to that question (which happens to be mine, I just noticed, but it summarizes pretty well what I was thinking of writing to you when I read the title of that question). | |
Nov 18, 2019 at 20:52 | comment | added | Robert Ggg | maybe he gets HUGE positive number but sends in negative.... | |
Nov 18, 2019 at 20:52 | comment | added | Robert Ggg | thought so....yet how is this possible: ethereum.stackexchange.com/questions/69404/… | |
Nov 18, 2019 at 20:21 | comment | added | goodvibration |
"is it technically possible for uint to be negative" - No, uint is by definition non-negative.
|
|
Nov 18, 2019 at 19:53 | history | asked | Robert Ggg | CC BY-SA 4.0 |