The system, which allows users to run smart contracts with Bitcoin without handing over control of their funds to an operator, was proposed on May 27 by Burak Kheseli, a developer known in the Bitcoin community for exposing critical vulnerabilities in the Lightning Network (LN) in 2022, forcing an emergency update.
The new project is called Cube. We aim to bring programmable finance to Bitcoin This ensures that when users deposit funds into a smart contract, they are not temporarily unable to withdraw the funds themselves.
Keceli describes Cube as a platform on which financial applications can be built, including broker-free asset exchanges, collateralized lending systems, and stablecoins backed by Bitcoin (BTC).
Although many current L2s require some degree of trust in an operator or committee (such as Keceli’s own Ark L2 service provider or a federation); multisig (on Blockstream’s Liquid Network), Cube promises that users will never lose the ability to unilaterally withdraw funds at the base layer of Bitcoin.
Cube, on the other hand, requires a technology layer called an engine. Acts as your internal coordinator. Its role is to order user transactions, periodically record the status of the system in Bitcoin, and coordinate off-network execution.
In that sense, Kesseri insists that the engine is “never a manager”According to the developer, the funds remain under the agreement between the user and the engine, as movement requires signatures from both parties (multisig 2/2). Additionally, if the engine behaves maliciously or stops working, users can force it to quit without the engine’s cooperation, Keceli explains.
Users retain the theoretical option of unilaterally terminating the engine if it stops working or engages in malicious behavior, but this makes the engine a potential operational friction point even if the custody of their funds is not at risk.
Keceli did not elaborate on how the engine could fail, but errors in this structure could be due to technical failures in the system or intentional acts, including the possibility that the engine could be compromised by a third party.
How does Cube work with Bitcoin? A combination of 3 pieces
Cube combines three mechanisms to enable smart contracts with unilateral output:
timeout tree (timeout tree)
The first one is timeout tree (timeout tree), a structure that organizes and records the funds of all users in Cube. These act like a tree of pre-signed transactions. Each branch corresponds to a user and is recorded from the beginning. The right for the user to claim his funds directly in Bitcoin if something goes wrong.. The entire tree shares a single regular registration point in the base network.
This architecture allows two modes of operation. As long as the engine is working properly, transactions between users will occur within the Cube, saving time and cost as each movement does not have to be written in Bitcoin. However, if the engine stops working or attempts to withhold funds, users do not need authorization to exit. Users can directly activate branches of the tree with Bitcoin and recover branches autonomously. Once the predefined period recorded at the time of deposit has elapsed. That condition is the only condition. There is no intermediary that can stop it. This technology comes from the Ark protocol.
bitvm3
The second mechanism is BitVM3, the latest version of BitVM (Bitcoin Virtual Machine) proposed by developer Robin Linus. Although BitVM3 is not yet in production, Cube aims to solve how users can prove that the engine worked incorrectly if all execution took place outside of Bitcoin.
Here’s Cube’s answer: Each engine operation is accompanied by a verifiable statement about its outcome. If the user detects that this statement is false, they can provide evidence of the error directly in Bitcoin. Bitcoin will evaluate it and if fraudulent activity is confirmed, it will impose a penalty on the engine and release the funds that were blocked as collateral, exposing it to disputes that are resolved in favor of users. This mechanism strives to ensure that the costs of wrong actions are greater than the possible benefits.
cube VM
The third is CubeVM, a virtual machine (program execution environment) built as an extension of Bitcoin Script, Bitcoin’s native programming language.
CubeVM Add Support for complex smart contractsThis is a program that can perform advanced financial logic not allowed in native Bitcoin scripts, such as asset exchanges and collateralized stablecoins.
The problem Cube wants to solve with Bitcoin
Using smart contracts with Bitcoin, when a user deposits funds into the contract; These funds are under the control of program logic.not the user’s private key.
In this intermediate state, the protocol understands keys rather than program logic, so Bitcoin has no native way to know that those funds belong to users. The user actually Depending on the system you are using, your system may or may not be able to recover successfully.
The mechanism proposed by Keceli to solve this problem is shadowing (shadow projection). This tool always maintains an internal record of how much BTC corresponds to each user within each contract.
that record (called) shadow spaceor shadow space) rather than representing the direct storage of funds. Liabilities arising from contracts with each participant. That debt will continue to be reflected. timeout treeso users will always have access to an exit to the Bitcoin network equivalent to the amount owed in the contract, even if their funds are under the control of the program.
Keceli describes the internal rules of the Cube virtual machine for this mechanism to function properly. The sum of all amounts recorded in the shadow space may never exceed the Bitcoins effectively controlled by the contract. If you violate that condition, Any operation you perform on the Cube will be automatically rejected.. This aims to ensure that actual funds are always available to back any possible unilateral withdrawal.
In this context, the debate over Bitcoin L2 with programmability has oscillated between systems that enable complex contracts by relinquishing some control, and systems that maintain user sovereignty but with limited functionality, and the latest of these proposals, Cube, seeks to avoid concessions on either front. However, whether the design will withstand technical scrutiny and be implemented remains an open question.

