Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The international obfuscated c contest has taught me that programmers can make small mistakes on purpose and its almost impossible to identify legit mistakes from malfeasance.

If we have a situation where:

* Its hard to tell, after the fact, 'a mistake' was a bad actor.

* The programmers are, by and large, anonymous.

* The benefit of making 'a mistake' could be hundreds of millions of dollars that are not easily traced.

This situation seems rife for abuse and bad actors. Not saying it happened in this case. . . but how would you know?



if you enjoy obfuscated c, we have this https://underhanded.soliditylang.org/


Reading https://blog.soliditylang.org/2022/04/09/announcing-the-unde...:

> In Solidity, the order of evaluation of sub-expressions is unspecified. This means that in f(g(), h()), g() might get evaluated before h() or h() might get evaluated before g(). Practically, this order is predictable, but Solidity code shouldn’t depend on that behavior between compiler versions. In most circumstances g() is evaluated before h() (left-to-right order), which is also the behavior that most languages specify in their standards. However, in the case of emitting an event with indexed arguments, the arguments are evaluated right-to-left.

I feel that order-of-evaluation dependence is a special case of the general conflict between expression-oriented (functional-style) programming, and impure operations requiring sequential reasoning. Another case of this conflict is temporary values (expressions) with side-effectful destructors (sequential reasoning), for example https://fasterthanli.me/articles/a-rust-match-made-in-hell#w....

At this point, is it good practice to avoid using side-effectful procedure calls as parameters to other expressions (especially those with multiple inputs), but instead first assign to a temporary value to make order of operations explicit?


I've always enjoyed the underhanded C contest, but I don't think it's active anymore. Thanks for this. The 2022 entry that I saw was very much in the same spirit.


I am 98% anti-crypto, but this is awesome.

Thank you man!


i can totally get why a lot of folks are anti crypto but from a dev perspective it is REALLY a fun place. It is possible to have fun and make money AND not be a piece of shit in crypto dev.


I don't like the industry and I believe that, in general, its existence currently is a net negative for humanity.

Currently, I believe that most 'web3' and 'crypto applications' exist to drive fear of missing out leading to monetary investments in crypto by people who don't understand the risks leading to the story here (150 million lost or stolen). I think of my grandmother or uncle investing in crypto and losing their retirement savings. I personally know family members who have lost low 5 digits. Why? Because they wanted to invest because it was the future, web 3, fomo.

I actually believe the world is a worst place because of crypto.

Can that change in the future? 100%

Does this mean that you and people who work in the industry are bad? Not at all. I've worked in industries when I was younger that - now - I think were a net negative for the world. I'd be a hypocrite to throw stones at people just trying to live...

Maybe governmental regulations of this will change my view.


I think the mistake here is seeing cryptocurrency as an investment. That's not what it's for. It's a currency used to pay for goods and services. The rise in its value comes directly with the freedom to use it to pay for goods and services that avoid government/corporate malfeasance and liberate commerce.

For example, I can get a drug that I have a legitimate RX for through the (regulatory) captured corrupt American healthcare system at 100x markup, or I can buy high quality generics on a darknet market for pennies per pill.

Another example: Monero is a privacy coin that is designed to be untraceable, and Mullvad (VPN) "Privacy is a universal right" offers a 10% discount for Monero, Bitcoin and Bitcoin cash. Fantastic utility for people looking to break out of oppressive government firewalls and spying.

I think cryptocurrency is a massive boon for humanity. And treating it like an investment is foolhardy. It's a currency. If you don't have a plan to spend it, why would you mine or buy it?

I saw all this coming when Bitcoin first came out and I remember thinking it was expensive at $6/BTC. If I'd kept half of what I bought back then I'd be a multimillionaire today, but if I'd kept it, it might not have become as valuable as it is today either. The value of a currency comes from using it, not hoarding it.

>Maybe governmental regulations of this will change my view.

Government regulations spurred on by the regulatory capture and oligarchy designed to squash the little guy are the a huge problem.


"It's a currency used to pay for goods and services. "

No. They're magic trading cards.

Saying 'Crypto Is Currency' is saying 'Baseball Cards are Currency - just nobody uses it them as currency, yet!'.

Crypto is neither a very good store of value and it's not a currency.

I possibly could be both (different variations) but likely not better than regular money in most cases.

"I think cryptocurrency is a massive boon for humanity"

Where are these 'boon' things?

Buying 'generics' on the Black market - basically evading the law is a good thing? What about 'hiring hit men'? Maybe it would be better to just have the laws changed. I don't see where Crypto provides the 'boon'.

"Government regulations spurred on by the regulatory capture and oligarchy designed to squash the little guy are the a huge problem. "

Yeah, not with currency though.

Like you say - currency and investment are different things.

If you don't like USDs, then just don't hold onto a lot of them.

It's a great currency, just not a very good store of value.

Crypto hasn't yet demonstrated it's benefits, and a lot of the terrible things about Crypto are still on going.

Net negative, so far. That could change.


totally understand your POV. I am pro crypto because I think banks and VC and hedge funds and market makers and all of these shadow/mystery shits that go down in the real markets are scammy and evil. while its possible to obfuscate things on a chain ledger, its impossible to really hide. blockchain tech puts everything in the open which i think would prevent a lot of crime that exists today and goes completely unchecked.

i prob didnt say all that super well but i hope you get the spirit of my argument. i totally respect your opinion here though because you are not wrong :)


> I am pro crypto because I think banks and VC and hedge funds [...] are scammy

Liking Crypto because you think hedge funds are scammy is kind of like enjoying swimming because rain makes you wet.

Today's crypto is much more rife with scams and Ponzi schemes than hedge funds currently are (because of actual legislation).


Problem with arguments like these is you put all of crypto/web3 into one category.

Yes there are scams out there. Lot more than other fields. But just take 2 or 3 solid examples - Uniswap, DyDx, etc -> These are much more open and decentralized and transparent than their TradFi counterparts.

If you think Uniswap is a scam, you haven't looked into it yet. Yes the tokens that get listed on it can be scams but that's up to to the buyer to assume the risk. As a tool, it's so much more transparent than anything that existed before it.


Yes, but the parent comment also put all banks and hedge funds into a single category.

> If you think Uniswap is a scam, you haven't looked into it yet. Yes the tokens that get listed on it can be scams but that's up to to the buyer to assume the risk.

I never said anything about Uniswap personally, but using a company that can list scams as an example about how non-scammy crypto can be is a little strange to me.


You like unregulated market because you think regulated market is "scammy"?

I can't recall a brokerage such as Schwab or vanguard ever losing my money, compared to Mt.Gox and other trash crypto exchanges.


So you wish to change a system where tens of thousands people regulate currencies, and significant number of them are scammers or evil, for the system where tens of people regulate currencies and half of them were actually convicted for scams, sometimes multiple times, and who live in the non-extradition offshores. Great idea, awesome.

PS: this what I actually hate a lot about tokenbros - they say that there is a problem in the economy with unaccountability of the world elites (ok, true at at least somewhat), and then want to supplant it with an even worse system, even more centralized, even more unequal, even more dangerous to common people, even less secure, and even less accountable for the elites in charge. The sheer audacity of their lies is mind boggling and induces literal rage.


This is actually my big issue with the Austrian school of economics.

Get rid of state extortion and then what? Get extorted by local oligarchs or warlords doing the same thing? If the world changed into their utopia, we would end up with some form of feudalism again and we would have to fight our way back to democracy.

It is easy to argue that X>0 extortion is unjust and hence this pillar of society ought to be demolished, but that is the fallacy of composition. That pillar might not be the best or prettiest but it certainly is important and without it a lot of things would go wrong. What is ignored is that the pillar protects you from Y extortion where Y > X.


Out of curiosity, what do you find scammy about market makers?


You had families members with retirement savings in these kinds of bridge protocols? Really?


Can you help with some fun jumping off points?

I'm a dev interested in learning more.


when i wanted to learn Solidity, at the time, I was really into yield farming. I forked the sushiswap masterchef contract and just played around with tweaking it. you can do this for (basically) free on a chain like BSC or Arbitrum or you can play around with forking a network using Ganache or hardhat (or Foundry if you are a Rust nerd).

Crypto Zombies is a very good interactive intro to Solidity, despite being REALLY outdated at this point (last i checked it was using Sol 0.5 or 0.4).

my best advice is find some popular crypto concept you vibe with and just start messing around. Vyper is also growing in popularity so that might be worth checking out too!


> hundreds of millions of dollars that are not easily traced

If they keep it in blockchains only, it's hard to connect to a real identity. But if they cross the line (which is everybody's goal eventually) to the real world, they can get caught as easy or even easier than in traditional financial system.


This.

I don't how anyone would commit anything more than pocket change to a scheme where an insider could deliberately introduce a weakness and then exploit that weakness to walk off with all the funds committed.


Isn't the same thing for oss contributions, npm packages, etc.?


Slipping an exploit into an npm package doesn't let you easily run away with tens/hundreds of millions of dollars in the same way web3 projects do.

That said, I personally doubt this happens much if at all, because if you want to scam on web3 you can just do a good old-fashioned pump&dump and nobody seems to be receiving any legal/criminal consequences as of yet.


"Never attribute to malice that which is adequately explained by stupidity"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: