News for hackers. Stuff that matters.
Re:Did I just lose half a million dollars? by hedora on Sunday January 30, 2022 @10:18AM (#30137887)
From what I can tell, the underlying issue is that everything is spaghetti code written in a dynamically typed language.

Ignoring that, it's nuts that the best practice is "send a little money, and see if it works". Apparently they don't even have a working transaction simulator that just runs the relevant logic on your laptop so you can see what it will do.

Re:Did I just lose half a million dollars? by xmaayy on Sunday January 30, 2022 @10:40AM (#30138058)
I think you can do test transaction off-chain, I think they're called test-nets and you can use them through many wallets, and even online IDE's[1]. Unfortunately, crypto is still at the stage where it's built for devs and technically minded individuals, and its pretty user hostile. Sending directly from wallet to wallet is a pretty low level thing to do, and generally people should be executing transactions through swaps or other DAPP's, which to me seems like we're working against the empowerment principle of crypto

[1] https://remix.ethereum.org/

Re:Did I just lose half a million dollars? by te_chris on Sunday January 30, 2022 @11:41AM (#30138615)
Look at NFTs. The empowerment pricnciples are being actively killed by millions of VC dollars. Opensea are nominally recording transactions on a blockchain - but none of the actual meat. Everything 'real' lives inside their centralised system.
Re:Did I just lose half a million dollars? by kylebenzle on Sunday January 30, 2022 @02:49PM (#30140433)
A LOT of people are doing it wrong but there are still good projects out there. The two that come to mind are Monero and Bitcoin Cash. Both still work as designed and have low fees and/or instant and/or anonymous transactions.
Re:Did I just lose half a million dollars? by EVa5I7bHFq9mnYK on Sunday January 30, 2022 @07:47PM (#30143027)
The underlying issue is that everyone wants to make money. And the quickest way to make money in crypto is to create a new coin, token, smart contract, NFT, web3, whatever. Thus ever increasing complexity.
Re:Did I just lose half a million dollars? by Zababa on Sunday January 30, 2022 @04:16PM (#30141189)
> Ignoring that, it's nuts that the best practice is "send a little money, and see if it works".

That's what I did the first time I did a bank transfer between two of my banks accounts. Maybe that's just me being paranoid but when sending money I like to test it first.

Re:Did I just lose half a million dollars? by tata71 on Sunday January 30, 2022 @08:48PM (#30143510)
> Ignoring that, it's nuts that the best practice is "send a little money, and see if it works".

This passes the "does it sound like email?, it might be decentralized!" smell test, anyway.

Re:Did I just lose half a million dollars? by kall on Sunday January 30, 2022 @11:14AM (#30138414)
I think you can do just that with ganache-cli.

I haven‘t tried it, because I don‘t do much crypto stuff at all, but I thought this specific functionality, to dry-run any scenario, from any account, was very intriguing.

Re:Did I just lose half a million dollars? by fortran77 on Sunday January 30, 2022 @11:12AM (#30138395)
> From what I can tell, the underlying issue is that everything is spaghetti code written in a dynamically typed language.

We need to re-write this in Rust before there can be universal acceptance!

Re:Did I just lose half a million dollars? by nailer on Sunday January 30, 2022 @01:51PM (#30139908)
Already done and it’s already processed more transactions than ethereum and bitcoin have in their entire history combined, as well as having more developers.

https://news.ycombinator.com/item?id=30135054

Re:Did I just lose half a million dollars? by buster on Sunday January 30, 2022 @11:41AM (#30138622)
As much as I like rust and think this would help increase acceptance for many tech affine people, this issue was a bad design decision, which is even worse. I don't think I will touch anything crypto until I can trust that the system is designed well.
Re:Did I just lose half a million dollars? by landemva on Sunday January 30, 2022 @04:30PM (#30141330)
You can code in whatever can compile to byte code for the EVM. Solidity is typically the language and is statically typed. https://docs.soliditylang.org/en/v0.8.11/types.html
Re:Did I just lose half a million dollars? by thiagobbt on Sunday January 30, 2022 @01:48PM (#30139877)
I believe most contracts on the Solana network are written in Rust
Re:Did I just lose half a million dollars? by derivagral on Sunday January 30, 2022 @10:33PM (#30144146)
https://ethereum.org/en/developers/local-environment/

several of these projects will set up a local chain with presets to test exactly this. probably worth doing before sending large amounts to random contracts.

Re:Did I just lose half a million dollars? by kylebenzle on Sunday January 30, 2022 @02:47PM (#30140421)
How can you be so naive about this topic yet confident enough to add your 2 cents? There are been test nets from day one and running one yourself is trivial.
Re:Did I just lose half a million dollars? by anthonygd on Sunday January 30, 2022 @08:11PM (#30143226)
Realistically if you just want to try out someone else's contract in a safe environment, the existence of the test nets is entirely irrelevant.

The contract is going to be at a different address, all the accounts involved are entirely different, the state of the contract is different. Even proving a contract at one address is the same as the contract at another address is non-trivial.

Pretending the existence of a test net proves anything is a lot like pretending the availability of source for your OS, compiler and dependency stack proves something. Maybe possibly for a professional with unlimited time, but that's it.