Customizable composability
Last updated
Last updated
Customizable composability is an important concept at Spire Labs, and the idea is pretty simple. We use the fact that based rollups created with the Based Stack are appchains to customize the rollup contract in ways that are impossible on general-purpose rollups.
We introduce the concept of a “sync function” which is an arbitrary function that can be executed on the L1 to produce arbitrary data as output. Then, we enforce (at runtime) that the inputs to the first transaction (the “sync transaction”) in any appchain block proposal is the output of executing the sync function.
This is interesting because it allows applications to specify read access to Ethereum every time an L2 block is executed. The L2’s execution environment can always have effectively real-time read access to Ethereum. This includes any state: L1 oracles, Ethereum history, and more. Note that this does not require any modifications to the VM used.
For example, imagine an NFT marketplace that would like to allow its users to trade CryptoPunks. Of course, CryptoPunks only exist on Ethereum L1. Implementing this application as an appchain might involve using customizable composability to read the entire state of the CryptoPunks contract into a contract on the appchain. Then, every transaction in the appchain block will have access to the up-to-date state of the CryptoPunks contract.
Functionally, this is a kind of new way to be composed with L1 and is an example of the unique innovation that can be done when implementing appchains vs general purpose rollups.