Fe: next generation smart contract language for Ethereum
fe-lang.org
fe-lang.org
"Improved decidability - Fe limits dynamic program behavior to improve decidability and allow more precise gas cost estimation."
I think it would be helpful to see an example of that or a side-by-side comparison, if the goal is to win over Solidity devs. If I can really save gas or prevent common bugs more easily, the page needs to do more to sell that point.
With all the investment in blockchain (as you yourself mentioned in another comment), and so much money riding on the correctness of contracts, it seems like the incentives should line up to develop proper, usable formal methods (starting with backing down from Turing-completeness for the most part, most likely). That would be a pretty nice side effect for us skeptics. That's honestly what I was hoping for, with OP.
Some parts of gas estimation can be done statically, but some of the cost of certain operations are dependent on the data being loaded from the state. I’d like a tool to set an upper bound on gas usage (current approach is to execute the tx on pending state and add 10-30%), but solidity does not provide one.
https://ethereum-viper.readthedocs.io/en/latest/
Simplicity was supposed to be the "technically better" language:
https://blockstream.com/simplicity.pdf
I'm sure there were a few others I can't think of right now.
Solana uses Rust for its contracts, and I can't mention Solana or any of the above without someone pointing these platforms died specifically because people writing these contracts like them being "javascript like".
There's a really good comment on Solidity here, the fact it's "won" says a lot.
The benefit of this is that you get a high throughput system that inherits the same security guarantees as the L1. This is why something like a ZK rollup operator cannot "steal your funds" compared to something like a CEX operator.
Edit: also unrelated, but I hate the tendency for crypto fans to keep moving the conversation to new analogies. The vast majority of threads here are analogies and buzzwords without very concrete technical discussion of the merits of the architecture.
> isn’t it just a highly over engineered cloud hosted but sharded web app?
A bit ironic.
The former also employs an execution stack for running transactions but it is much more limited and I believe Turing incomplete (as a conscious choice).
Such a system, where stakeholders are required to trust coders, destroys the benefits you claim. You now have the bottleneck of required human vetting/interacting. -This- is what people mean when they say such a system cant work in practice and is essentially no better (and definitely has lots of strange quirks like gas fees) than existing financial instruments.
Not sure what you are talking about. First of all I did not argue whether smart contracts have benefits (the thread was about L2 chains in the ETH context and whether that was overengineered).
Secondly, I would suggest you try ETH out. With the bubble over, gas fees are back to reasonable values. Buy a hundred bugs of ETH on Coinbase, move that to your Coinbase wallet and store some of it in the AAVE lender contract. While you might lose about $10 in gas fees and Coinbase fees, you’ll earn an interest rate on a decentralized network not involving banks. I found that pretty cool when I tried it for my first time.
The test may be more fun if you happen to know sb willing to sell you ETH directly and guide you through the ramp up phase.
Anyway, doesn't seem like we are going to see eye-to-eye and no one has the energy to refute the complex uselessness that is crypto-currency. Dan Olson did a better job than I ever could -
case in point, this fun little copy-pasta you've given us:
"Secondly, I would suggest you try ETH out. With the bubble over, gas fees are back to reasonable values. Buy a hundred bugs of ETH on Coinbase, move that to your Coinbase wallet and store some of it in the AAVE lender contract. While you might lose about $10 in gas fees and Coinbase fees, you’ll earn an interest rate on a decentralized network not involving banks. I found that pretty cool when I tried it for my first time.
The test may be more fun if you happen to know sb willing to sell you ETH directly and guide you through the ramp up phase. "
My favorite part about this is that you deliberately explain _none_ of it (don't worry, I'm really not interested). Do you really think average people know what all this is? Or are you just hoping they'll ask so you can cheerlead each concept individually?
Have you ever tried to explain what a bank account is to a person who’s never used money?
Alternatively, had you tried to explain what the World Wide Web is supposed to be about to a boomer back in the 90s?
Then maybe you begin to understand how I feel when interacting with people like you.
(from https://www.stephendiehl.com/blog/non-innovation.html)
Gas costs of thousands to deploy a contract are an anomaly.
That’s not right. Here’s a recent contract that cost less than $20 to deploy.
https://etherscan.io/tx/0xd21e1757649ace2fa5d9a1c0f36ddfb495...
Transactions on Ethereum all contain a certain amount of data which will live on the blockchain forever (often ~100 bytes, for non-contract-deployment transactions). Ethereum processes one block every 12 seconds, and blocks can contain up to 1 MB of data, so effectively people "bid" to get their transactions on by including the fee-per-byte they're willing to spend with their transaction (I'm glossing over a lot here, they're also bidding on computation resources for transactions which call code, and there is some dynamic targeting of fees, all to say that block sizes are typically much closer to 80 KB than 1MB)
In order to get an idea of how much it would cost to deploy a contract, you first compile it (get the bytecode size) and then look at the typical "gas cost" (what transactions are currently paying in fees). You can get this data from the chain directly, or go to https://etherscan.io/ and look at the "Med gas price" (currently 14 gwei, or 0.000000014 ETH). Your dev tooling can tell you how much gas should be required to deploy the contract based on the bytecode size, the storage (space in the virtual machine reserved for that contract's variables), and the amount of computation that needs to happen in the contract's constructor.
Once you know how much gas will be required to deploy the contract (the "gas amount") you multiply that by the gas price to get an amount of ETH. A very large contract might cost 8 million gas to deploy (gas is basically a unit used by the Ethereum virtual machine to price operations and storage). So if that's you, you multiply that by 0.000000014 ETH and get 0.112 ETH at the current gas price. If you want to pay less, you could always submit your transaction with a lower gas price (like 0.000000001 ETH lets say, to pay closer to 0.01 ETH); it'll just take longer to get validated (an indeterminate amount of time depending on how heavily the network is being used)
Obviously I've glossed over a lot here to make things more approachable, but hopefully that explains the situation well enough.
By the way, the tooling around blockchain development is still really primitive relative to its complexity; but contract deployment gas estimation isn't too hard for anyone doing it.
There's a limit on the size of a contract, and the largest contract one can deploy to Ethereum would cost about $120 at today's gas price and ETH price. For example, this transaction from a couple of hours ago deploys a contract that is at the contract size limit: https://etherscan.io/tx/0x5ed0c6d517fa0bf7c5074bf49ae0f73633...
You can see they spent $120 in gas fees to deploy it.
When the network is incredibly busy, of course, this could be much higher (but when it's dead, it could also be as cheap as $40)
At the peak of the bubble (ETH price around $5000), you're right, contracts this size would have been "thousands of dollars to deploy" when the network was congested. Even then, most contracts would have been cheaper, and you could still deploy contracts for $100-200
If ETH (the token) continues to appreciate in price then it's entirely possible "thousands of dollars" for a contract could become the norm, but that's obviously not a certainty, and if that does happen (before network improvements which may also decrease fees), there are always alternative blockchains and L2s that you could deploy Solidity contracts to.
Even if we pretend for a moment that there was some merit to the “web3 smart contract”, by now it should be painfully clear to anyone involved that this is a technological dead end.
There are a many more realistic ideas to explore and research instead of wasting time on crypto unicorns.
As every good old pyramid scheme, the crypto ecosystem needs you to believe that investing time and money has merits. That's how the few at the top benefit from the whole scheme.
Because I love financial products that help me retain my earned money, and am avid about getting the best deals. Right now I have 0$ transactions, 3.75% actual guaranteed returns on cash (not a 50% chance of being worth $0 by next year a la FTX, genesis, blockfi, etc.), 3% cash back on transactions that cost a business 2.5%, and would love a cheaper HELOC than traditional banks. However, none of anything you mentioned actually does any of this better, the things that 99.8% people actually want, rather than speculative "investments" they're hoping to sell for more later.
What's that YC slogan again? "Make something people want."
https://fred.stlouisfed.org/series/M2SL
Ethereum offers a way to step outside of it and is creating a decentralized, deflationary money.
ETH is also inflationary… Both of your provided charts show large currency issuance and only very slight recent drawdowns.
As I expected; a whole bunch of buzz words and given the chance to produce a single real example, no actual use case for the 99.8% consumer.
Deflationary money means "whoever got in early and got the most money is going to be ultra-rich forever, unlike the poor sods who get in years/generations from now"
https://wtfhappenedin1971.com/
If you think about it when you turn on a money printer, those closest to it (elites, the well connected) are going to catch most of it.
Which graphs? I wasn't talking about 1971 or the largely US-specific chart of not compensating people.
I'm talking about deflationary currency. With a deflationary currency people who got in early and got the larger part of the pie will for ever be ultra rich, and get richer.
Because the money you get now will only increase in value over time. So you got in early and got a single coin X for something. Congrats, you're nearly infinitely richer than, say, your grand kids who'll be getting fractions of a percent of that coin for that same something.
What does this reference?
Heartbleed, Shellshock, Log4Shell, Spectre... there are plenty of examples of serious flaws found in software far more mature than these smart contracts. Audits and testing only confirm the presence of bugs, not their absence.
Tokens are also fully programmable, and that enables a number of primitives that are not possible with stock certificates or grain contracts. For one, they can easily be held within a multisig smart contract wallet, governed by configurable rules for spending (in an M-of-N scheme). This makes it frictionless to set up a small group or organization on the internet even if the participants are in 7 different countries. This helps to coordinate human and financial capital, because rules can be programmed in the DAO or multisig to prevent one person from stealing all the funds. Since everything is on-chain, everything is above the board. Very difficult to arrange this with traditional corporate checking accounts, and even then, one executive ultimately controls the account.
Those two alone would be huge and worth it for humanity, but I listed more on that list and I'm running out of time for a reply. But I invite you to analyze the products yourself. Try them on testnets for free if you like.
"Rules can be programmed (in esoteric programming languages using new made up terms for everything)" and frictionless in one sentence. Smh.
With a multisig smart contract wallet (https://gnosis-safe.io/), it's frictionless to setup a simple smart contract for holding the treasury and for enacting M-of-N rules on any expenditures from that multisig. This may be a 3 of 5 signature requirement or even a 5 of 5 signature requirement. It's fully programmable. So when starting a Web3 project, it's possible to jump into a partnership with a group and be productive without having to worry as much about establishing trust, navigating five different jurisdictions for employment agreements, or centralizing control in a single person.
In addition, far more elaborate org structures are possible, and there exist plenty of tooling for making those happen without even needing to know how to code (https://juicebox.money/, https://daohaus.club/).
Solidity is not all that esoteric. It's similar in syntax to JavaScript, but it's statically typed. There are also widely recognized and audited open source code bases to build off of (https://www.openzeppelin.com/contracts). And tons of developer tooling (https://docs.ethers.io/v5/, https://wagmi.sh/), along with countless resources on the web.
This is sufficiently rare that "traditional" finance hasn't come up with a product for that. Or maybe it has, but it's just as obscure as Gnosis.
> It's fully programmable.
You keep saying this as if this was a desirable quality.
> Solidity is not all that esoteric. It's similar in syntax to JavaScript
It doesn't make it not esoteric. It doesn't make it Javascript.
It's its own language with its own idiosyncrasies, its own lingo, its own terminology (so much of the terminology in the crypto space is just absolutely random bullshit people came up on the spot for things that already exist in the language).
There are no tools, no way to debug, no way to revert a deployment, no way to upgrade a "contract" etc.
And it's so bad that repeated audits and bug hunts routinely fail to find issues in the code of even the simplest contracts.
Traditional finance doesn't have an answer for this. It's not rare at all. I personally work with people from Argentina, Denmark, Canada, Serbia, Croatia, Australia and Hong Kong. It's very common to work in a fully distributed online manner, using chat products to communicate. It's very easy to meet people in online hackathons, on Discord servers, on gaming platforms, etc these days, from all over the world.
Yes, programmability is always superior to non-programmability, as it is a superset of non-programmability. After all, you could always encode whatever non-configurable properties you wanted as part of the ruleset for the contract or asset.
> It doesn't make it not esoteric. There are no tools, no way to debug, no way to revert a deployment, no way to upgrade a "contract" etc.
At this point Solidity is 7 years old. There are more than 200K developers that have learned it (50K from ETHGlobal hackathons alone: https://ethglobal.com/), 20K stars on Github, 44 million smart contracts have been deployed to ETH mainnet, 60K people watched Devcon Colombia vids a couple weeks ago (6K attended in person), 20K attended ETHDenver earlier this year, etc.
There's tons of tools: Hardhat (https://hardhat.org/) - for JS based task running, deployment, testing, debugging, etc. Even deploys a local chain or allows you to fork a copy of mainnet locally to test against.
Foundry (https://getfoundry.sh/) - if you want to run your build/test/debug tool-chain in Solidity
WAGMI (https://wagmi.sh/) - Robust React hooks for client-side interactions with smart contracts
Ethers.js (https://docs.ethers.io/v5/) - Client side lib for interacting with Solidity primitives like 256 bit numbers
Block Explorers like https://etherscan.io/ or https://beaconcha.in/
In the pareto distribution of smart contracts, the most consequential contracts get the most eyeballs, and after they've been deployed for years without hacks, in spite of holding billions in user funds, you can be reasonably assured of their security. If not, I invite you to use your superior powers of analysis to find a bug in:
Uniswap V3: https://github.com/Uniswap/v3-core (Currently open $2.2M bug bounty plus additional $3M reward for the Universal Router and Permit2 contracts https://uniswap.org/bug-bounty)
Or Aave V3: https://docs.aave.com/developers/deployed-contracts/security..., which has been audited by ABDK, OpenZeppelin, Trail of Bits, Peckshield, and SigmaPrime (up to $250K for critical bugs: https://github.com/aave/bug-bounty).
Also, see: https://docs.openzeppelin.com/learn/upgrading-smart-contract... about upgrading smart contracts. Not always desirable, but of course, entirely possible, thanks to the proxy pattern. There's also the alternative of doing "migrations" by wrapping an asset in another contract.
The value of decentralized platforms is that it gets rid of the tech bros and financial scams. Anyone, anywhere in the world, can make transactions independently, without having to blindly trust that the funds are actually there.
If people transacted using DeFI, there would be no FTX, no Coinbase, no VC trying to leech off the masses.
Ah yes. No scams or tech bros. Except the implicit blind trust in programs written in esoteric programming languages on esoteric VMs that are rife with financial scams.
> If people transacted using DeFI, there would be no FTX, no Coinbase, no VC trying to leech off the masses.
Except that Uniswap is currently almost 100% automated bots "swapping" fictional tokens. And for anything useful you depend on centralized oracles. And for anything related to actual real world you must go through centralized entities.
Even if that was true (which it is not) it is still valuable for the people that use it and for the liquidity providers who can employ their capital in a reasonably safe manner without relying on banks.
All I need is to have a market of people willing to trade. If you don't see the value of it, fine. But just go find someone who got their PayPal account frozen with no recourse and ask them how much they would value the ability to trade in a permissionless network.
I didn't say "absolute vast majority of tokens". I said "absolute vast majority of things happening on uniswap".
> All I need is to have a market of people willing to trade.
There's absolutely a market for people willing to trade. If there wasn't, Amazon, eBay, AliExpress etc. wouldn't have been multi-trillion behemoths they are.
Uniswap isn't a "market for people willing to trade". It's a market for people willing to engage in currency speculation and flash loans using fantasy tokens. Even you are saying this. Quote: "make use of Uniswap to exchange, e.g, Storj/BAT/ETH for DAI/USDC/EURS". There's nothing new or revolutionary in this.
Speculation in markets are always going to exist. We have people making a living by speculating on the price of commodities, forex, company stock and event insurance policies. You calling them fantasy does not change the fact that there are people willing to trade them and does not change the fact that there is value in being able to do this without a central authority.
I gave the example of Storj/BAT precisely because these are business who are paying actual money for a service (Storj is paid for those hosting data, BAT distributed by Brave as a reward for those willing to receive privacy-protecting ads).
You could argue that the tokens themselves are not needed and that we could do it with cash, but that would be missing the point: such systems could not work on a worldwide scale as easily as they work now, and the speculation is a desired property of the system. Most people are getting into the network not because of the $5/month they get from seeing ads, but because of the possibility of the received tokens going up in value. At the same time, the people who do want to sell their tokens and get cash can do so.
I am not. I am describing the absolute vast majority of cases on Uniswap.
> Speculation in markets are always going to exist. We have people making a living by speculating on the price of commodities, forex, company stock and event insurance policies.
Yes, but you're effusing that currency speculation and flash loans (majority of Uniswap) is this some new grand thing that never existed before. Reality disagrees.
> such systems could not work on a worldwide scale as easily as they work now
Forex was (and probably still is) a huge global market. I know because my friends spent a lot of time on it in early 2000s. Global market works easily, and at scale. For much longer and at much larger scale than anything crypto maximalists can even dream of.
> Most people are getting into the network not because of the $5/month they get from seeing ads, but because of the possibility of the received tokens going up in value.
Yup. Pure speculation. You're pretending it's something new, novel, and hasn't ever existed before.
At no point I said that what makes Uniswap (or crypto in general) valuable is the speculation in itself. The value of crypto is in the ability of doing things permissionlessly.
The value of Uniswap is not to that it is "better" than Forex. The value of Uniswap is that it lets people exchange value permissionlessly.
The value of ENS is not that it is "better" than the ICANN. The value of ENS is that it lets people control a stable, unique, global identity permissionlessly.
The value of crypto payment networks is not that it is "better" than Visa. The value of crypto payment networks is that it lets people make transactions around the world permissionlessly.
The value of Storj
> my friends spent a lot of time on (Forex) in early 2000s.
After jumping through all the required hoops, putting together minimum deposit requirements, passing KYC to show their legal standing with who-knows how many financial authorities... but what about those people who wanted to do Forex, but failed to pass any type of requirement? What about, e.g, people in Argentina who are forced to buy and sell dollars at the totally artificial rate imposed by the government?
> Global market works easily, and at scale.
If it works for you, great! Plenty of people who don't have the same luck.
> For much longer and at much larger scale than anything crypto maximalists can even dream of.
Nice strawman you got here. Where in this conversation was there any type of "maximalist" proclamation?
chainlink etc
Which are entirely dependent on centralised oracles etc.
Hint: if there are only 2/5/10 centralised oracles providing you with data, no amount of fluffy "decentralised tamper-proof inputs" statements make them such.
"cash-like" does a lot of heavy lifting here.
Only Monero and Grin have any real expectation of privacy. Chain analysis is pretty mature, and the records exist forever.
and consumers cant get enough of them and will shoulder costs of interacting with them
the most irrelevant part of this equation is debating why consumers are spending money on developer’s internet vending machines
its a market with demand, the market is telling you what to do for half a decade and yet
Every cloud platform has a free tier that can probably handle the entirety of crypto, and then some.
A Raspberry Pi is a more efficient platform that realistically competes with "web3"
nobody cares about the technical feasibility of running a blockchain, development routinely requires local deployments
Yup. In a response to "Even if we pretend for a moment that there was some merit to the 'web3 smart contract', by now it should be painfully clear to anyone involved that this is a technological dead end."
Of course there's no better platform than "web3" for developers who do the "web3" stuff. "Windows is the best platform to develop apps for Windows".
However. As a platform web3 is a failure. And for developers literally everything outside crypto is a better platform. For users, too.
Recognizing that makes you way better of a developer and entrepreneur than the 10x coder hunting for exploits and bug bounties, where making money is the goal
Cheaper than what?
That's the beauty of vague unverifiable statements like "for developers, there is no platform that realistically competes with 'web3 smart contract'." For any counter example you can always say "that's not what I meant"
> Recognizing that makes you way better of a developer and entrepreneur than the 10x coder hunting for exploits and bug bounties, where making money is the goal
Was this sentence written by ChatGPT?
the closest I can think of is Firebase or AWS Lambda (or similar compute instance) with some kind of rudimentary database or shoehorned in variable storage. these all charge by number of executions, bandwidth and storage, even geographic location
smart contract deployments would be cheaper than that, via a one time cost for the developer, and have unlimited use. it is also convenient and valuable that the smart contract cannot be deplatformed
I don't really see Firebase or AWS or other compute instances competing on any of these fronts, but if you know of a counterpoint I would love to check out their pricing and usage page
smart contracts are read for free and are read just as much as any api or application, whereas reading from my API that's doing nothing would still start charging me, the developer, and not be as cheap and using bare metal I have hosted somewhere or locally would have high maintenance or performance problems just reading and sending responses at the level necessary
writing is paid for by the consumers, but again here I agree that this level of activity would fit in the free tiers of cloud services
But I would like to ask why does it need it's own language, wouldn't using a language that already exists and has some history be easier and maybe faster?
Besides, a language for smart contracts that is built around the domain is easier to work with than a general-purpose one. So your Q would then be: why not something like Solidity or similar? - perhaps somebody else can elaborate.
From https://ethereum.github.io/yellowpaper/paper.pdf:
"[The EVM] is a quasi-Turing-complete machine; the quasi qualification comes from the fact that the computation is intrinsically bounded through a parameter, gas, which limits the total amount of computation done."
> By restricting semantics you have finer control over potential slippages.
Solidity have had plenty of "slippages" already and a generally misguiding design, and at least initially was not really into "restricting semantics". Plenty of points made previously, e.g. https://news.ycombinator.com/item?id=14691212.
I don’t view it as superior or solving problems that solidity introduces. yes, solidity makes things complex, no static typing does not fix this
I do see it diluting available talent amongst employers, who have accidentally hired an enthusiast that wants the team to use this language
Bitcoin is signal, all of crypto is noise.
Feature not a bug. Base layer that will serve as foundation for entire global economy should be as simple as possible to make it as reliable as possible. Like all complex systems, functionality is added in layers. Things like lightning network and fedimints are examples of such layers.
> It's great that there's 21M supply cap.
Fixed supply is an essential requirement for the entire system to have any merit whatsoever. If supply can change at direction of core group of insiders it's just the same thing as the existing fiat banking system and the real value of the tokens will be diluted in perpetuity.
> But absolutely useless for software engineers to build financial primitives on top of.
No. See comment above about layers.
-
Bitcoin is a commodity, ETH & all of crypto is just (unregistered) securities lying/pretending to be commodities.
Here's the problem with this:
Bitcoin doesn't exist below a society - its not independent of a functioning system made up of economic agents. Wheat and salt will continue to exist without human action.
And you've got it backwards: securities are just government and institution approved tokens existing on a consensus network. Some of us believe this consensus network is corrupt and should be rebuilt into something a bit more open source.
Bitcoin is pretty much orthogonal to government control. Especially bitcoin with its completely open transaction history.
Whatever your thoughts are about the gold standard, it was not instability that did it in.
[1]: https://www.wsj.com/articles/when-the-u-s-gave-up-gold-11625...
Bitcoin is a scarce commodity with no issuer. It cannot be counterfeited on the whim of a small group. Its volatility should decrease with adoption.
This seems like it would break many smart contracts sometime later this decade, this isn't currently fleshed out
That aside, no other EVM is planning to do that, all code is compatible on all of them, and it doesn’t matter what Ethereum’s blockchain does
Do you have any thoughts on the points I made instead of centralization/maxi copypasta?
Here is Justin Bons on the broken security model of Bitcoin:
https://mobile.twitter.com/Justin_Bons/status/15947344601506...
Any answer ?
https://mobile.twitter.com/Justin_Bons/status/15994477745837...
Just leaving this here for reference for others as I don’t think I’ll sway you either way
It’s possible but I don’t see it. I’d say it’s an open question.