News for hackers. Stuff that matters.
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?