News for hackers. Stuff that matters.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by lalaland1125 on Monday June 28, 2021 @01:59PM (#27665221)
These incidents really illustrate the main flaw of smart contracts: a single bug in your code can lead to incredible losses.

I simply don't think it's possible for human beings to write good enough software for smart contracts.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by mrec on Monday June 28, 2021 @02:04PM (#27665297)
I've seen them described as "self-funding bug bounties".
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by unholiness on Monday June 28, 2021 @04:05PM (#27667188)
But it's so much worse than that, right? Bugs in a smart contract are immutable. Those are just the terms everyone agreed to. There's simply no path to deploying a fix that every good actor agrees is beneficial.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by ekir on Monday June 28, 2021 @04:33PM (#27667667)
It's fairly common to deploy a proxy contract, which allows for a sort of updating. Basically you deploy a new contract and have the proxy point to that new contract instead of the old one. There are definitely some limitations and it's not fully standardized yet. There's a tentative standard here https://github.com/ethereum/EIPs/issues/1538 and OpenZeppelin also has their own implementation.

Although neither of these things will actually help if your contract gets exploited before you can push a fix.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by acjohnson55 on Monday June 28, 2021 @06:17PM (#27668973)
The problem there is that it allows people with deploy privileges to unilaterally change the rules. So you lose "code is law". Hypothetically, you want to custody of assets in an immutable contract with the minimal amount of privileges, and use proxy contracts for higher level on-chain functionality. But it's not so clear to me that it's possible to achieve a perfect factoring, in general.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by xur17 on Monday June 28, 2021 @06:36PM (#27669179)
Typically folks require a governance vote (so multiple parties) + a timelocked contract, and then after some system age / volume they burn the option.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by gumby on Monday June 28, 2021 @06:45PM (#27669273)
Doesn't a proxy contract defeat the whole purpose of algorithmically enforced contracts?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by cmelbye on Monday June 28, 2021 @07:06PM (#27669479)
I don't think it's realistic to think that human judgment can leave the picture after the first deploy. New systems are fragile, requirements change, and mistakes happen. A certain level of trust is required in the founders of a project. And generally, they have long-term incentives that are aligned with your own.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by elefanten on Monday June 28, 2021 @07:28PM (#27669680)
So it implies the crypto maximalist takes on true trustlessness are not proving workable. At least in practice with lots of real users.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by PretzelPirate on Monday June 28, 2021 @07:50PM (#27669833)
The systems can be trustless and upgradable.

As we get proven/tested/formally verified code that implements governance protocols we can use that code to build system of allowing upgrades while allowing those who disagree to exit the system.

For example, one of the ZKRollup chains has a mechanism for upgrading that requires a small number of approvers for the “break glass” scenario. When an upgrade is approved, anyone can exit the network before the upgrade takes affect and move to a system with rules they support.

Governance models will evolve as we figure out what works and what doesn’t. Some people may be ok with a super majority being able to revert the state of a contract in response to a bug while others will want immutability at all costs.

Blockchain/cryptocurrency is about each participant deciding how much trust they are ok with, and having an open ecosystem where assets can be moved to systems that people want to use.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by cmelbye on Monday June 28, 2021 @08:54PM (#27670336)
Do you have any examples of these takes? The concept of "true trustlessness" is obviously lacking in nuance and probably impossible. Nothing in the world can exist without some form of trust. However, we can certainly use smart contracts to decentralize trust and limit risk exposure.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by pjerem on Monday June 28, 2021 @04:12PM (#27667317)
I guess technically you can deploy a new contract that reverses the previous contract outcomes then replays the « fixed » terms. Good luck to find a common agreement though. And so much more possibilities for new bugs.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by intrasight on Monday June 28, 2021 @02:13PM (#27665442)
When I think about it in those terms... Why not fund bug bounties that way?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rawtxapp on Monday June 28, 2021 @03:28PM (#27666623)
They are called ransomwares and people aren't very happy with that method.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by ineedasername on Monday June 28, 2021 @06:27PM (#27669089)
And oddly ineffective at actually prompting action on closing out those bugs.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by CryptoPunk on Tuesday June 29, 2021 @03:50AM (#27673057)
While I don't have numbers, there is indication that it's prompting increased investment into cyber security:

https://www.forbes.com/sites/kevindowd/2021/06/06/private-eq...

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by solomonb on Monday June 28, 2021 @03:21PM (#27666509)
Because you presumably want to find bugs in applications that are not smart contracts.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by adtac on Monday June 28, 2021 @03:49PM (#27666939)
Wait you don't have a /root/btc_bounty_private_key.txt with 600 permissions in every server?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by intrasight on Tuesday June 29, 2021 @02:57PM (#27680202)
No. I was specifically referring to finding bugs in smart contracts. Stand up a network and have a "bounty" that would attract attempts.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by X6S1x6Okd1st on Monday June 28, 2021 @02:19PM (#27665528)
That is happening as well.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by EGreg on Monday June 28, 2021 @03:27PM (#27666612)
Because the payout would be too large
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by intrasight on Tuesday June 29, 2021 @02:59PM (#27680228)
The payout would be whatever gas you put in as the "bounty"
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by ike0790 on Monday June 28, 2021 @05:53PM (#27668684)
lmao
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by jwlake on Monday June 28, 2021 @02:05PM (#27665326)
Mostly it involves people making systems that are too complex to trivially analyze. You can not write arbitrarily complex secure code. You need to limit your scope and do one very simple thing extremely tersely and correctly.

You can make powerful systems with simple correct independent components. You can not make complex secure monolithic systems. It gets even worse when you look at contracts with delegation.

The problem with most "smart" contracts is they have abstractions, delegation and scope creep.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by spicybright on Monday June 28, 2021 @03:35PM (#27666741)
I don't know much in the field, but formally verifiable programming methods come to mind.

You'll potentially have less of a chance for contracts to be exploited (at least compared to what we have now).

That said, you can't protect against infrastructure exploits as easily, mathematically flawless program or not.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by foobiekr on Monday June 28, 2021 @04:05PM (#27667184)
Formal methods are about matching the spec. Errors in the spec are still an issue. Moreover, there is very, very little formally verified code in the world, much less than you'd believe.

My former professor (RIP) oversaw the formal verification of the F-16 computer software and it still had significant bugs in the end where the specification itself was incomplete or in error. And that was a multi-year, team-scale effort. No one is doing that for smart contracts.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by tialaramex on Monday June 28, 2021 @05:07PM (#27668135)
A nice practical example from TLS 1.3:

TLS 1.3 has been formally proven (not an implementation, but the standard itself). To the extent the mathematicians correctly explained what the TLS 1.3 RFC says, and correctly told the machine what TLS 1.3 is supposed to do, the machine proof says this protocol does what we intended.

That work assumes a bunch of components are black boxes, they must work. If we ever lose confidence that they work, we've got to throw those out. So for example SHA-256, AES GCM, X25519, the proof doesn't say "We prove these work" it says "Assuming you're right that these do what they're designed to do the rest of your proof holds"

Anyway, one of the assumptions in that proof is a surprise to a human implementing TLS 1.3, it isn't explicitly mentioned in the TLS 1.3 document as written. And so the result is, if you didn't obey that assumption, the proof doesn't hold and sure enough you're vulnerable to an attack.

The assumption is for Pre-shared Keys (e.g. IoT devices A and B don't want to bother with certificates, so they just use pre-agreed random keys) each device pairing has its own PSK.

A person looking at the design figures hey, got two devices Alice and Bob, I can just have a single key K known to both devices, and everything is secure. But that's wrong - and the TLS 1.3 proof doesn't say this will work. Here's what bad guys can do, it's called the Selfie Attack:

Alice sends a message to Bob, maybe "Did you feed the cat?" and it's encrypted with key K. Normally Bob receives the message, maybe answers "Yes I fed the cat" also encrypted with key K and all is well.

But now Mallory is on a network able to intercept and re-route messages. Alice sends to Bob, "Did you feed the cat?" encrypted with key K. Mallory can't read or tamper with this message, it's encrypted with key K and TLS 1.3 works as designed, but Mallory just re-directs the message back to Alice, "Did you feed the cat?". The message is encrypted with key K, Alice assumes Bob sent it, and replies "No, I didn't feed the cat" also encrypted with key K, which Mallory re-directs again back to Alice, who now mistakenly believes that Bob has told her he hasn't fed the cat.

There are obviously a bunch of things you could do to fix this. First of all you could just have more PSKs. If Alice's message to Bob is always encrypted using the Alice->Bob shared key, when Alice actually receives it instead she knows something is wrong immediately. Or you could just prefix each message with To/From information, like an old-fashioned email and that works too so long as you check it.

But the important observation is that this is an assumption in a proof that nobody really surfaced until it was too late. If researchers had told the proof system "No, the PSKs can be the same" the proof fails. Or if they'd carefully explained to the TLS Working Group, "We had to spell out that the PSKs must be different" then today RFC 8446 would likely explain that you need to do that or you've got a security problem. But neither happened and this attack slipped between the cracks.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by seanwilson on Tuesday June 29, 2021 @05:41AM (#27673730)
Keep in mind:

1. a non-verified approach can have many problems in the (informal) specification + implementation errors

2. the verified approach is likely to have less specification errors (because the specification had to be formally written out and matched against an implementation) and implementation errors with respect to the specification will be almost impossible (minus faults in the compiler, OS and hardware).

There's a huge jump in security guarantees between 1 and 2.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rodgerd on Monday June 28, 2021 @05:53PM (#27668693)
A very interesting and informative comment - thank you.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by gurchik on Monday June 28, 2021 @05:44PM (#27668595)
I'm not familiar with formal verification, so forgive me. Could something like TLA+ be used to inch yourself towards a verifiable spec? Although you are moving the goalpost, the hope is that eventually your spec is so simple that it is "obvious" that it is correct?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by impreciouschild on Monday June 28, 2021 @04:53PM (#27667959)
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by raverbashing on Monday June 28, 2021 @02:15PM (#27665470)
Yes, I agree. Most of the security of smart contracts should be in the VM. Things like self-asserting the results and only finishing the transaction if it actually passes a double-check. Or set value limits to each smart-contract (so even if there's a bug it will only operate on 0.00001 BTC for example).
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by admax88q on Monday June 28, 2021 @03:20PM (#27666483)
If your smart contract can only process tiny amounts of money, then it's no useful.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by raverbashing on Monday June 28, 2021 @03:28PM (#27666628)
That's not what I'm saying. But sure, if you think you can write smart contracts without bugs for all means don't set a limit.

I'm saying you should define a ceiling for your smart contract so in case of a bug, no transactions over that ceiling go forward.

So if you have a stupid bug that causes you to transfer 1BTC instead of 0.001BTC you don't lose all your money.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by recursive on Monday June 28, 2021 @06:52PM (#27669334)
What's the distinction? That just means you won't be able to use smart contracts for anything useful.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by jwlake on Monday June 28, 2021 @09:55PM (#27670777)
This is mostly infeasible because the VM has no idea what's worth anything. There is no reasonable price in absolute terms for a BTC or ETH or DOGE or $DUMBCOIN.

The key is that the contracts need to be minimal and analyzable, so its ~100 lines of code you can manually analyze. Documented separately all the edge cases, or ideally removed through good design so they simply don't exist. A bunch of problems I've seen in the real world of crypto are annoying edge cases that you can fix with an if statement, or ideally change the design to remove them completely. It's actually a surprisingly hard space because you're trying to make terse, complete and secure code.

In normal web/systems programming you have layers of security; internal services, external services, firewalls, access controls, vpns, security by obscurity, etc etc etc. In crypto you have none of that. Everything is 100% public, the code probably should be published, or else it is trivially decompiled. If there is a problem someone will find it if there is value in finding it.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by raverbashing on Tuesday June 29, 2021 @03:22AM (#27672877)
Thanks for your comment. Yes I agree the absolute value in some coin is not a great metric.

> In normal web/systems programming you have layers of security; In crypto you have none of that.

Yes, that's what I mean. Why not?

> The key is that the contracts need to be minimal and analyzable

Agree, but even short contracts might have bugs. Betting on "self-paying bug bounts" is not a good bet.

What I'm proposing is that every smart contract double-checks its expected results

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rawtxapp on Monday June 28, 2021 @03:16PM (#27666412)
The flip side of that is any smart contract that stood the test of time should be rock solid. For example, there are huge incentives to go ahead and hack a big contract like maker, compound, uniswap or aave, so you can bet that there's highly qualified people out there trying to hack them as we speak, yet after all this time, they are still working as intended.

I have a lot more trust in that kind of product than in a product where contracts are subject to interpretations by humans which may or may not be reliable. It's one of the reasons why people incorporate their companies in Delaware, there are well known case law, so you know in advance what to expect from the justice system. Predictability is an important part of a contract, I trust a well inspected and battle tested smart contract much more than a human enforced contract. That said, not everything is suited to smart contracts, but many financial applications are.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by uncomputation on Monday June 28, 2021 @03:20PM (#27666489)
Considering there are still new bugs found in chip designs, operating systems, and compilers that have been around 4 times as long as any cryptocurrency I have literally no idea why you would feel safe in “smart contracts.” At least if my bank account is hacked, I have a solid legal standing for compensation and I have good reason to believe centralized financial institutions will keep extensive documentation and logs. With decentralized finance, all I have is some Medium dot com post on the “Forward Plan” and an ominous message that “SAFEDOLLAR IS UNDER ATTACK.”
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rawtxapp on Monday June 28, 2021 @03:23PM (#27666536)
The bugs found in smart contracts equal large sums of money right away unlike 0-days in OSes or other systems where the link is much more indirect. For example, if you find a 0-day on Windows, sure you might sell it for 7-8 figures on the black market, if you found a bug on maker (or any of the big contracts), you could walk away with billions of dollars in a practically untraceable way.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by doesnotexist on Monday June 28, 2021 @03:27PM (#27666613)
https://en.wikipedia.org/wiki/Market_for_zero-day_exploits#M... The wikipedia entry on this is a bit misleading or misinformed. As there are multiple above ground buyers for 0-days that have no interest in making it difficult for people to sell to them.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by reidjs on Monday June 28, 2021 @07:14PM (#27669558)
There's still a middle-man to deal with in that process. In this case, you extract a decent amount of 'money' directly.

Would you rather win $100 and have to make a phone call to claim it, or find a $100 bill on the street?

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by hanniabu on Monday June 28, 2021 @07:44PM (#27669797)
> Considering there are still new bugs found in chip designs, operating systems, and compilers that have been around 4 times as long

Not quite the same. Those codebases are much larger, often include legacy spaghetti code, or are closed source. This makes it more difficult to find exploits, not to mention there's not as clear of path of financial incentive.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by norswap on Thursday July 01, 2021 @08:29AM (#27698443)
As someone that has experience in compilers and smart contracts, I can tell you they are an order of magnitude or more apart in terms of difficulty. Most smart contracts are not that complicated.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by snewman on Monday June 28, 2021 @03:23PM (#27666538)
I'm not sure this follows.

It's a fair point that any easy-to-find bugs in large, time-tested contracts will have been found. Any medium- or hard-to-find bugs also will probably have been found. But there might still be a very-hard-to-find bug lurking; and given the value of finding such a bug, people might look hard enough to find it.

In other words, the same scale that ensures there is no low-hanging fruit, also provides the incentive to pick high-hanging fruit.

> I have a lot more trust in that kind of product than in a product where contracts are subject to interpretations by humans which may or may not be reliable.

This is a valid concern, but it's also extremely well-understood at this point; we have centuries of global-scale experience with traditional financial and legal systems. They're certainly not flawless, but it's rare for gigantic new flaws to emerge. An important point is the existence of mechanisms for rolling back bad transactions and challenging / appealing flawed decisions.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by jwblackwell on Monday June 28, 2021 @06:10PM (#27668897)
> it's rare for gigantic new flaws to emerge

There are countless instances of rouge traders, high level financial crime and corruption.

Wirecard is one recent example costing billions. The Libor scandal another that comes to mind.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by NicoJuicy on Monday June 28, 2021 @07:32PM (#27669707)
Who were the victims with wirecard?

They faked the numbers, but they didn't manage people's money.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rawtxapp on Monday June 28, 2021 @07:39PM (#27669768)
I can't tell if you're sarcastic or not. In case you're serious, you don't see how a company with a market cap of 28B$ going belly up causes damage to investors, the markets, their partners, clients and employees?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by NicoJuicy on Tuesday June 29, 2021 @02:59AM (#27672735)
The stock going belly up is the consequence of the fraud, but not the actual fraud. Just like the other people you've mentioned.

Eg. Their clients switched payment processor.

When a btc exchange frauds or a coin hacked or a smart contract is bugged, they get away with all your money. Which is the actual fraud.

In some cases they post a postmortem on medium and call it a day.

I don't think wirecard's fraud is comparable with all the crap in crypto town.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Retric on Monday June 28, 2021 @03:19PM (#27666474)
How many major bugs in software and especially cryptosystems went undisclosed for decades?

The core issue is the inherent asymmetry where 1 person finding 1 bug can destabilize giant systems. Even if these systems where hundreds of years old that doesn’t actually mean much.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rawtxapp on Monday June 28, 2021 @03:22PM (#27666513)
How many bugs had a direct financial return in the same way? If you found a bug in maker (or any of the other big contracts) today, you can walk away with billions of dollars worth of coins, that's a huge sum.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Retric on Monday June 28, 2021 @05:15PM (#27668246)
Major bugs in smart contracts can cause the system to stop working rather than handing anyone billions. As such people can discover such issues without disclosing them in much the way infrastructure can be vulnerable without people damaging it.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by computerlab on Monday June 28, 2021 @05:37PM (#27668512)
The Parity wallet bug from 2017 is the classic example so far, where someone who was just messing around with the smart contract 'accidentally' locked up $280m in assets[1]. I've linked to the GitHub thread below...this person didn't get anything from the exploit, and it wasn't for street cred (they deleted their account).

https://github.com/openethereum/parity-ethereum/issues/6995#...

https://www.cnbc.com/2017/11/08/accidental-bug-may-have-froz...

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rawtxapp on Monday June 28, 2021 @05:37PM (#27668517)
Even being able to grind a smart contract to a halt would be very profitable if you shorted it right beforehand.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Retric on Monday June 28, 2021 @06:17PM (#27668974)
Even then you are limited things to people who are willing to break the law and have a giant sign pointing them as a likely culprit.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rawtxapp on Monday June 28, 2021 @06:45PM (#27669275)
I mean people short crypto all the time, averaged over a long enough period of time long/short ratios are roughly ~50/50 [1]. It's normal market behavior. And if you're shorting one of the big ones, you can most likely do it on defi without even providing a name.

1: https://www.bybt.com/LongShortRatio

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Retric on Tuesday June 29, 2021 @12:18AM (#27671715)
Let’s assume something like 100 people have very large* short positions on a system that goes down. Dropping the possibility from X,000,000,000 to 100 is quite a big deal.

*very large being required for significant money to be at stake, making say 10k illegally from a short is hardly going to inspire a lot of effort.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by DanHulton on Monday June 28, 2021 @03:29PM (#27666647)
Yeah, the classic example is the original binary search algorithm. It had an overflow bug that went undetected for two decades: https://thebittheories.com/the-curious-case-of-binary-search...

It's an incredibly simple algorithm and still got missed. Smart contracts have no chance.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by notJim on Monday June 28, 2021 @04:40PM (#27667778)
How often was that bug actually hit in production? How many people are allocating arrays of size 2*31? A bug is less likely to be caught if it's not exploitable.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by seibelj on Monday June 28, 2021 @03:33PM (#27666719)
There was not $Billions to be paid out for finding that - it's a matter of incentives.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Retric on Monday June 28, 2021 @05:17PM (#27668272)
Not every way to break a smart contract results in a major payout.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by zionic on Monday June 28, 2021 @03:21PM (#27666510)
By this logic most e-commerce is a mistake as well, since a serious flaw in the linux kernel could take down most web servers.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by arcticbull on Monday June 28, 2021 @03:25PM (#27666571)
Nah, that's governed by contracts, law and enforced by the police. That money tends to be traceable and recoverable.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Retric on Monday June 28, 2021 @03:27PM (#27666604)
Credit card transactions are reversible, that means such flaws can be considered a cost of doing business rather than permanently destroying anything.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by threeseed on Monday June 28, 2021 @07:09PM (#27669509)
With ecommerce the worst you can do as a seller is take out as much money as the credit limit on the card. Which for most people is in the low thousands.

With smart contracts the liability upside is orders of magnitude higher.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by solomonb on Monday June 28, 2021 @03:20PM (#27666484)
This sounds like a fallacy of the inverse. Those contracts not being hacked yet is no proof that they are resistant to hacks.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by theli0nheart on Monday June 28, 2021 @03:23PM (#27666541)
It's not clear what fallacy you're thinking about because the fallacy of the inverse is not it.

From https://en.wikipedia.org/wiki/Confusion_of_the_inverse:

> Confusion of the inverse, also called the conditional probability fallacy or the inverse fallacy, is a logical fallacy whereupon a conditional probability is equated with its inverse; that is, given two events A and B, the probability of A happening given that B has happened is assumed to be about the same as the probability of B given A, when there is actually no evidence for this assumption.[1][2] More formally, P(A|B) is assumed to be approximately equal to P(B|A).

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Closi on Monday June 28, 2021 @05:01PM (#27668068)
The inverse of "any contract that has been hacked was insecure" is "any contract that hasn't been hacked must be secure".

I think this is what OP meant. If something has been around for a long time it does probably mean it's less likely there is a really obvious security flaw, but it doesn't necessarily mean it is 'rock-solid' as plenty of things that have been seen to be 'rock-solid' in the past have turned out to be insecure.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by solomonb on Tuesday June 29, 2021 @03:53AM (#27673081)
yes this is what I was implying. I am curious how else the previous commenter would interpret my statement.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by theli0nheart on Tuesday June 29, 2021 @11:51AM (#27677648)
Let's formalize this to make it easier to discuss.

  𝐏(𝐀)  = 𝐏(contract has been hacked)
  𝐏(¬𝐀) = 𝐏(contract has not been hacked)
  𝐏(𝐁)  = 𝐏(contract is hack resistant)
Relevant conditional probabilities:

  𝐏(𝐁|¬𝐀) =
    𝐏(contract is hack-resistant given that it has not been hacked)
  𝐏(¬𝐀|𝐁) =
    𝐏(contract has not been hacked given that it is hack-resistant)
The fallacy of the inverse would be assuming that:

> The probability that a contract is hack-resistant, given that it has not been hacked, is approximately equal to the probability that it has not been hacked, given that it's hack resistant.

More succinctly:

  𝐏(𝐁|¬𝐀) ≅ 𝐏(¬𝐀|𝐁)
In https://news.ycombinator.com/item?id=27666484, the fallacy of the inverse was presented as "those contracts not being hacked yet is no proof that they are resistant to hacks" or "NOT (NOT A implies B)", i.e.:

  ¬(¬𝐀 → 𝐁)
In summary:

  𝐏(𝐁|¬𝐀) ≅ 𝐏(¬𝐀|𝐁) => the fallacy of the inverse

    and

  ¬(¬𝐀 → 𝐁)         => statement in comment 
These two statements are fundamentally different.

Note that the first statement is a comparison of probabilities, and the second is not. They're not the same. There might be another fallacy at play here, but it's not the fallacy of the inverse.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Closi on Wednesday June 30, 2021 @12:29AM (#27684872)
To be honest, I don’t fully follow the above, and I’m not sure if this formalises the same problem. Copying the definition from Wikipedia:

> If P, then Q.

> Therefore, if not P, then not Q.

In this case, we could plug in the below values:

P = Contract Hacked Q = Insecure

I.e. if the contract has been hacked the code was insecure. Therefore if the contract has not been hacked, it is not insecure.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by cylon13 on Monday June 28, 2021 @06:34PM (#27669160)
It is pretty good evidence that they are resistant to hacks though, and speaking about interesting evidence that doesn't pass the bar of proof isn't some kind of logical fallacy. That's a pretty high bar to set for what you're willing to integrate information-wise about the world into your model of it.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by solomonb on Tuesday June 29, 2021 @03:50AM (#27673060)
I get where you are coming from but this is a highly adversarial environment where huge amounts of other people's money is at stake with a history of very clever hacks. This looks like precisely the sorts of systems where you ought to raise the bar as high as possible.

Certain systems may have proven themselves somewhat over time but for this I say there is always the possibility for some extremely sophisticated attack and for any other new system they by definition wont have even this proven track record.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by donio on Monday June 28, 2021 @03:24PM (#27666559)
> The flip side of that is any smart contract that stood the test of time should be rock solid.

They all are until they aren't.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by lisper on Monday June 28, 2021 @03:18PM (#27666459)
That's no guarantee. Someone might have a zero-day stashed away somewhere.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rawtxapp on Monday June 28, 2021 @03:20PM (#27666486)
The game theory comes into play, if you found a bug that could empty maker's vaults for example, you better do it right now, otherwise, someone else will before you and you wasted all your time/energy.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by theli0nheart on Monday June 28, 2021 @03:26PM (#27666584)
Exactly. This is precisely why there aren't (or at least, in a rational world, should not be) any undisclosed zero-days in crypto. If you're aware of an exploit, you're just going to exploit it immediately unless you're willing to let someone else exploit it in your place.

There is a large amount of money at stake with these exploits and it doesn't make economic sense to let one sit around.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by EGreg on Monday June 28, 2021 @03:27PM (#27666600)
I would trust things with formal proofs a lot more
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by progbits on Monday June 28, 2021 @02:14PM (#27665456)
Time for LawyerCoin (TM). The smart-contract is written in English (or other human language) and the oracles are powered by a bunch of lawyers who pinky swear to enforce them.

I'm doing ICO next week, if anyone wants in.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by whatshisface on Monday June 28, 2021 @03:12PM (#27666368)
We can do better than pinky swearing. Each lawyer gets mining fees when they enforce a contract fairly. "Fairly" is defined by consensus, where each lawyer is forced to predict the consensus before voting in a private ballot that is only revealed when the rewards are issued. Lawyers who predict the consensus get rewarded. If you start it off with people who are trying to be fair then predicting fairness will lead to the most reward, and it will keep going until the majority defects.

The collective is incentivized to continue being fair because if they weren't, nobody would use their coin, and the rewards issued to fair lawyers would be worthless.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by lisper on Monday June 28, 2021 @03:22PM (#27666520)
That's actually a pretty good idea. I had a similar idea to discourage the gaming of upvotes on sites like HN and Reddit: make each upvote cost a point, but then you get a point for everyone who upvotes after you, divided by the number of votes the item had at the time you upvoted (or something like that). So people who upvote popular stories early, i.e. people who successfully predict what people will like, get rewarded.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by whatshisface on Monday June 28, 2021 @03:27PM (#27666595)
Don't give me too much credit, I stole it straight from https://augur.net/ by swapping "truth" with "justice." ;) Fortunately for me the idea blockchain is irrevocable and my theft cannot be reversed.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by falcor84 on Monday June 28, 2021 @03:28PM (#27666618)
But why would we want to encourage such groupthink and discourage dissent?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by whatshisface on Monday June 28, 2021 @03:32PM (#27666691)
Taking up the OP's side because it's interesting...

Some kinds of groupthink are bad (like making an anti-vaccine subreddit that only ever shows articles about vaccine-related industrial accidents, instead of a vaccine subreddit that shows people a truly representative sampling of vaccine knowledge), but other kinds are arguably good (not seeing 4chan nasty stuff on /r/reallycutekittensandpuppies.) Only some group content coordination is filter bubbling, while other times it's filtering.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by lisper on Monday June 28, 2021 @03:37PM (#27666770)
Yeah, this. A lot of good stuff submitted to HN never gets noticed because there's not much incentive to go through new submissions. It's basically volunteer work, so you get volunteer-quality results. The caliber of volunteer in HN is higher than most sites, but a lot of good stuff still falls through the cracks (like most of the stuff I submit ;-)
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by gilgad13 on Monday June 28, 2021 @05:57PM (#27668735)
This is good, but distributing the mining fees evenly across all lawyers will result in too low a fee for the work involved. What if, instead, the parties of the contract would each pick a small set of lawyers ("representing" lawyers) to receive their fees for enforcing the contract. Rather than relying solely on the mining lawyers for this contract to participate in consensus (as that number is now small and adversarially motivated), we would expand the consensus pool to all lawyers who participated in sufficiently similar contract enforcement in the past, using their votes on previous enforcements as an immutable record.

In this design, determining the threshold for similarity may require the participation of a third-party "oracle" or "judge" component.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by hanniabu on Monday June 28, 2021 @07:51PM (#27669845)
> Lawyers who predict the consensus get rewarded.

This is incentivizing what they think will be the most popular verdict vs what they think is the proper verdict. That's a very big difference and failures will be inevitable.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by notJim on Monday June 28, 2021 @04:08PM (#27667251)
This, but unironically.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by shadowgovt on Monday June 28, 2021 @03:12PM (#27666374)
Did you just re-invent law from first principles? ;)
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by spicybright on Monday June 28, 2021 @03:36PM (#27666747)
As long as you can pitch it as a new idea to SV, you'll be rolling in it!
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by iNane9000 on Monday June 28, 2021 @02:27PM (#27665650)
That’s not even close to the main flaw. The main flaw is that it incentivizes crime, human trafficking and accelerates environmental destruction. None of these are huge problems if you can afford a private bunker in New Zealand. It’s a major problem for ordinary citizens, especially those of poorer countries.

Everything involving code has bugs. Bugs aren’t a reason not to use code. Bitcoin isn’t a problem for the very small fraction of the population that use it. Bitcoin users are super rich tech workers and finance guys, by and large.

The people hurt most by Bitcoin are all the people who don’t use it. It benefits the ultra-rich at great expense to the other 99% of humanity.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by fleddr on Monday June 28, 2021 @04:01PM (#27667113)
From a humanitarian and economical point of view, Bitcoin doesn't hurt the poor. It allows the unbanked to finally store wealth, as a counter to a local strongly inflationary currency. Besides storing wealth, also growing wealth, as pretty much the only option they have.

Unless you don't believe the narrative that Bitcoin stores/grows wealth very well, in that case...poor people can simply not use it.

Perhaps you mean to say that the distribution of coins is uneven. That's true, but not a problem Bitcoin aims to solve or can solve. Bitcoin is fair, the same rules apply to everyone. If a billionaire has a 1,000 Bitcoin and I have 0.1 Bitcoin, we both win or lose based on price action equally, relatively speaking. That's as fair as it gets. With Bitcoin, having lots of coins doesn't give you any new free coins, unlike fiat money.

The environmental destruction is overstated and rapidly changing as we speak. Soon the vast majority of mining happens based on renewables with a specific focus on stranded energy. And this isn't a vague promise, some 60/70% of the hashrate from China, which include most coal-based mining, is being wiped out in just a few weeks.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by viraptor on Monday June 28, 2021 @06:03PM (#27668820)
> With Bitcoin, having lots of coins doesn't give you any new free coins, unlike fiat money.

Fiat money doesn't give your free money either. You have to invest in something - and there's plenty of fee-limited options in the cryptocurrency world as well.

> And this isn't a vague promise, some 60/70% of the hashrate from China, which include most coal-based mining, is being wiped out in just a few weeks.

Because the price is so low, not because they want to help the environment. At the next peak everyone will be happy to burn whatever fuel is cheaper than the payout again.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by fleddr on Monday June 28, 2021 @08:41PM (#27670232)
Fiat money does give you free money. We happen to live in exceptional times where interest rates are close to zero, but in general, simply owning fiat gives you free new fiat. The same is not true for Bitcoin in itself.

Nobody wants to help the environment. The typical US lifestyle would require 8 planets if it was rolled out across the world's population. Just leaving your phone plugged in uses more energy than all of crypto mining combined.

So don't preach about caring, nobody cares. They say they do, but don't. So yes, miners seek out cheap renewables, which is motivated by profit, not helping the environment. As said, none of us are better. We don't care. But if a profit-based incentive leads to renewable energy usage and helping the environment as a side-effect, I'm all for it.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by viraptor on Tuesday June 29, 2021 @12:10AM (#27671671)
Owning fiat does not give you free money. Giving it to a bank which will pay you interest on the account (or various investments) is what gives you more.

But the same applies to BTC with BlockFi / BIA.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by fleddr on Tuesday June 29, 2021 @04:59AM (#27673479)
You're grasping at straws when you imply people have piles of cash at home whom then "give" it to a bank. It's already in the bank. You get paid directly to your bank account and get additional fiat without a single action on your behalf, with full legal protection. Interest, growing fiat from fiat, is directly integrated into fiat itself.

Not true for Bitcoin. Neither owning your coins in a wallet nor leaving them on an exchange grows your amount of Bitcoin.

Can you give away your Bitcoin to some rogue, fully unregulated party claiming you get back more Bitcoin? Yes, in the same way I can give my fiat to some shady character in the streets. I may get back more fiat. Or I may be permanently parted from my coins.

These things are not the same. Bitcoin does not have interest built in. Not at bank level nor at central bank level. This is radically different from fiat.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by viraptor on Tuesday June 29, 2021 @05:22AM (#27673611)
> You're grasping at straws when you imply people have piles of cash at home whom then "give" it to a bank.

Into an interest paying account - yes. A savings account like that may be the "don't even mention it" default for you and me. But not for:

- unbanked people in the US (~6%)

- and in the world (much larger https://www.motherjones.com/kevin-drum/2019/06/raw-data-unba...)

- people with non-interest-paying accounts for religious reasons

- people in countries where interest is ~0% or negative (https://dqydj.com/negative-savings-accounts/)

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by varjag on Monday June 28, 2021 @05:56PM (#27668727)
There is approximately 0 unbanked storing wealth in Bitcoin.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by fleddr on Monday June 28, 2021 @08:47PM (#27670280)
Is that so?

Ever heard of the African Bitcoin community, a transnational initiative running for years now that resulted in Africa growing fastest in addresses of all continents?

Or what about El Salvador, 70% unbanked, where every single citizen will get a first small BTC deposit from the government, thereby becoming banked by the millions?

And what about Libya? You know, that country with a crashing currency that next blocked access to bank accounts for months, it all going up in smoke? Looked into the BTC numbers there?

So tell me, were you completely unaware of this at all, or do you find these people not important enough to count as more than zero?

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by threeseed on Monday June 28, 2021 @07:13PM (#27669547)
> Bitcoin doesn't hurt the poor

The impacts of climate change, which Bitcoin unquestionably contributes to, skew significantly towards poorer countries.

And the consumer protections built into the regulations around fiat currencies are there to protect people who can't afford teams of accountants and lawyers.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by AgentME on Monday June 28, 2021 @04:08PM (#27667249)
>accelerates environmental destruction

Ethereum is working on moving to proof-of-stake within the next year, which completely removes its need for energy-intensive proof-of-work mining.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by WalterSear on Monday June 28, 2021 @04:36PM (#27667716)
Ethereum keeps kicking the can on this, and not for technical reasons.

> “One of the biggest problems I’ve found with our project is not the technical problems, it’s problems related with people”. - Buterin

https://tokenist.com/buterin-explains-why-ethereum-2-0-upgra...

Given that the reasons are political rather than engineering in nature, there's no way to put a timeline on them.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by twox2 on Monday June 28, 2021 @02:31PM (#27665729)
That it incentivizes human trafficking and crime is pure hyperbole. Also turns out that the barrier to entry for crypto is lower in the 3rd world than you might think:

https://www.youtube.com/watch?v=jvHN0MEBoZo

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by iNane9000 on Monday June 28, 2021 @02:40PM (#27665854)
I believe the synagogue shooter was paid in Bitcoin. So not pure hyperbole.

Edit: might have the details confused about above point, but the general thrust of things is pretty clear. https://foreignpolicy.com/2019/03/19/neo-nazis-banked-on-bit...

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by twox2 on Monday June 28, 2021 @02:41PM (#27665875)
Well in that case, nothing incentivizes more crime than USD.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by iNane9000 on Monday June 28, 2021 @02:43PM (#27665918)
It’s more regulated though. That’s the point is there’s some control in usd, for better and worse.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by vimy on Monday June 28, 2021 @03:14PM (#27666394)
Cash is the ultimate anonymous method of payment.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Veliladon on Monday June 28, 2021 @06:02PM (#27668804)
Cash is a physical thing that needs to be taken somewhere if you're using it to pay someone off or receive a payoff. That gives means to be apprehended at some point in the chain. Crypto on the other hand you just hand over the coins. The coins are sent to an exchange's wallet, mingled, then pulled out on another anonymous wallet. This is what makes it so great for ransoms.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by dasudasu on Monday June 28, 2021 @04:42PM (#27667819)
Not necessarily. Bills have serial numbers on them. They can also be marked.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by sjtindell on Monday June 28, 2021 @03:33PM (#27666712)
Their complaint was not with your premise but the language. Rather than incentivizes perhaps facilitates.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by skizm on Monday June 28, 2021 @03:27PM (#27666599)
Ethereum just forked the entire blockchain to undo a transaction they didn't like. I'm not sure if that's reassuring or a complete violation of the entire premise of smart contracts.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by mikkelam on Monday June 28, 2021 @03:38PM (#27666781)
As long as everyone agrees i see absolutely no problem. The entire value proposition of decentralized blockchain is to establish consensus without trust. If everyone agrees to undo a transaction, it seems perfectly fine to me, as that would require the consensus the blockchain already establishes
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by danellis on Monday June 28, 2021 @03:49PM (#27666934)
> As long as everyone agrees i see absolutely no problem.

They didn't all agree, though. Now there's Ethereum (the people who agreed with the fork) and Ethereum Classic (the people who didn't agree).

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by mikkelam on Monday June 28, 2021 @04:11PM (#27667302)
Some agreed, others didn't and they decided to create a fork. Consensus doesn't require everyone to agree, just the majority
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by vecinu on Monday June 28, 2021 @05:01PM (#27668069)
You're literally talking across yourself, at least that's how I read it.

Your first comment [1]

> As long as everyone agrees i see absolutely no problem

and now

> Some agreed, others didn't...Consensus doesn't require everyone to agree, just the majority

So you literally just said there is a problem.

[1] https://news.ycombinator.com/item?id=27666781

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by hanniabu on Monday June 28, 2021 @07:53PM (#27669857)
You're being pedantic, it's clear what was meant even if it wasn't properly stated.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by WalterSear on Tuesday June 29, 2021 @12:52AM (#27671909)
It was clear that it was a contradiction even if you don't want to acknowledge it.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Analemma_ on Monday June 28, 2021 @06:47PM (#27669291)
Thank goodness we've gotten away from a system where the government can arbitrarily decide to steal my money and towards a glorious future where a bunch of randos on the internet can arbitrarily decide to steal my money. I feel so much better.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by CryptoPunk on Tuesday June 29, 2021 @03:55AM (#27673091)
(copy-pasting)

The DAO was a very extraordinary event that occurred under very unique and unrepeatable circumstances.

1. Ethereum had just launched. There was a sense of everything being in beta.

2. The Ethereum stakeholder set was very small, so obtaining consensus for such a controversial hard fork was much easier to accomplish than it would be today.

3. The economy on Ethereum was very small, so

a) a hard fork was far less disruptive than it would be today.

b) an undermining of Ethereum's commitment to neutrality/immutability jeapardized far fewer decentralized application projects than it would today.

4. Smart contracts were completely new, so there was a sense that people could be forgiven for their mistakes.

5. The Ethereum Foundation had promoted the idea of a DAO on their website, and several Ethereum founders had promoted the specific DAO that ended up being hacked. These facts made the DAO appear to be more than a completely third party app.

Ethereum is very different today than it was in 2016, and a DAO-scale mishap would never lead to a hard fork again.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by WalterSear on Monday June 28, 2021 @04:31PM (#27667644)
One way of reading this comment is that you concur that there's a problem.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by hanniabu on Monday June 28, 2021 @07:54PM (#27669862)
One way of reading this coontent is that most don't think there's a problem
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by vmception on Monday June 28, 2021 @07:14PM (#27669554)
They altered a state of a smart contract with consensus, although I believe this to be a mistake, they didn't roll back blocks or reorganize. Some miners used that opportunity continue a non-edited fork. I personally find this technical understanding to be distinctive from the common narrative.

I also don't think it matters and there is no consensus to do the same thing any longer.

The explanation for why they did it was because the transaction would have a very large percentage of Ether in the hands of one actor who would eventually be able to alter control of the future Proof of Stake network. If it was any other asset they wouldn't have bothered, and now much larger $ values are captured from people without any notice or fanfare. They didn't know it would be 7-9 years before Sharded Proof of Stake or the Beacon Chain would exist, and its likely that the means did justify the ends at that point in time as many of their supporters and institutional supporters had their funds in that contract.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by wyager on Monday June 28, 2021 @02:14PM (#27665454)
It's possible, but approximately no one in the shitcoin industry knows or cares enough to write fully formally verified programs.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by solomonb on Monday June 28, 2021 @03:25PM (#27666572)
Are there even any dependently typed smart contract languages that would allow you to encode and carry proofs in your contracts?

Without that I think the best you could do is model your program in some other formal verification system and then convince yourself that your model matches the actual contract.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by wyager on Monday June 28, 2021 @05:20PM (#27668310)
The Simplicity language is good. I’m sure there are other designs.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by solomonb on Tuesday June 29, 2021 @03:59AM (#27673115)
Ok I did a really shallow search of the smart contract space and it looks like the trend is towards creating simple languages that are easy to reason about and formalize their semantics. Simplicity seems to be the best example of this.

With such a language you can write proofs about the behavior of the runtime using some proof checker and then programs in it should be simple enough to reason about in a rigorous way.

What I have not seen and what I am curious about is a smart contract language more in the spirit of Idris. That is to say a more complex language design with full dependent types, which would be a lot more difficult to formalize, but would allow you to do really nice things like treat proofs as first class citizens in your actual smart contracts.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by wyager on Tuesday June 29, 2021 @08:55AM (#27675125)
I think in most cases you wouldn’t want something like idris as a smart contract language on any kind of cryptographic system (blockchain, ZKP system, whatever) because idris programs are expensive to typecheck and evaluate. It would be reasonable to construct a DSL or something in idris that compiles a compact, easily computable language though.

The idea about having proofs as values in smart contracts is interesting though. I could see a few neat applications of that.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by solomonb on Tuesday June 29, 2021 @02:42PM (#27680008)
Yeah I agree that Idris itself would be much too large, however you could write a much smaller Lambda Pi that could still enable a lot of nice features.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by miguelrochefort on Monday June 28, 2021 @03:44PM (#27666864)
Ever heard of Cardano?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by ConcernedCoder on Monday June 28, 2021 @03:11PM (#27666364)
Can there ever be 'bug free' software? As a lifelong programmer, I'm starting to think that it's impossible to write perfect software free from bugs.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Symbiote on Monday June 28, 2021 @03:28PM (#27666627)
In some cases, yes. See Software Verification [1] for some pointers.

It's massively more expensive, so you'll see it used in aerospace, railway signalling, some vehicles (trains, components of some cars), power generation and distribution, industrial processes.

Sometimes also in consumer products that have long warranties and are extremely expensive to recall/repair, like washing machines.

Just yesterday was a post on a formally-verified C compiler, used by Airbus (and others) [2]

[1] https://en.wikipedia.org/wiki/Software_verification

[2] https://news.ycombinator.com/item?id=27648735

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by kube-system on Monday June 28, 2021 @05:17PM (#27668281)
Software verification can make a system ≈ bug free from a pragmatic perspective, but, there are still holes: humans do the verification, and there are practical limitations to the scope of system and integration tests. The fact that we still find zero-days (and other bugs) on systems that have gone through software verification is evidence of this.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by staticassertion on Monday June 28, 2021 @03:58PM (#27667065)
Can a single program be proven bug free? Sure. Can we do that for arbitrary programs? No.

This may interest you: https://en.wikipedia.org/wiki/Rice's_theorem

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by dragonwriter on Monday June 28, 2021 @03:31PM (#27666681)
> Can there ever be 'bug free' software?

Sure. And if you look at sufficiently small-scale pieces of software, there is probably a lot. As scope of a software system increases, the probability of bugs rapidly approaches unity, though.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by toast0 on Monday June 28, 2021 @03:50PM (#27666962)
It depends on what you mean by bug. Often, requirements change, and now the program doesn't meet requirements; that's not something you can avoid.

Ensuring your requirements are correct is possible, but often hard. Ensuring your software meets the requirements is possible, but often hard, especially if you need to consider hardware failure or defects.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by jhickok on Monday June 28, 2021 @03:30PM (#27666658)
Technically, I don't see why it would be impossible. Seems like it is incredibly unlikely.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by 71a54xd on Monday June 28, 2021 @04:11PM (#27667300)
> Can there ever be 'bug free' software?

Only in academia

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by ma2rten on Monday June 28, 2021 @03:18PM (#27666452)
I thought that was conventional wisdom.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Kiro on Monday June 28, 2021 @02:40PM (#27665865)
I don't see it as a flaw. It's all part of the game and the fact that things like this can happen just makes it more intriguing. Obviously only valid if you, like me, see it as a futuristic/cyberpunk financial experiment or art project.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by throwaway4good on Monday June 28, 2021 @05:00PM (#27668054)
The problem here is really Ethereum and the language Solidity. Chuck full of gotchas and completely horrible to work with.

The mechanics of stable coins is really trivial and thusly should be trivial to implement and validate. Unfortunately it is not, and it is sad that the hype and investment rush inside the broader crypto field does not foster languages and platforms that actually are suitable for the few realworld use cases that exists inside crypto.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by delusional on Monday June 28, 2021 @05:08PM (#27668158)
How are they trivial? From my limited knowledge they are basically trying to stabilize a speculative asset using another speculative asset. To me it seems like an essentially impossible task.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by throwaway4good on Monday June 28, 2021 @05:23PM (#27668337)
Yeah. In theory they are broken.

But in practice they can work for a while.

They work by taking a collateral and splitting in two. The first part has some fixed value in an external currency. The other part is the rest. And that works as long as the rest has some value.

However here we are talking about programming errors in the implementation. And Solidity/Ethereum is really at fault.

How do you implement a contract in Ethereum where a certain thing happens the price of Ethereum drops below XXXX dollars? You can (as this is what MakerDAO and others are doing) only it is silly complex to do.

It really should not be.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by hanniabu on Monday June 28, 2021 @08:04PM (#27669927)
Most things are simple in theory and not so simple in practice. Also just because people write programs with bugs doesn't mean the language or platform is at fault. Sorry but it sounds like you have no idea what you're talking about.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by mattbeckman on Monday June 28, 2021 @05:12PM (#27668214)
EOS tried to use on-chain Ricardian Contracts and pair that with upgradeable smart contracts in C++ with DPoS consensus so that intent-of-code could be enforced. That's pretty "real world" but most people feel it's not unstoppable enough.

Ethereum is pretty unstoppable, but unless you use a contract proxy, your contracts are immutable and bugs that can be exploited will be exploited.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by throwaway4good on Monday June 28, 2021 @05:56PM (#27668731)
Contracts need to be written in a specialized language not a general purpose language like c++.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by hindsightbias on Monday June 28, 2021 @02:14PM (#27665447)
Until lawyers become coders or coders become lawyers I don't even see who could review them.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by bena on Monday June 28, 2021 @02:32PM (#27665751)
I actually know a guy who does both. Nothing further to add, just thought it was funny that I actually know a lawyer who does some programming.

I think he was going to college for computer science and then switched to law. Last I heard from him, he was running for a judgeship.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by scottpf on Monday June 28, 2021 @04:10PM (#27667275)
The plus side is that smart contracts provide their own "bug bounty" programme. If a smart contract that handles a coin with a market cap of +50M USD has not been breached, I absolutely trust that contract to be safe.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by dasudasu on Monday June 28, 2021 @04:48PM (#27667897)
Then it becomes a matter of game theory as to whether you cash in the bug immediately to empty the pot, or wait for it to grow even more from the positive feedback loop of it being "obviously bug free if it grew this large". For state-sponsored actors, 50M would only be a modest sum.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by ourcat on Monday June 28, 2021 @03:06PM (#27666282)
Agreed. And it's the auditors who need to get better.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by arcticbull on Monday June 28, 2021 @03:14PM (#27666396)
A lifetime of experience has shown us that code review and testing are never sufficient to eliminate bugs. What we need to do is abandon the concept of smart contracts that immutably and permanently move people's money with zero recourse - running exposed to the internet without a firewall.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by HugoDaniel on Monday June 28, 2021 @02:45PM (#27665947)
Would an "upgradeable" crypto-coin solve that flaw?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by WalterSear on Monday June 28, 2021 @04:43PM (#27667823)
Immutability is at the heart of blockchain functionality. Everything involved requires it. So, you'ld have to throw it all out and try to invent something entirely different.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by w4llstr33t on Monday June 28, 2021 @05:43PM (#27668586)
Have you heard of Tezos?

Tezos is often referred to as the first “self-amending” blockchain, which routinely adapts and adopts new features natively and automatically via its unique on-chain governance mechanism. This protocol functionality allows the system to coordinate the selection of new updates though popular voting, integrate the new updates that are selected, and compensate the developers who proposed them. [1]

[1] https://www.gemini.com/cryptopedia/what-is-tezos-xtz-governa...

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by hanniabu on Monday June 28, 2021 @08:07PM (#27669948)
Lot of buzz words to say soft forks. Also this has nothing to do with upgradeable contracts.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by w4llstr33t on Monday June 28, 2021 @09:12PM (#27670478)
> has nothing to do with upgradeable contracts.

Although the article is talking about the SafeDollar contract, there were some general points about crypto / blockchain in this thread that I was responding to. Tezos is one example that has on-chain governance, which is why I mentioned it.

If you want to provide more info about how the on-chain governance is really just done through soft forks, and why you think that's not innovative, I'd be curious to hear. I'm not huge on Tezos but I think they do some interesting things.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by hanniabu on Tuesday June 29, 2021 @04:55PM (#27681610)
Tezor governance is for protocol upgrade. They vote and push them through as a soft fork. There's really nothing different there but they market it like it's something special. This has nothing to do with contract upgrades, although ethereum is at the forefront with having contracts that are upgradeable via DAO voting.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by w4llstr33t on Wednesday June 30, 2021 @03:01PM (#27692265)
Thanks!
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by drdrey on Monday June 28, 2021 @05:48PM (#27668638)
That’s not true, upgradable contracts using proxies is a common pattern.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by WalterSear on Monday June 28, 2021 @07:05PM (#27669458)
A contract isn't a blockchain.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by imtringued on Monday June 28, 2021 @06:00PM (#27668776)
Complete with a crypto court...
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by analognoise on Monday June 28, 2021 @02:49PM (#27666012)
Upgrade to fiat currency that the rest of the world runs on and doesn't have these problems?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by tylersmith on Monday June 28, 2021 @02:09PM (#27665389)
Human beings write software that flies people around the world and shuttles people between the Earth and space. Managing money is not more important than many things we use software for.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by MattGaiser on Monday June 28, 2021 @02:12PM (#27665433)
1. Not always correctly, as seen with the 737 MAX.

2. We have a general AI exception handler called a pilot.

3. Many of those systems have hardware redundancies, so even if there is a bug, hardware can stop it. A fuse might blow instead.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rspeele on Monday June 28, 2021 @02:17PM (#27665490)
Putting your money in one of these smart contracts is like getting on a fully autonomous plane, with no pilot.

And you get a refund for your plane ticket if you reach your destination, but if you don't, whoever figured out the trick to crash the internet-connected plane gets to keep all the ticket money. And that could be the same person who wrote the plane's software.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by admax88q on Monday June 28, 2021 @03:23PM (#27666537)
Surely you see the difference between managing money on the open internet and closed systems such as planes and spaceshipts.

The incentives to break those other pieces of software are different.

Very few people are incentivized to hack planes to crash and kill people. Even fewer are incentivized to hack the space shuttle. Not to mention those pieces are rarely exposed on the public internet, or have connectivity at all.

But massive amounts of nigh-untraceable free money? Ton's of people are incentivized to go for that.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by ethanbond on Monday June 28, 2021 @02:11PM (#27665414)
Software that you can't update is borderline not-software.

It's hardware with no joysticks for humans to adjust. It just happens to be hardware that's implemented in code.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by trophycase on Monday June 28, 2021 @02:21PM (#27665565)
You can upgrade many smart contracts with proper practice.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by mustafa_pasi on Monday June 28, 2021 @02:12PM (#27665429)
Those systems have built in redundancies. They don't assume trustless 100% bug-free code.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by pfisch on Monday June 28, 2021 @02:12PM (#27665430)
I'm not saying you're wrong, but that software in most cases isn't constantly under attack from another team of engineers trying to blow up all the planes.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by mattwilsonn888 on Monday June 28, 2021 @04:55PM (#27667989)
This is one of the biggest reasons I like Cardano. It's written in Haskell and its contract language is functional and heavily inspired - meaning that code gets many of the functional benefits: it is more concise, more readable, less prone to side effects, and more often than non-functional code won't run at all if mistakes are made.

The trade offs in functional languages seem to well suited for the world of smart contracts, that I almost think of smart contracts as the retro-active problem that functional programming solves. Granted, I appreciate functional programming and good code enough where I wish all code met the standards required for FP, but the real world is much messier; when large amounts of money are so directly on the line though I think its obvious the compromise is worth it.

Smart contracts are like launching a rocket - you don't optimize for development time. FP forces a bit more safety.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by fasteddie31003 on Monday June 28, 2021 @02:01PM (#27665243)
How is that different from a traditional contract written by a lawyer? A single word could leave a huge unexpected hole in a traditional contract.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by PeterisP on Monday June 28, 2021 @02:09PM (#27665383)
In contract law, intent is the key part, so if the "hole" is truly unexpected (e.g. the most significant errors that come to mind would be an accidental omission of "not" which completely reverses the meaning of the contract; or perhaps a mistaken swap in the description of who pays whom) then it would be reasonable to demonstrate that is was not what either of the parties intended, and thus that single mistaken word simply does not matter and would be ignored.

What you do get in contract disputes where specific wording matters is in edge cases where you might reasonably assert that both parties wanted (and agreed) A or not-A for some specific situation as part of the negotiation, disputing where exactly some boundary lies - but not for the core parts or complete reversal. On the other hand, automatically enforced "smart contracts" don't make such a distinction and any typo can reverse the core meaning of the contract as well.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by tyre on Monday June 28, 2021 @02:04PM (#27665307)
Because traditional contracts can be interpreted by a court of law and adjudicated with context. There's an entire field of contract law, with hundreds of years of precedent to fix very obvious human errors, like a typo where neither party could have possibly meant what is "technically" in the contract.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by tablespoon on Monday June 28, 2021 @02:19PM (#27665535)
> Because traditional contracts can be interpreted by a court of law and adjudicated with context.

And all of that is a kind of technology that many "technology" people are far too eager to throw away for spurious reasons (often because they just plain don't understand it).

It's like if someone was working on autopilot program and rewrote it in a "modern" language, and "simplified" it in the process by dropping a bunch of "unnecessary" use cases...then it turns out that at least some of those cases were there for good reason and a bunch of planes crash. A lot of cryptocurrency and blockchain stuff is half-baked because it seems focus on faddish technology for its own sake rather than trying to actually build someone that works.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by aeturnum on Monday June 28, 2021 @02:07PM (#27665351)
Part of contract law is that the legal standard for enforceability is "reasonableness"[1]. If there is a clause in a contract that you want to exercise, but your counterparty claims they didn't understand it or intend it they can take you to court. Unless you can convince a judge that they might, at one time, have wanted to agree to the contract then the contract is not a basis for you to take that action.

Contracts have always had a healthy dose of manual debugging that have allowed them to function.

[1] The idea of "a reasonable person" is used heavily in the US legal system and has problems but it also has upsides.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by kortilla on Monday June 28, 2021 @02:03PM (#27665277)
The difference is that disputes are resolved by humans who attempt to determine intent.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by donmcronald on Monday June 28, 2021 @02:06PM (#27665337)
With a traditional contract you don't have to worry about an unrelated 3rd party coming in and taking all your assets. And if you have a mistake in a contract that governs a business relationship there's a lot of incentive on both sides to compromise (assuming it's a good relationship).
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by leifg on Monday June 28, 2021 @02:05PM (#27665324)
Regular written contracts are not automatically enforced.

Not a lawyer here but I’m guessing.

Not all legal loopholes automatically deprive you of all your savings. Intentional loop holes only go so far before consumer protection or other entities overwrite it. And if both parties are in agreement and in good standing you can figure out a way to find a reasonable compromise.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by pinky1417 on Monday June 28, 2021 @03:27PM (#27666607)
Indeed, contracts can be invalidated if they're abusive. For example, there's a doctrine in contract law called unconscionability. If you buy an airline ticket to Boston, the captain can't say upon landing "Welcome to Boston! You can pay $10,000 to deplane or we'll take you back to where you departed." Or let's say that, when you agree to the terms for a e-commerce site, buried deep in the terms is a clause saying the site gets half the money in your bank account. Sure, both parties might've technically agreed to the contract, but the contract probably isn't enforceable.

*Not a lawyer either, but I've read some introductory contract law stuff. All I know is this: you don't want to rely on the courts to save you, since they generally err on the side of the literal contract, but I don't spend much time worrying about accidentally agreeing to a contract that will sell myself into slavery.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by duxup on Monday June 28, 2021 @02:02PM (#27665274)
There's actually some chance that a poorly written contract, can be fixed / worked out between the parties involved.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by sneak on Monday June 28, 2021 @02:05PM (#27665327)
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by duxup on Monday June 28, 2021 @02:07PM (#27665362)
I'll take some chance over no chance.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by ullevaal on Monday June 28, 2021 @02:11PM (#27665417)
The parties in a dispute like that are likely to settle out of court, in a somewhat reasonable manner, instead of blindly applying the law until a judge automaton reaches a decision following the letter of the law.

With a smart contract, there can be no negotiation and attempt at reconciliation. The price here will never recover from $0, so at a single point in time $248,000 was transferred from bag holders to beneficiaries.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by exdsq on Monday June 28, 2021 @02:05PM (#27665325)
Lawyers argue over ambiguities or mistakes and use precedent to solve these issues, smart contracts don't have that extra level of protection.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by breck on Monday June 28, 2021 @02:29PM (#27665686)
> I simply don't think it's possible for human beings to write good enough software for smart contracts.

I agree, but think it's fixable. I believe we have missed a natural platform in between binary notation and computer languages.

I believe there is a 2-D dimensional binary. Simply using a grid (with an array of cells forming a line, and lines stacked on top of each other—a spreadsheet basically), we can drop *all* syntax characters. The only thing you have is your cells and your semantic words.

Not only does this make tooling and languages much simpler (which will have big network effects), but you gain new fundamental complexity metrics which may turn out to be incredibly important in designing simple, bug free systems.

I personally really like crypto but it's not one of my main interests. I have been working with some folks in the space on using these ideas to build a new type of blockchain from the ground up. I bet that the biggest blockchain in the future will be a higher dimensional one, based on Tree Notation or derivatives of the core ideas.

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by jcranmer on Monday June 28, 2021 @02:49PM (#27666011)
> I believe there is a 2-D dimensional binary. Simply using a grid (with an array of cells forming a line, and lines stacked on top of each other—a spreadsheet basically), we can drop all syntax characters. The only thing you have is your cells and your semantic words.

I fail to see how this helps.

The reason why bugs crop up all the time in software isn't because syntax is confusing. It's also not because semantics is confusing--plenty of bugs have perfectly clear, well-understood bugs. The problem is that we as programmers don't think about how our software could fail. We don't ask ourselves "could this multiplication overflow?" frequently enough. We don't look at code and ask "who made sure this pointer points to valid data?" We believe that there's no way the price of an affiliated token could ever reach exactly $0, so we assert that it can't happen.

The way you avoid these bugs is to just simply make it impossible for the system to get into certain states. It's already the case with statically-typed languages that it's impossible to pass a string to a function that expected an int. If you design your API right, you can make it impossible to get an index into an array that is out-of-range (although this is way too rarely done). But, even then, you will still find people who will confidently use the escape hatch to say "this string is clearly UTF-8, I know it is from outside experience, so don't bother checking."

Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by oivey on Monday June 28, 2021 @03:23PM (#27666539)
Just to add, things like type checking are the comparatively easy part. The world itself and many of our constructs for thinking about it are not well defined. The trouble in reconciling these things are why things like appeals courts exist. Smart contracts built on this ill defined world will always have bugs. The world isn’t going to become significantly more well defined for smart contracts, either. If that were possible, we wouldn’t have those aforementioned higher courts.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by breck on Monday June 28, 2021 @03:01PM (#27666215)
All parts in a system have a probability of failure. A bug in a well-engineered system is only a problem when a long series of things simultaneously go wrong. Tree Notation (2D languages), can be used at all layers, from microcode to assembly to system langs to interpreted langs to user facing high level langs. It's simplicity will decrease the probability of failure at each layer of the stack, causing a huge improvement in total reliability of systems. It even works great with paper! Easy to make fallbacks for when the network goes down.
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by Jasper_ on Monday June 28, 2021 @02:43PM (#27665915)
did you just reinvent Befunge, but unironically?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by breck on Monday June 28, 2021 @03:12PM (#27666372)

    >              v
    v  ,,,,,"OH NO! "@
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by rakhodorkovsky on Monday June 28, 2021 @02:53PM (#27666079)
Can you elaborate on your last paragraph or point me somewhere?
Re:SafeDollar ‘stablecoin’ drops to $0 following DeFi exploi... by breck on Monday June 28, 2021 @03:05PM (#27666271)
I can't yet, sorry! My general research on Tree Languages, as well as a number of products I make, is all open source and public domain, but (sadly since research funding is not so advanced) I do have to be a bit pragmatic and make some money here and there. There might be some bits and pieces out there.