Live data from Hacker News

Escaping the Dark Forest

samczsun.com

51–60 of 142 posts

Re: Escaping the Dark Forest

#51

Earlier quoted context omitted.

It's way safer and less complex than you would expect. Most staking contracts are a copy-paste of two basic staking contracts (from synthetix and sushiswap), so it's enough to do a text diff and see what was changed, which is trivial. For more complex contracts that do something more, funds at risk are the best bug bounty there is - in the current environment if something had >$10M for a month and wasn't hacked, it m…

As an investor who is not into crypto, I don't understand this comment, let alone use it to correctly price the risk of crypto.

agreed; this reads like someone explaining their casino good luck charm strategy.

Re: Escaping the Dark Forest

#52
Very interesting story, it really does sound like a scifi thriller to me.

It also makes me wonder what type of legal battle would ensue if a blackhat were to have taken all of these funds instead, I'm not sure I've seen any public high-profile cases like that yet.

Re: Escaping the Dark Forest

#53
post #48
post #29

Earlier quoted context omitted.

My understanding of the front-running issue in these two cases is that a human being found vulnerabilities in particular smart contracts, which would allow anyone to claim the value protected by a particular contract. The human beings wanted to use these vulnerabilities to transfer the value somewhere, such as to an escrow account or to the original owners of that value. However, since the vulnerabilities allow anyon…

I think it's an important detail to point out that legitimate transactions mostly aren't vulnerable to the "Dark Forest" issue. A lot of comments I'd seen on the original "Ethereum is a Dark Forest" blog post seemed to be under the impression that this was a general Ethereum issue affecting normal users.

Arbitrage trades and related activities like MakerDAO keepers would be legitimate transactions vulnerable to this (essentially someone else extracting the value from their discovery). Granted that is a very small subset of users.

Re: Escaping the Dark Forest

#54
post #45

Earlier quoted context omitted.

Imagine that everyone agreed that just one slow computer would handle banking, contracts, and the stock markets for the entire world. This gets rid of any pesky concurrency issues. To move money from person to person, or to execute contracts or programs, you write up a sticky note with what you want to have done, sign it, and attach some money to it. Once every couple minutes, the computer administrators come out, co…

It sounds like the whole system has a huge public goods problem. In the real world stock market, buying TSLA is a signal that you believe the price is good, and if you're a big enough investor, your buy might move prices up before you complete. In this world, other people can steal that signal and move the price before your transaction even starts. Isn't this a design flaw?

There are ways to make marketplace contracts which allow buy and sell orders like this that aren't vulnerable to front-running. It's possible to have the buy and sell orders happen off-chain and then be settled on-chain later (Loopring works this way; there are other benefits to this system too such as speed of execution and lower fees), or for a marketplace contract to require orders to be preceded by a precommitment transaction, which includes a hash of the upcoming order, so the upcoming order can't be frontrun because the frontrunner would need to do their own precommitment transaction first.

Note that a marketplace contract like this isn't the only kind of smart contract; it's not the case that all smart contracts have the potential for front-running vulnerabilities. For example, there are smart contracts that do things like manage community funds and require people to vote on how the funds are spent, which don't do anything that could be vulnerable to front-running.

Re: Escaping the Dark Forest

#55

I guess the take away here is that if you have the right connections then you can bypass the system.

Right? Forget bugs in the contract system, if you have pools writing whatever history they want in private that seems to defeat the entire point.

Re: Escaping the Dark Forest

#56
One of my good friends has a saying, "Humans are really good at optimizing the hell out of the wrong thing." I can't help but think that when reading about any sort of heroics involving blockchain.

Re: Escaping the Dark Forest

#57
post #32
post #25

Earlier quoted context omitted.

Well, what are the fixes? Writing "smart contracts" is not meant to be for anybody but very seasoned developers. Also if you write a contract and do not get it audited by 3rd parties than nobody will (or should) take for anything other than a toy application. That's just the nature of writing immutable code that potentially transfers a value. About Solidity in particular - I think most people would say it's not the b…

I've posted this before [0], but it's still apropos regarding the foolishness that is Ethereum. [Ethereum] only makes sense if all of the following obtain: (a) the code is 100% bug-free (b/c accidents cannot be rewound) (b) all code-writers are 100% honest (their code does what they say) (c) all contract participants are 100% perfect code readers (so as to not enter into fraudulent contracts) (Strictly speaking, only…

And yet the marketcap of the funds locked in a subset of contracts on Ethereum is almost 10 billion today (https://defipulse.com/) and I have been using a popular contract wallet for a while to hold my funds and transact with friends. So clearly it cannot be nearly as catastrophic as you mention, no?

Re: Escaping the Dark Forest

#58

Earlier quoted context omitted.

It's way safer and less complex than you would expect. Most staking contracts are a copy-paste of two basic staking contracts (from synthetix and sushiswap), so it's enough to do a text diff and see what was changed, which is trivial. For more complex contracts that do something more, funds at risk are the best bug bounty there is - in the current environment if something had >$10M for a month and wasn't hacked, it m…

As an investor who is not into crypto, I don't understand this comment, let alone use it to correctly price the risk of crypto.

Stay away from putting money into unique smart contracts that haven't been running for a long time with a lot of activity. Stay away from smart contracts that are custodial (where the creator is given privilege to all depositors' funds).

Re: Escaping the Dark Forest

#59
post #18

Earlier quoted context omitted.

Can you elaborate? Why do you find that "smart contracts" are built on a shaky foundation?

Because there is no real formal verification process for smart contracts, it's extremely easy to slip bugs into the contract code, the contract itself is generally immutable (can't fix bugs), and the effects of a breach are generally catastrophic and irreversible. Need more reasons?

You are incorrect. Contracts are immutable but you can upgrade your application. There are different patterns, one where you make a shell contract that has pointers to contracts with actual business logic.

Also, there are patterns where the user needs to confirm that yes they want to use the new version.

There are also systems of insurance on contracts.

Re: Escaping the Dark Forest

#60

Makes me think of salvage operations, and then raises the question of how do people get paid? They're providing a valuable service. I think in shipping there are both conventions and an ability to quickly negotiate that allows contracting for a salvage ship to rush to the aid of a grounded or sinking container vessel.

Yes, there are. It's the Lloyds Open Form.[1] "No Cure - No Pay". This is the standard deal for salvage operations, and is well over a century old. It's very simple, since it's intended to be executed by someone on a sinking ship. It's sufficient for the captain of a ship in trouble to contact a "salvor" and say they accept the standard Lloyds Open Form. A message "ACCEPT SALVAGE SERVICES ON BASIS LLOYDS STANDARD FORM LOF 90 NO CURE NO PAY ACKNOWLEDGE" is enough.

Contractors’ basic obligation: The Contractors identified in Box 1 hereby agree to use their best endeavours to salve the property specified in Box 2 and to take the property to the places stated in Box 3 or to such other place as may hereafter be agreed. If no place is inserted in Box 3 and in the absence of any subsequent agreement as to the place where the property is to be taken the Contractors shall take the property to a place of safety.

The Contractors’ remuneration and/or special compensation shall be determined by arbitration in London in the manner prescribed by Lloyd’s Salvage Arbitration Clauses in force at the date of this agreement.

That's the deal.

You need some agreed way to resolve how much the job is worth for this to work. The Lloyds Open Form is an agreement to do the job and discuss later how much it's worth. That's generally settled by insurance adjusters. It's much like the aftermath of auto accidents.

How much does the salvor get? 15% - 35% of the recovered value, reports Lloyds.[2] Of course, salvors work under tough conditions. They have to have equipment and people ready 24/7 to go somewhere and do something. That's expensive. Some classic worldwide names exited in the past decade. Mammoet and Titan both dropped out.

All this is against accidental losses, not against an adversary. Where there's an opponent, it's a much tougher problem. Marine salvage is vs. the ocean. Whether this model can be made to fit programmed contract problems or ransomware is a big question. One worth pursuing.

[1] https://www.lloyds.com/market-resources/lloyds-agency/salvag...

[2] https://www.tugadvise.com/wp-content/uploads/2015/10/lloyds-...

Post reply on HN