One of the things to admire most about Curve devs is that they just keep shipping, whether markets are bear or bull. Yesterday as traders felt glum, Curve sounded a note of Optimism:
The Optimism chain features quick bridging onto the chain, although you may need to wait up to a week to move funds back to mainnet. The L2 boasts 48x better gas costs than L1 and has attracted about a billion in value.
With Curve growing its empire onto so many chains, is there any reason to even use the expensive L1? At the moment, itβs still necessary because thatβs where to get your boosties.
Hence why avid followers of the Convex Discord got treated to this little gem:
Ethereum L1 remains Curveβs priority, but Curveβs empire extends to any chain that stablecoins touch.
As cool as sidechains are, most excitement remains reserved for the v2 Pool Factory. Assome you perhaps saw, Curve launched its v2 factory last Friday, albeit without a frontend interface.
Naturally, thereβs nobody brave enough to yet launch a pool without a bit more guidance. With half a page of complex parameters to set at launch, thereβs little sense in launching a pool without more appreciation for tuning things correctly.
At any rate, presuming the bears donβt destroy things first, we should soon expect more V2 pools to emerge. As liquidity grows, one challenge we may soon expect to face Curve users will be how to handle complex route optimization.
At the moment, itβs navigable. One could hop from Euros to CVX with few hops. Once this map multiplies to 100 pairs, weβre going to see significantly more complex routing options. This chart will become unintelligible.
In yesterdayβs Curve Brownie Tutorial, the deepfake host presented a simple routing script to prepare for this new world. The script recursively hops through neighboring v2 destinations to find the shortest path between two assets. The following output demonstrates how you might bridge DAI to other assets for example:
When things get multidimensional, weβll see if the routing options hold up. The problem of optimizing paths is somewhat complex, falling into quadratic time. Here you can observe an illustration of Dijkstraβs algorithm, a common method of solving the problem, and observe why it becomes slow at large volumes:
One open question is if anybody will solve this efficiently on-chain. That is to say, suppose an on-chain Curve routing contract may cost .01 ETH worth of gas to efficiently search a route with 10 assets. If this scales roughly quadratically, then by 100 assets it may cost north of 1 ETH to run a search.
If youβve dove into the raw web3 calls of, say, Sushi, you may have noticed that executing a transaction requires you to pass the desired routing directly to the Sushi contract. Itβs a sensible solution. Finding the optimum route within the smart contract would cost a lot of gas, so better to let the frontend bear the computational burden of calculating a route. It makes it more difficult to use on the command prompt, though, unless you know the Sushi routing by heart.
We presume the v2 pools will evolve in such a way that the most common routes will become established, and therefore enough shortcuts could be hardcoded to simplify the problem to a manageable size. It may not be a generic solution that satisfies mathematical purists, but good enough for general use. It also reveals much about the nature of this early era in blockchain programming.
All the billions of dollars of value that has found its way on-chain is still using the EVM to run very basic level math. A recent discussion by the big brains reveals just how primitive this is relative to the possibilities.
Without worrying too much about what a Hamiltonian is (a function to calculate the energy of a system in quantum mechanics), the point is, we are so early.
Thus far, the calculations being used to run the wonderful world of Ethereum are programs just a touch more powerful than could be executed on a standard four function pocket calculator. And weβre paying about $75 each time for the privilege.
Would complex mathematics ever be affordable to run on Ethereum?
Interestingly enough, it may not be all that inefficient to execute some advanced techniques on-chain. For one example, nobodyβs been futzing around with merging artificial intelligence and blockchains to my knowledge. The encoding of a neural network is the computationally expensive part, but this could be easily done off-chain. The actual execution of a simple shallow network would just be a handful of nodes and simple math, meaning it could be done relatively cheaply.
Other techniques may remain out of reach as they are currently designed. You couldnβt lean on the Ethereum network to replace your graphics card. Nobodyβs been able to arbitrage any cheaper sidechainβs computing power to efficiently mine Bitcoin. As more intensive applications get built, weβll see if architecture adjusts for more complex projects.
Weβre pretty much in the NES level of blockchains. Stick around for a bit and see where things go. And thank your big brain devs for taking us there!