News for hackers. Stuff that matters.
Re:Missing line in a smart contract leads to $10M hack by duxup on Sunday May 16, 2021 @04:22PM (#27176701)
First thing I do when changing or creating a thing.

Try to figure out WHY things are the way they are and run through some scenarios. It's not a bullet proof system, I don't always do it well... but it can help having to re-invent some of the more obvious aspects of the wheel.

The whole blockchain ecosystem seems like a long drawn out lesson as to why at least some systems we have are kinda big, bulky, involve a lot of checking / overhead ... and why some rules and regulations exist.

Every new blockchain company that posts a blog and complains about "Why can't we just..." often has me thinking "Well yeah you shouldn't... wtf"

Re:Missing line in a smart contract leads to $10M hack by ZephyrBlu on Sunday May 16, 2021 @04:52PM (#27176923)
This reminds me of Chesterton's Fence: https://fs.blog/2020/03/chestertons-fence/.
Re:Missing line in a smart contract leads to $10M hack by duxup on Sunday May 16, 2021 @04:55PM (#27176946)
TY

I hadn't read this before, but it is worded way better than I did.

Re:Missing line in a smart contract leads to $10M hack by alkonaut on Monday May 17, 2021 @03:25AM (#27180852)
> First thing I do when changing or creating a thing. Try to figure out WHY things are the way they are and run through some scenarios.

As a developer I often stumble across code and systems that are superficially idiotic. I just think "Why isn't this doing X instead?".

Here there are two approaches 1) blindly change the thing to make it better 2) Try to understand why it is wrong, and what led to the legacy design.

The sensible thing might be 2, but its also soul-crushingly boring. So I obviously always do 1. After ripping out some code and replacing it with shiny new code, you invariably find the edge cases that led to the legacy design.

They will show up as bugs, or edge cases missing. After a while, you will have iterated so that your solution might look something like the original (hopefully slightly better) but the important thing is you now have a system you understand fundamentally. You basically traded a few regressions for fundamental understanding of a system