<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Burak on Medium]]></title>
        <description><![CDATA[Stories by Burak on Medium]]></description>
        <link>https://medium.com/@brqgoo?source=rss-5670c2cb977c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*w3WxumrgK3K0yWSekZeYCw@2x.jpeg</url>
            <title>Stories by Burak on Medium</title>
            <link>https://medium.com/@brqgoo?source=rss-5670c2cb977c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 08 Jun 2026 21:04:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brqgoo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Introducing Cube]]></title>
            <link>https://medium.com/cube-bitcoin/introducing-cube-8b3702e470a5?source=rss-5670c2cb977c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b3702e470a5</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Burak]]></dc:creator>
            <pubDate>Tue, 26 May 2026 14:23:09 GMT</pubDate>
            <atom:updated>2026-05-31T07:57:46.288Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MoJ047VeX98q3KMNtGdZGQ.png" /></figure><p><a href="https://github.com/cube-btc/cube/tree/main">Cube</a> is a virtual machine designed to enable <strong>trusless smart contract execution</strong> natively on Bitcoin. Providing a fully trustless execution environment with unilateral exit, Cube ensures users retain complete control over their funds. By combining BitVM with timeout trees and leveraging Bitcoin DA, Cube integrates BTC directly into a virtual machine with global-state. This approach unites Bitcoin’s foundational design with a Turing-complete smart contract execution model without introducing a counterparty risk, offering a novel framework for extending Bitcoin’s functionality.</p><h3>Holy Grail</h3><p>Bitcoin is the most secure and battle-tested cryptocurrency, yet its scripting limitations and scalability challenges restrict its ability to support complex financial transactions outside of peer-to-peer payments. These are not flaws. They are deliberate constraints that preserve the properties that make Bitcoin valuable: censorship resistance, self-custody, and adversarial robustness. The consequence, however, is that Bitcoin cannot natively support the programmability, throughput, or financial complexity that a global monetary layer demands. Smart contracts, decentralized finance, and high-frequency settlement require an execution environment that Bitcoin was never designed to provide at its base layer.</p><p>The solution is not to change Bitcoin. It is to build on top of it. An effective Layer 2 must extend Bitcoin’s capabilities without compromising its core properties. It must <strong>enable programmable smart contracts</strong> while preserving the <strong>self-custody</strong> guarantee that no intermediary can seize or freeze a user’s funds. And it must accomplish this without requiring Bitcoin protocol changes, without introducing trusted intermediaries who can steal, and without forcing users to trust ceremonies, committees, or bridge operators they have never met.</p><p>Many proposed scaling solutions extend Bitcoin’s functionality at the expense of its trust model. Many designs rely on a 1-of-n trust assumption, where system security depends on at least one honest party. Such designs compromise Bitcoin’s core ethos of decentralization and trustlessness; it will not be the long term scaling solution for Bitcoin.</p><h3><strong>CUBE</strong></h3><p>Cube introduces a fundamentally unique approach to Bitcoin programmability: a native Layer 2 designed to bring <strong>fully trustless smart-contract execution</strong> directly onto Bitcoin without bridges, federations, external consensus systems, or Bitcoin protocol modifications. Rather than moving Bitcoin into an alternative trust domain in exchange for programmability, Cube extends Bitcoin’s native self-custody and settlement model into a programmable execution environment while remaining fundamentally anchored to Bitcoin itself.</p><p>The central objective of Cube is to achieve what has historically been considered contradictory within Bitcoin systems: trustless custody together with generalized programmability. Conventional smart-contract environments achieve programmability by abstracting away Bitcoin’s ownership and settlement model behind external validators, bridges, multisigs, or federated custody assumptions. Cube instead preserves Bitcoin-native ownership directly beneath the execution layer itself, allowing programmable smart contracts to operate without sacrificing unilateral exit, self-custody, or Bitcoin-enforced redemption guarantees.</p><p>Cube utilizes Bitcoin itself as the underlying settlement, dispute-resolution, and final ownership layer beneath the execution environment. Smart-contract execution occurs optimistically off-chain, while settlement guarantees, unilateral exits, and challenge-response enforcement ultimately resolve back onto Bitcoin through native Bitcoin primitives.</p><p>At the center of Cube’s architecture is the Engine, the coordination layer responsible for receiving transaction entries from participants, ordering them into Batches, and producing the settlement transactions anchored to Bitcoin. Under normal operation, the Engine advances state transitions optimistically, coordinating execution without requiring immediate on-chain settlement. Critically, the Engine acts purely as a coordinator, never as a custodian.</p><p>Cube’s primary design objective is <strong>trustless programmability</strong> without sacrificing Bitcoin-native self-custody. Every participant retains unilateral control over their funds at all times through <a href="https://github.com/bitcoin/bips/blob/master/bip-0327.mediawiki">MuSig2</a> covenant emulation enforced directly by Bitcoin Script. Funds remain continuously locked within cooperative 2-of-2 constructions between the participant and the Engine, forming the foundational ownership primitive governing the Cube execution environment.</p><p>Because Cube never directly possesses participant funds, the Engine cannot independently move assets, seize balances, or prevent eventual withdrawal. Participants retain the ability to unilaterally enforce their exit conditions directly on Bitcoin through timeout-tree settlement paths and challenge-response escalation mechanisms.</p><p>As a result, Cube remains fully trustless at the custody layer while simultaneously enabling generalized smart-contract programmability directly on top of Bitcoin itself. Participants do not rely on operators, committees, federations, or external validators to honestly safeguard funds. Instead, ownership guarantees are enforced directly by Bitcoin Script, unilateral exit paths, and cryptographic challenge-response constructions themselves. The Engine cannot steal because the protocol structure itself prevents it, while participants retain continuous sovereignty over funds through direct key ownership and Bitcoin-enforced redemption guarantees.</p><h3>Virtualized Computation Ownership</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*523ZUxGSFzn-3HK6UaZZaQ.png" /></figure><p>Cube’s execution architecture is the composition of two Bitcoin-native primitives: (1) Ark-style timeout-tree ownership virtualization and (2) BitVM-style disprovable computation.</p><p>Timeout trees provide scalable virtualized ownership and unilateral redemption guarantees, allowing participants to transact over off-chain virtual outputs while preserving the ability to independently exit onto Bitcoin. BitVM complements this by extending virtualized ownership into virtualized computation, enabling asserted state transitions to become challengeable and enforceable through Bitcoin-native interactive disproval.</p><p>Cube composes these two foundational primitives into a unified execution primitive referred to as a <strong>Zero-Knowledge Time-Locked Contract (ZKTLC)</strong>.</p><p>Conceptually, (1) timeout trees solve the ownership virtualization problem, while (2) BitVM solves the computation enforcement problem. Cube combines the two together such that programmable state transitions may occur optimistically off-chain while remaining continuously redeemable and challengeable through Bitcoin itself.</p><p>At its core, a ZKTLC is a timeout-tree virtual output carrying a zero-knowledge computation assertion enforceable through BitVM disproval.</p><h3>ZKTLCs</h3><p>ZKTLCs extend the <a href="https://ark-protocol.org/intro/vtxos/index.html">VTXO model</a> employed in Ark-style timeout-tree systems with programmable computation and challenge-response semantics. Where a conventional VTXO primarily represents a unilateral redemption claim over value, a ZKTLC additionally represents a challengeable computation assertion between the user and the Engine. The virtual output therefore becomes not only a claim over value, but also a claim over correctness of the Engine’s asserted state transition.</p><p>At a high level, the relationship is analogous to existing two-party Bitcoin constructions. In Lightning, a channel is most commonly a 2-of-2 relationship between a user and a Lightning service provider. In Ark-style systems, virtual outputs operate as 2-of-2 relationships between the user and the Ark service provider. In Cube, a ZKTLC operates as a 2-of-2 BitVM challenge-response relationship between the user and the Engine.</p><p>Cube’s execution environment follows a <a href="https://bitvm.org/bitvm3.pdf">BitVM3</a>-style execution model in which asserted Groth16 verifier computations are transformed into garbled-circuit verifier environments enforceable through Bitcoin-native challenge-response disproval. The asserted computation corresponds to validity of the Engine’s committed state transition. More specifically, the Engine proves that the proposed transition executed correctly according to (1) Bitcoin and (2) CubeVM consensus rules, and that no invalid state transition occurred relative to the previously committed state.</p><p>Rather than executing arbitrary computation directly on Bitcoin, Cube executes compact verifier assertions whose correctness may later be challenged through the BitVM3 disproval environment. The underlying verifier circuit therefore represents the validity rules of the CubeVM state-transition system itself, including execution semantics, contract constraints, balance invariants, state-transition validity conditions, and relevant Bitcoin consensus rules governing settlement correctness.</p><p>The asserted computation is represented through committed garbled tables, wire-label commitments, challenge transcripts, and revealing-secret structures corresponding to the verifier circuit. Under cooperative execution, the dispute environment remains dormant while the Engine advances state transitions optimistically. Under adversarial conditions, participants may force disclosure of evaluatable verifier inputs through the assertion witness itself, reconstruct the committed garbled Groth16 verifier locally, and independently evaluate the asserted transition. If evaluation yields an invalid result, the garbled verifier derives the disproval secret corresponding to the failing output-wire label, allowing the participant to trigger the associated punitive settlement path through the committed Bitcoin hashlock condition.</p><p>Participants therefore control virtualized ownership objects containing both unilateral redemption rights and cryptographically enforceable disproval rights over the Engine’s asserted execution state.</p><p>Unlike conventional zero-knowledge systems relying on ecosystem-wide trusted ceremonies or MPC committees, Cube scopes the proving environment independently per participant. During account initialization, each participant performs an individual setup ceremony directly together with the Engine, generates participant-scoped proving parameters, participates in toxic-waste generation, and controls destruction of their own toxic-waste material.</p><p>As a result, the setup itself becomes <strong>trustless</strong> from the participant’s perspective. Trust is not inherited from external MPC committees, trusted coordinators, or shared proving environments, but remains cryptographically localized to the participant’s own ZKTLC environment.</p><h3>Timeout Trees</h3><p>Cube utilizes timeout trees as the underlying ownership and unilateral-exit architecture beneath the execution environment.</p><p>A timeout tree is a pre-signed transaction tree structure allowing large quantities of virtualized ownership objects to share a common settlement structure while preserving unilateral redemption guarantees for individual participants. Rather than requiring every intermediate ownership transition to immediately settle onto Bitcoin, participants transact optimistically over virtualized outputs embedded inside a shared transaction tree.</p><p>Under cooperative execution, the timeout tree remains dormant while ownership transitions occur off-chain. If coordination fails or the Engine becomes dishonest, participants may independently materialize and redeem the corresponding timeout-tree branches directly on Bitcoin after the associated timeout conditions mature.</p><p>Cube adopts timeout trees as the foundational settlement and ownership primitive beneath ZKTLC execution. Every participant balance within the system ultimately resolves back into a timeout-tree redemption path enforceable directly through Bitcoin Script.</p><p>Conceptually, timeout trees provide Cube with ownership virtualization, while ZKTLCs extend those ownership objects with programmable computation and challenge-response semantics. In this sense, Cube’s execution architecture can be understood as the composition of Ark-style virtualized ownership and BitVM-style disprovable computation anchored directly to Bitcoin settlement guarantees.</p><h3>CubeVM</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sQN5epLbuV80VCmghr4NQg.png" /></figure><p>Cube introduces a custom-built virtual machine called CubeVM, implemented as an <a href="https://github.com/cube-btc/cube/tree/main/src/executive/vm/opcodes">extended fork of Bitcoin Script</a> designed for trustless smart-contract execution on Bitcoin. Rather than replacing Bitcoin’s execution philosophy, CubeVM expands Bitcoin Script’s stack-based execution model into a programmable global-state environment optimized for unilateral exit and disprovable computation.</p><p>CubeVM extends Bitcoin Script with additional opcodes required for generalized smart-contract computation. The VM introduces native support for global state management, persistent contract storage, segmented execution environments, advanced memory management, 256-bit arithmetic, elliptic-curve operations, stack-element manipulation, contract-call semantics, and <a href="https://github.com/cube-btc/cube/tree/main/src/executive/vm/opcodes#shadowing">Shadowing opcodes</a> designed to work directly with Bitcoin as the underlying asset.</p><p>Unlike account-native virtual machines such as the EVM, CubeVM is designed from first principles to bring programmable execution into Bitcoin-native self-custody. Smart-contract state transitions therefore remain continuously compatible with Cube’s timeout-tree settlement architecture and disproval model.</p><p>The defining architectural primitive of CubeVM is its native support for <strong>Shadowing</strong>, allowing contract-controlled logical balances to be continuously projected into participant-attributable unilateral-exit objects. Shadowing acts as the semantic bridge between programmable smart-contract execution and Bitcoin’s fundamentally key-oriented ownership model. Through this mechanism, CubeVM enables programmable smart contracts to operate directly on Bitcoin while preserving fully collateralized unilateral redemption guarantees and continuous self-custody throughout contract execution.</p><h3><strong>Shadowing</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lMfIWSkzxRH5xhrubFvFZA.png" /></figure><p>Programmable smart-contract systems such as Ethereum operate on an ownership model that is fundamentally different from Bitcoin’s native design. In Bitcoin, funds are controlled by public keys. Ownership is expressed through the ability to produce a valid digital signature, and coins are ultimately governed by accounts exercising discretionary signing authority. Smart contracts, on the other hand, operate differently. A smart contract does not possess discretionary authority or will in the account-native sense. Funds held by a contract are governed exclusively according to deterministic program logic and state transitions. In practice, the contract logic itself becomes the custodian of value. This distinction creates a fundamental incompatibility between Bitcoin-native ownership and programmable smart-contract semantics.</p><p>BitVM and garbled-circuits fundamentally operate in a key-native environment. Their primitives revolve around public keys, signatures, challenge-response protocols, and provable computation associated with individual entities. While BitVM may verify arbitrary computation, the underlying ownership model remains unchanged: Bitcoin still understands keys, not logic. Executable logic itself cannot directly possess Bitcoin in UTXO terms. Consequently, two different semantic domains emerge. Bitcoin speaks the language of keys, while smart contracts speak the language of logic. These systems are not naturally interoperable because Bitcoin possesses no native abstraction for logic-held value. To bridge this incompatibility, this work introduces an intermediary abstraction referred to as shadowing.</p><p>Shadowing acts as a translation layer between logic-native custody and Bitcoin-native possession semantics. Rather than attempting to make executable logic itself a Bitcoin-owning entity, Shadowing allows a contract-governed balance to be projected into a set of participant-attributable balances associated with public keys. The central observation underlying shadowing is that, although funds may temporarily exist under the custody of contract logic, such funds remain economically attributable to individual participants throughout the lifecycle of the contract.</p><p>Typically within programmable smart-contract systems such as Ethereum, coins move through a recurring custody lifecycle in which they begin under direct account ownership, temporarily enter contract-controlled logical custody, and eventually return back to direct account ownership upon withdrawal or settlement. A participant initially controls coins through a native key-controlled account balance. The participant may then deposit those coins into a smart contract — such as a Bitcoin-backed stablecoin contract, an AMM liquidity pool, or another programmable financial primitive — at which point the funds are no longer directly possessed by the participant’s signing authority and instead become governed exclusively by the contract’s execution logic and state-transition rules. Eventually, upon collateral redemption, liquidity withdrawal, or contract settlement, the coins once again return to direct participant custody under public-key control. The problematic phase is therefore the intermediary state during which funds are no longer directly controlled by participant keys, yet simultaneously cannot be represented as key-owned balances because they exist under logical custody. This intermediary logic-possessed state is precisely where Bitcoin-native ownership semantics and smart-contract-native execution semantics cease to naturally align.</p><p>Shadowing resolves this incompatibility by representing not the contract’s custody itself, but rather the contract’s obligations toward participants. The contract-held balance is continuously projected into a set of balances corresponding to the exact quantities economically owed to participant keys at any given contract state. This projected representation — the shadow state — becomes expressible through Bitcoin-native structures despite the underlying custody remaining governed entirely by executable logic. Through this mechanism, contract-governed coins may be continuously mapped onto unilateral-exit timeout trees associated with participant public keys. As a result, although the underlying Bitcoin remains under logical custody, participants retain continuously redeemable claims corresponding to the exact quantity owed to them at every state transition. In this sense, shadowing functions as a semantic bridge between BitVM’s key-native challenge framework and smart-contract-style logical custody. Executable logic governs the funds, while the shadow of those funds remains continuously redeemable through Bitcoin-native public-key structures.</p><h4><strong>Shadow Space</strong></h4><p>In implementation terms, the shadowing abstraction materializes as a dedicated contract-managed allocation space referred to as the <a href="https://github.com/cube-btc/cube/blob/main/src/inscriptive/coin_manager/bodies/contract_body/shadow_space/shadow_space.rs">shadow space</a>. Every smart contract deployed on Cube is assigned its own shadow space, which acts as the accounting layer responsible for managing participant-attributable shadow balances. Conceptually, the shadow space functions as a contract-local allocation database consisting of:<br><em>account_key→shadow_balance</em><br>mappings, where each entry represents the quantity of Bitcoin economically attributable, or “owed”, to a given participant account while the underlying coins remain under contract custody. The shadow space therefore does not represent direct ownership of coins in UTXO terms. Rather, it represents the projected redemption state of contract-held liquidity in a form compatible with BitVM’s key-native challenge and unilateral-exit framework. Shadow allocations are created and managed through a dedicated set of shadowing opcodes, allowing contracts to initialize, increase, decrease, or proportionally rebalance participant-attributable balances over time as contract state evolves.</p><p>For any participant account, the sum of:</p><ol><li>the account’s native balance,</li><li>all shadow allocations attributed to that account across all contracts,</li></ol><p>defines the participant’s effective unilateral-exit redeemable balance across the timeout trees at any given state transition.</p><p>Importantly, a contract’s total shadow allocation is strictly bounded by the actual balance held by the contract itself. The sum of all shadow balances within a contract’s shadow space may never exceed the quantity of Bitcoin currently controlled by that contract: <em>Contract Balance ≥ ∑Shadow Allocations</em></p><p>Any operation resulting in shadow allocations exceeding the contract’s actual Bitcoin balance is considered invalid and rejected at the VM level. This constraint guarantees that all projected shadow balances remain fully collateralized by contract-held liquidity at all times, ensuring that sufficient unilateral-exit liquidity always exists for all participant-attributable balances.</p><h4><strong>Shadowing Opcodes</strong></h4><p>CubeVM introduces a dedicated family of <a href="https://github.com/cube-btc/cube/tree/main/src/executive/vm/opcodes#shadowing">opcodes</a> for managing a contract’s shadow space:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u6OhtXhTaE8oELDJ9b71GA.png" /><figcaption>Shadowing Opcodes</figcaption></figure><p>These opcodes provide the primitive state-transition operations required for maintaining participant-attributable shadow balances throughout contract execution. OP_SHADOW_ALLOC initializes a new shadow allocation entry for a participant account within a contract’s shadow space with an initial balance of zero. Once allocated, OP_SHADOW_UP and OP_SHADOW_DOWN may be used to increase or decrease the shadow allocation associated with that participant.</p><p>For example, consider a Bitcoin-collateralized stablecoin contract. When a participant deposits Bitcoin into the contract as collateral, the deposited coins become governed by the contract’s internal execution logic rather than by the participant’s signing authority. At this point, the contract invokes OP_SHADOW_UP to increase the participant’s shadow<em> </em>allocation by the corresponding collateral amount. Although the deposited Bitcoin is now technically under logical custody of the contract itself, the equivalent participant-attributable balance becomes projected onto the unilateral-exit timeout trees through the shadow space. This guarantees that sufficient unilateral-exit liquidity remains continuously redeemable by the participant despite the underlying coins remaining virtually locked within the contract. This is the core mechanism through which shadowing bridges BitVM’s key-native redemption model with smart-contract-style logical custody.</p><p>In addition to per-account allocation operations, CubeVM also introduces proportional rebalance operations through OP_SHADOW_UP_ALL and OP_SHADOW_DOWN_ALL. Unlike OP_SHADOW_UP and OP_SHADOW_DOWN, which operate on individual participant balances, the _ALL variants proportionally increase or decrease the entire shadow space across all participant allocations according to their current relative weights. These operations are particularly useful for pooled-liquidity systems such as AMMs. When pooled Bitcoin liquidity increases or decreases due to swaps, fees, or liquidity events, the contract may proportionally rebalance all liquidity-provider shadow allocations in a single opcode execution rather than iterating through participants individually within contract logic. This significantly simplifies implementation complexity for pooled financial primitives while preserving fully collateralized unilateral-exit guarantees for all participants.</p><h3><strong>Projector</strong></h3><p>Cube utilizes a modified MuSig2 aggregation construction as a lightweight covenant-emulation mechanism in the absence of native covenant opcodes within Bitcoin. Rather than relying on protocol-level covenant primitives, Cube emulates covenant behavior through value-bound aggregate signing structures referred to as Projectors.</p><p>Unlike traditional MuSig2 aggregation, Projector binds aggregate covenant keys not only to signer identities but also to explicit value commitments. This allows covenant scriptpubkeys<em> </em>to become cryptographically tied to their intended value state.</p><p>The primary objective of Projector is to enable lightweight covenant execution environments capable of safely participating in covenant-signing sessions without requiring full semantic awareness of contract execution state or transaction intent. Rather than reasoning about arbitrary covenant logic, Projector participants may safely operate using minimal deterministic verification rules while remaining resistant to replay, rebinding, or malicious double-signing attempts.</p><p>At a high level, Projector transforms covenant signing into a constrained projection problem: executable contract state is projected into value-bound public-key structures compatible with BitVM’s native key-oriented challenge model.</p><p>Projector extends the original MuSig2 aggregation procedure through a preprocessing projection phase executed prior to the standard <em>KeyAgg(pk_1 … pk_u)</em> step defined in <a href="https://github.com/bitcoin/bips/blob/master/bip-0327.mediawiki">BIP-327</a>.</p><p>Instead of directly supplying participant public keys into <em>KeyAgg</em>, Cube introduces a value-bound deterministic projection function:</p><p><em>KeyProjectorAgg(pk1​…pku​, val1​…valu​)</em></p><p>where:</p><ul><li><em>pk i</em> ​ represents participant public keys,</li><li><em>val i</em> ​ represents satoshi-denominated value commitments associated with each participant.</li></ul><p>For each participant index i, a projection tweak is computed as:</p><p><em>ti ​= H CubeProjector​(vali ​∥ i)</em></p><p>where H CubeProjector ​ denotes a tagged hash using the tag “CubeProjector”. Each public key is then projected as:</p><p><em>pki′​=pki​+ti​⋅G</em></p><p>The resulting projected key set:</p><p><em>(pk1′​,pk2′​,…,pku′​)</em></p><p>is then supplied into the original MuSig2 aggregation procedure:</p><p><em>KeyAgg(pk1′​…pku′​)</em></p><p>without otherwise modifying the remaining MuSig2 signing flow. For signing correctness, each participant correspondingly projects its secret key using the identical tweak value:</p><p><em>ski′​=ski​+ti​</em></p><p>The projected secret keys are then used throughout the remaining MuSig2 nonce generation and partial-signature procedures exactly as defined in the original protocol. The resulting aggregate key — referred to as the Projector Key — therefore becomes cryptographically bound both to signer identities and to explicit value commitments.</p><p>This value-binding property is critical for lightweight covenant emulation. In standard MuSig2 constructions, aggregation commits only to signer public keys. Consequently, a malicious coordinator may attempt to obtain multiple valid signatures across alternative covenant states if a lightweight signer does not fully understand what it is signing.</p><p>Under Projector, this class of attack becomes substantially constrained because the aggregate covenant key itself changes whenever the committed value configuration changes. Since the covenant script public key is derived from the projected aggregate key, signing authority becomes intrinsically bound to a specific value state. As a result, lightweight signing environments may safely participate in covenant execution while performing only minimal deterministic verification logic.</p><h3><strong>Hosted Box Projection</strong></h3><p>Hosted Box Projection refers to lightweight covenant-signing environments operating with limited contextual awareness of the broader covenant execution graph. A Hosted Box is essentially a lightweight always-online covenant-emulation service running on a user-controlled device, similarly to how a router, relay, or node software operates continuously in the background. The device may be self-hosted by the participant or deployed within external hosting infrastructure, but its role remains intentionally narrow: to participate in Projector signing sessions when requested by the Engine.</p><p>Rather than operating as a full smart-contract execution environment, a Hosted Box functions as a constrained covenant-emulation node responsible only for participating in value-bound Projector signing flows. The Hosted Box does not need to fully understand contract semantics, transaction flows, or execution intent. Instead, it safely participates in Projector signing sessions by verifying only minimal deterministic properties, such as:</p><ul><li>whether its own public key participates within the aggregation set, and</li><li>whether the requested value-bound projection parameters are valid.</li></ul><p>Once these checks succeed, the Hosted Box may safely participate in the remaining MuSig2 signing flow and produce a partial signature for the projected aggregate key.</p><p>The safety of this model derives from value-bound aggregation itself. Since the covenant script public key is cryptographically tied to explicit value commitments, malicious attempts to reuse signing authority across alternative covenant states result in entirely different aggregate keys and therefore entirely different covenant script public keys. As a result, Hosted Boxes may safely operate as lightweight covenant-emulation engines without requiring full covenant execution awareness, making them suitable for persistent low-resource deployment environments.</p><h3><strong>Black Box Projection</strong></h3><p>Projector additionally enables a broader future-research direction referred to as Black Box Projection. In this model, covenant-signing environments behave as constrained input/output systems that expose minimal internal state, signing logic, or execution semantics while still safely participating in value-bound covenant execution.</p><p>Because projection commitments are value-bound at the covenant level itself, Black Box Projection potentially enables non-interactive covenant participation in which the signing environment no longer needs to fully interpret or validate the surrounding execution context beyond minimal structural checks. This significantly streamlines covenant emulation flow, reduces interaction complexity, and opens the possibility for highly scalable lightweight covenant-signing environments operating as constrained cryptographic projection devices rather than fully stateful execution participants.</p><h4><strong>Virtual Black Box</strong></h4><p>One possible direction involves isolated virtual covenant-signing environments operating as IO black boxes. Such systems may safely participate in Projector signing sessions while performing only minimal deterministic verification logic, such as verifying signer inclusion and validating expected value-bound projection parameters. Because Projector covenant keys are value-bound, replay or malicious double-signing attempts across alternative covenant states become substantially constrained. This allows highly simplified signing environments capable of safely participating in covenant execution without requiring full smart-contract execution awareness.</p><h4><strong>Physical Black Box</strong></h4><p>A more speculative direction involves physical black-box covenant devices. Such systems would ideally allow a signing device to be physically delivered to a counterparty while remaining fundamentally incapable of exposing its internal secret material under inspection or tampering.</p><p>One hypothetical architecture may involve storing signing secrets within continuously sustained electromagnetic or vacuum-isolated containment environments. Under such a model, any attempt to physically probe, open, or interfere with the device would collapse the containment environment and irreversibly destroy the protected secret material. Although highly theoretical, such systems illustrate a possible long-term direction in covenant-signing infrastructure: physically constrained signing environments capable of safely participating in Projector covenant execution while preserving strong cryptographic isolation guarantees.</p><h3>Lifting</h3><p>Lifting is the process through which native on-chain Bitcoin UTXOs are atomically transformed into Cube-native virtual outputs. Conceptually, lifting “moves” Bitcoin from direct on-chain ownership into Cube’s virtualized execution environment, where the funds may then participate in vanilla transfers, and smart-contract calls.</p><p>Bitcoin must first be lifted before it can circulate within the Cube system. As a result, lifting serves as the canonical onboarding mechanism through which external on-chain liquidity enters the Cube execution environment, while retaining the custody in every step of the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JzbvF_vovCddS94eoi3WFw.png" /><figcaption>Lifting</figcaption></figure><h4>Lift Outputs</h4><p>A <a href="https://github.com/cube-btc/cube/blob/main/src/constructive/txout_types/lift/lift_versions/liftv1/liftv1.rs">Lift</a> is a specialized onboarding transaction output used for converting bare on-chain Bitcoin into Cube-native virtual outputs. When a Lift output is funded, the participant and the Engine cooperatively exchange the Lift output for a corresponding 1:1 VTXO through the lifting procedure. In effect, the Lift output is elevated into a virtualized timeout-tree ownership object. A Lift output carries the following spending conditions (Self + Engine) or (Self after 3 months):</p><ul><li><strong>Lift Path:</strong> The participant and the Engine cooperatively sign through the User + Engine spending path. In exchange, the participant receives a corresponding 1:1 VTXO representation inside the Cube system.</li><li><strong>Exit Path:</strong> If the Engine becomes non-collaborative or refuses to process the lift operation, the participant may reclaim the underlying Bitcoin through the timeout recovery path after the specified timeout period.</li></ul><h3>Exit Ladder &amp; Fork Attestation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8uZT8asN6qNWxvdhETbFJA.png" /><figcaption>Unilateral Exit Paths</figcaption></figure><p>In the non-collaborative case, where the Engine refuses to cooperatively process a participant withdrawal or contract exit, Cube provides a unilateral exit mechanism through a metadata-carrying transaction type referred to as tx::exit-ladder.</p><p>A participant may invoke the unilateral exit path for both:</p><ol><li>direct balance withdrawals, such as unresolved Swapout entries, and</li><li>contract-controlled shadow balances exited through the Call -&gt; Swapout execution route.</li></ol><p>Under normal operation, these exits are processed collaboratively by the Engine within a Batch. If the Engine refuses to include or execute the requested exit, the participant may instead force execution by broadcasting a tx::exit-ladder transaction on-chain.</p><p>The tx::exit-ladder transaction contains metadata encoding the pending exit operation that the Engine refused to process collaboratively. Specifically, the transaction carries the APE-encoded Entry Kind corresponding to the Batch operation intended for execution. The unilateral exit therefore acts as an on-chain escalation path for an otherwise virtualized off-chain state transition.</p><p>In addition to the exit metadata itself, the tx::exit-ladder transaction also carries a Connector outpoint used for fork attestation.</p><p>This Connector exists to address a fundamental fork-selection problem present in many BitVM-based bridge and dispute architectures: namely, the inability for challengers or provers to reliably attest to the canonical chain in which a disputed state transition actually occurred.</p><p>Without such attestation, a malicious operator may attempt to mine or relay an alternative non-honest fork in which the unilateral exit transaction does not exist, thereby attempting to avoid challenge activation or ZKTLC punishment flows.</p><p>Cube prevents this class of attack through explicit outpoint attestation.</p><p>The Connector outpoint from the tx::exit-ladder transaction becomes required input material for the corresponding tx::fork-attest transaction. Since the Connector must originate from the unilateral exit transaction itself, the Engine cannot construct a valid fork-attestation path on a conflicting chain where the exit-ladder transaction was absent.</p><p>As a result, the existence of the unilateral exit transaction becomes cryptographically coupled to the challengeable dispute environment itself. The Engine therefore cannot evade challenge activation by selectively acknowledging alternative forks lacking the unilateral exit request.</p><p>The tx::fork-attest transaction is presigned through a 2-of-2 construction using SIGHASH_ALL | ANYONECANPAY, while additionally embedding a SIGHASH_ALL CHECKSIG validation path enforcing inclusion of the Connector outpoint originating from the tx::exit-ladder transaction.</p><p>Consequently, the unilateral exit path becomes chain-attestable through explicit outpoint linkage. This allows challengers and participants to reliably prove the canonical dispute chain under which the unilateral exit escalation occurred, preventing fork-selection ambiguity attacks against the ZKTLC challenge-response mechanism.</p><h3>DA Encoding</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B92Mch5oI7jOHz8fWx0zow.png" /><figcaption>Encoding Comparison</figcaption></figure><p>Cube utilizes a custom transaction encoding scheme referred to as <strong>Airly Payload Encoding (APE)</strong>, designed specifically to optimize data-availability efficiency for Cube.</p><p>The primary objective of APE is to maximize transactional density within Bitcoin block space by minimizing per-transaction encoding overhead. Through aggressive payload compression, compact indexing, and aggregation-oriented encoding strategies, Cube is able to pack substantially more state transitions into a Bitcoin block than conventional EVM or zkEVM architectures.</p><p>Unlike general-purpose encoding schemes such as RLP, which prioritize flexibility and recursive structure representation, APE is purpose-built for deterministic rollup execution and compact state-transition encoding. The encoding model assumes a constrained execution environment with predefined type systems, deterministic calldata layouts, and protocol-level indexing guarantees, allowing Cube to eliminate substantial categories of metadata overhead traditionally required in EVM-compatible systems.</p><p>Airly Payload Encoding consists of several complementary compression and encoding techniques.</p><h4>1. Bit-level Encoding</h4><p>Cube utilizes bit-level encoding for transaction fields and value types rather than the conventional byte-oriented encoding schemes used by EVM and zkEVM systems.</p><p>Traditional encodings such as <a href="https://ethereum.org/developers/docs/data-structures-and-encoding/rlp/">RLP</a> operate at byte granularity, meaning values are expanded into byte-aligned representations even when the actual entropy of the value requires far fewer bits. Across large transaction payloads, this introduces substantial cumulative overhead.</p><p>APE removes this byte-alignment assumption and instead encodes values directly at the bit level according to their effective entropy rather than their nominal type width.</p><p>For example, conventional systems serialize:</p><ul><li>u32 values using 4 bytes,</li><li>u64 values using 8 bytes,</li></ul><p>regardless of the actual represented range. In practice, however, many transaction fields — such as indices, flags, selectors, counters, and compact value types — rarely require their full representable width.</p><p>APE therefore dynamically compresses these fields into smaller bit representations, commonly saving:</p><ul><li>approximately 1–3 bytes for u32,</li><li>approximately 1–7 bytes for u64,</li></ul><p>while introducing only one or two bits overhead.</p><p>This approach becomes especially effective because Cube operates within a deterministic protocol-constrained execution environment where calldata layouts and type structures are already known ahead of time. As a result, Cube can aggressively minimize serialization overhead without requiring recursive self-describing metadata structures such as <a href="https://ethereum.org/developers/docs/data-structures-and-encoding/rlp/">RLP</a>.</p><p>See <a href="https://github.com/cube-btc/cube/tree/main/src/constructive/core_types/valtypes">Valtypes</a>.</p><h4>2. Rank-based Indexing</h4><p>Cube indexes Accounts and Contracts according to transaction frequency rather than registration order.</p><p>Each time an Account initiates a transaction or a Contract is called, its rank score is incremented by one. Frequently accessed Accounts and Contracts therefore migrate toward smaller index representations over time.</p><p>This allows heavily used system primitives — such as AMM pools, stablecoin contracts, or major liquidity hubs — to eventually compress into extremely small index representations, often approaching single-byte addressing.</p><p>The ranking and index resolution system is maintained at the memory and execution layer, allowing Cube to avoid repeatedly transmitting large static identifiers such as 20-byte EVM addresses or fixed-width contract identifiers.</p><p>See <a href="https://github.com/cube-btc/cube/blob/main/src/inscriptive/registery/registery.rs">Registery Manager</a>.</p><h4>3. Non-prefixed Calldata</h4><p>Cube maps calldata elements directly onto predefined type layouts with deterministic lengths.</p><p>As a result, calldata items do not require explicit recursive length-prefix encoding as used in RLP. Because the decoder already knows the expected structure and field widths of the calldata layout, additional prefix metadata becomes unnecessary.</p><p>This removes the prefix overhead traditionally associated with EVM calldata serialization while simplifying deterministic payload parsing.</p><p>See <a href="https://github.com/cube-btc/cube/tree/main/src/constructive/core_types/calldata">Calldata Elements</a>.</p><h4>4. Common Value Lookup</h4><p>Cube utilizes a lookup-based encoding mechanism for commonly occurring transaction values.</p><p>Frequently used values — such as common transfer amounts, liquidity quantities, or contract interaction denominations — are represented through compact lookup indices rather than repeatedly serialized in full-width form.</p><p>This optimization is particularly effective for financial primitives where repeated denomination patterns occur frequently across large transaction sets. By encoding recurring value patterns through compact lookup references, Cube substantially reduces repetitive payload overhead at scale.</p><p>See <a href="https://github.com/cube-btc/cube/blob/main/src/constructive/core_types/valtypes/maybe_common/common/common_short/common_short.rs">CommonVal</a>.</p><h4>5. Compact Call Method</h4><p>Cube encodes contract call methods through a compact varying-bit-size primitive referred to as AtomicVal.</p><p>Instead of using 4-byte function selectors as in the EVM, Cube dynamically allocates only the minimum number of bits necessary to represent callable methods within a contract.</p><p>For example, a contract exposing four callable methods requires only 2 bits for method selection.</p><p>This substantially reduces per-call overhead across aggregate payload volume and becomes increasingly beneficial at high transaction throughput.</p><p>See <a href="https://github.com/cube-btc/cube/blob/main/src/constructive/core_types/valtypes/val/atomic_val/atomic_val.rs">AtomicVal</a>.</p><h4>6. Signature Aggregation</h4><p>Cube maps account Schnorr keys into <a href="https://github.com/cube-btc/cube/blob/main/src/constructive/core_types/entities/account/root_account/unregistered_root_account/unregistered_root_account.rs">BLS-compatible aggregation space</a> and performs non-interactive signature aggregation across transactions.</p><p>As a result, multiple transaction signatures may <a href="https://github.com/cube-btc/cube/blob/main/src/executive/exec_ctx/exec_ctx.rs#L718">compress</a> into a single constant-size aggregated signature rather than requiring individual per-transaction signatures or large zero-knowledge validity proofs.</p><p>This significantly reduces signature-related data-availability overhead while preserving compact block-level verification semantics.</p><p>See <a href="https://github.com/cube-btc/cube/tree/main/src/transmutative/bls">BLS</a>.</p><h4>7. Minimal Target Encoding</h4><p>Cube replaces conventional nonce-based ordering with a compact replay-protection field referred to as Target.</p><p>Instead of carrying monotonically increasing account nonces, each Entry carries a minimally encoded Target indicating the intended Batch height at which the Entry is expected to execute. The Target mechanism supports the current Batch together with a bounded rollback window extending up to five Batch depths.</p><p>This prevents delayed-broadcast replay behavior in which a malicious Engine attempts to withhold and later rebroadcast previously signed Entries at future state transitions. Entries become valid only within their intended execution window, rendering later rebroadcast attempts invalid.</p><p>Because the overwhelming majority of Entries target the current Batch height, the encoding overhead becomes extremely small in practice. A single bit is sufficient to indicate current-height execution, while additional rollback depths require only two additional bits.</p><p>As a result, Cube replaces conventional fixed-width nonce fields — commonly 8 bytes in traditional systems — with a replay-protection mechanism typically consuming only a handful of bits.See <a href="https://github.com/cube-vm/cube/tree/main/src/constructive/entry">Entry</a>.</p><p>See <a href="https://github.com/cube-btc/cube/blob/main/src/constructive/core_types/target/ext/codec/ape/encode/encode.rs">Target</a>.</p><h4>8. Minimal Ops Fields</h4><p>Cube replaces conventional gas accounting fields with compact operation-oriented execution fields referred to as Ops Price and Ops Budget.</p><p>Rather than repeatedly encoding large fixed-width gas parameters for every Entry, Cube assumes protocol-defined defaults and encodes only deviations from those defaults.</p><p>The Ops Price field indicates whether the Entry uses the protocol base execution price or specifies an additional execution premium. In the common case, a single bit is sufficient to indicate usage of the default base price. If an additional premium is requested, only the excess gap above the baseline is compactly encoded.</p><p>Similarly, the Ops Budget field indicates whether the Entry specifies a custom execution budget. A single bit determines whether an explicit budget exists. If present, additional bits encode only the requested budget amount.</p><p>Because most Entries operate under default execution assumptions, both fields typically consume only minimal bit overhead in practice while still supporting variable execution pricing and bounded execution control when necessary.</p><p>See <a href="https://github.com/cube-btc/cube/blob/main/src/constructive/core_types/ops_price/ext/codec/ape/encode/encode.rs">Ops Price</a> and <a href="https://github.com/cube-btc/cube/blob/main/src/constructive/core_types/ops_budget/ext/codec/ape/encode/encode.rs">Ops Budget</a>.</p><h4>9. Assertations</h4><p>Cube operates under an asserted execution model in which only valid transactions are permitted to enter finalized batches.</p><p>Failed state transitions are excluded from finalized payloads and therefore never consume permanent data-availability space. In contrast, EVM and zkEVM systems permit failed transactions to become permanently recorded on-chain despite producing invalid or reverted execution outcomes.</p><p>By eliminating permanently recorded failed execution attempts, Cube achieves additional historical block-space efficiency while maintaining a cleaner execution state model.</p><h3>TPS Projections</h3><p>The following projections estimate Cube’s theoretical transaction throughput under typical transaction patterns using Airly Payload Encoding (APE). The estimates focus primarily on raw data-availability efficiency and compare Cube against both zkEVM-style rollups and conventional EVM transaction formats.</p><p>Because Cube aggressively minimizes serialization overhead through bit-level encoding, compact indexing, nonceless targeting, minimal Ops fields, compact calldata layouts, and lightweight call-method encoding, average transaction payload sizes become substantially smaller than conventional smart-contract systems.</p><h4>AMM Swap</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nwY_JLTriMWw_Bb-_IjA1Q.png" /><figcaption>AMM Swap — TPS Projection Comparison</figcaption></figure><p>Taking an average AMM swap as an example, Cube consumes approximately ~10.7 bytes (~2.67 vBytes) of block space per transaction.</p><p>In comparison:</p><ul><li>a comparable zkEVM transaction consumes approximately 33 bytes,</li><li>while a conventional EVM transaction consumes approximately 110 bytes.</li></ul><p>As a result, Cube is projected to support:</p><ul><li>approximately <strong>3.1×</strong> more AMM swaps than a zkEVM-equivalent system on Bitcoin,</li><li>and approximately <strong>10.5×</strong> more AMM swaps than a standard EVM environment.</li></ul><h4>Token Transfer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*omOa8jTGtRBSXojnCj1Atw.png" /><figcaption>Token Transfer — TPS Projection Comparison</figcaption></figure><p>Taking a standard token transfer as an example, Cube consumes approximately ~9.7 bytes (~2.42 vBytes) of block space per transaction.</p><p>In comparison:</p><ul><li>a comparable zkEVM transaction consumes approximately 33 bytes,</li><li>while a conventional EVM transaction consumes approximately 126 bytes.</li></ul><p>As a result, Cube is projected to support:</p><ul><li>approximately <strong>3.5×</strong> more token transfers than a zkEVM-equivalent system on Bitcoin,</li><li>and approximately <strong>13.2×</strong> more token transfers than a standard EVM environment.</li></ul><p>Have questions ? <a href="http://t.me/cube_bitcoin">Join CUBE Telegram Community Channel</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b3702e470a5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cube-bitcoin/introducing-cube-8b3702e470a5">Introducing Cube</a> was originally published in <a href="https://medium.com/cube-bitcoin">Cube</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The House: Our Four Elemental Framework]]></title>
            <link>https://medium.com/the-occult-islam/the-house-our-four-elemental-framework-8385c1af00b1?source=rss-5670c2cb977c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8385c1af00b1</guid>
            <category><![CDATA[shia-islam]]></category>
            <category><![CDATA[islam]]></category>
            <category><![CDATA[occult]]></category>
            <dc:creator><![CDATA[Burak]]></dc:creator>
            <pubDate>Sat, 21 Mar 2026 15:03:35 GMT</pubDate>
            <atom:updated>2026-03-21T15:03:35.638Z</atom:updated>
            <content:encoded><![CDATA[<p>Every magician sets four tools on his table before he works. A pentacle for <strong>Earth</strong>. A cup for <strong>Water</strong>. A wand for <strong>Air</strong>. A sword for <strong>Fire</strong>.</p><p>Prophet Muhammad set the table, placed the four, and left..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ytM6SOWp5OUwa__lRFsrzw.png" /></figure><h4><strong>The Magician</strong></h4><p>Muhammad is not one of the four elements. He is the one who arranges them. One hand raised to heaven, one pointing to earth, the channel between worlds. He is the quintessence, the one who holds the other four in place without being any of them. He summoned the four, gave them to the world, and departed. What he left behind was a complete living system, the <em>Ummah</em>, a single Kabbalistic organism built from four elements.</p><h4><strong>Earth King: Ali</strong></h4><p><em>Earth is the grounding element. Roots. Endurance. The element that holds its shape under all pressure and does not move. It is the foundation upon which everything living stands. On the Magician’s table, Earth is represented by the Pentacle.</em></p><p>His nickname was <a href="https://en.wikipedia.org/wiki/Abu_Turab">A<em>bu Turab</em></a>, <strong>Father of Soil</strong>. You don’t get more Earthly than that.</p><p>Ali was the Prophet’s cousin, raised inside his household from childhood, the first male to enter Islam, and later his son-in-law. His father was Abu-Talib, a pagan, and Ali carries that paganic root in his bones. He is a paganic deity in the truest sense: the <strong>human-embodied </strong>version of the <strong>Earth</strong> itself, descended from a line that knew the sacred before Islam named it differently. The Earth was already holy. Ali was already its King.</p><p>He was physically extraordinary, famous for tearing the iron gate of <a href="https://en.wikipedia.org/wiki/Battle_of_Khaybar">Khaybar</a> (a Jewish castle) from its hinges alone and using it as a shield, for defeating the warrior Merhab who no man had beaten before him. Strength that stems from the legs, the legs being the root of the human body, the connection to ground, as Earth is the root of all elements. The same pattern repeats across ages: <strong>David</strong> and Goliath, <strong>Ali</strong> and Merhab. Each era has its Earth King. For this era, in this framework, we call Him <strong>Ali</strong>.</p><p>Earth does not rush. Earth does not flinch. Earth simply is<em>.</em></p><p>After the Prophet’s death, Ali was passed over for leadership three consecutive times. He waited with the patience of stone, then ruled as the fourth caliph, his reign consumed by civil war, ended by an assassin’s poisoned blade at morning prayer. Even the Earth King is eventually buried. But burial is not defeat. The Earth receives and returns.</p><p>Shia belief has inherited the concept of <strong>deities</strong> from its paganic roots, weaving it into a monotheistic framework where God remains one, absolute, untouchable. Deities in this sense are not partners to God but intermediaries, bridges, the ones through whom a human being reaches upward toward the divine. This is the core of how Shia Islam differs from Sunni: the belief that the sacred is not approached alone, but through those who embody it. Ali is the ultimate <strong>intermediary</strong> of the Earth, the only and supreme ruler of the terrestrial plane, the living <strong>Pentacle</strong>, the human pole around which divine authority organizes itself here below. To reach the Earth element, you go through Ali. There is no other gate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DKxPhmOBR-TmWgmuGmxHNQ.png" /></figure><h4><strong>Water Queen: Fatima</strong></h4><p><em>Water is the vitality element. Life itself. The element that fills every vessel and gives it meaning. Without Water the form exists but does not live. It is the blood of the world. On the Magician’s table, Water is represented by the Cup.</em></p><p>When enemies mocked the Prophet, <em>your sons keep dying, your line is finished, you will be forgotten</em>, God answered with three lines. The shortest surah in the Quran:</p><blockquote><em>We have given you Kawthar (The Water Queen).</em></blockquote><blockquote><em>So pray to your Lord and give sacrifice.</em></blockquote><blockquote><em>Indeed your enemy is the one who is cut off.</em></blockquote><blockquote><em>— Surah Al-Kawthar 1–3</em></blockquote><p>Fatima is symbolized as <a href="https://en.wikipedia.org/wiki/Pond_of_Abundance">Kawthar</a>, this heavenly pool in paradise, the abundance God granted when the world said the line was finished. That is our heavenly <strong>Water Queen</strong> deity.</p><p>She is not merely a historical figure. She is the Water element made flesh: the vitality-giver, the life-source, the cup that overflows. In the esoteric table, the Cup represents Water, and Fatima is the <strong>Cup</strong>. She is referred to as Kawthar directly in the Quran, and granted when the world said the line was finished.</p><p>She was the Prophet’s daughter, the only child whose descendants survived. Every person who carries prophetic lineage today traces through her and no one else. The entirety of the Imams, the Sayyids, the living sacred tree, all of it flows from her. The Water Queen whose waters never ran dry even as her own life was poured out completely.</p><p>She married Ali. <strong>Water</strong> meets <strong>Earth</strong>. The heavenly Queen meets the earthly King. Vitality (water) poured into form (earth). She holds another title: <em>Umm Abiha</em>, Mother of Her Father. The Water that nourishes even the source it came from. The Cup that refills the hand that first filled it.</p><p>She died within months of her father, young, in grief, her claimed inheritance stripped from her by the new political order. The heavenly Water Queen who gave the lineage its vitality and was herself poured out completely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oeHGt7HfsDUo4lfNj9hmfg.png" /></figure><p><strong>Air Lord: Hasan</strong></p><p><em>Air is the mental plane. The unseen force. Strategy, stillness, mental alchemy. It does not strike directly, it moves through things, around things, ahead of things. It is chill. Patient. Already three steps forward before anyone noticed it moved. On the Magician’s table, Air is represented by the Wand.</em></p><p>Hasan is the one people in the Shia world often overlook. Firstborn of Ali and Fatima, eldest grandson of the Prophet, and almost invisible in popular memory because all the light, all the grief, all the devotion goes to his younger brother.</p><p>But Hasan was playing a different game entirely. He was the grand strategist. He tried to beat his enemy, Muawiyah, not through force but through <strong>mental alchemy</strong>. The unseen move made before the opponent even knew the game had started. Where others saw a man who stepped back, who signed a treaty, who did not fight, Hasan was operating on a plane Muawiyah could not read. The Wand does not strike. It thinks. It waits. It moves through the mind of the enemy before the enemy moves at all. That is Air. That is the <strong>Wand</strong>.</p><p>He was eventually poisoned, dying without spectacle. Of course he was. Air is never seen. Only felt, after it has already moved.</p><p><em>(On the esoteric reassignment: traditional Western occultism maps the Wand to Fire and the Sword to Air. This framework reverses that, and the lives of Hasan and Husayn are the proof. The Wand is the instrument of unseen, strategic, mental force. The Sword is the instrument of immediate, visible, literal action. Hasan carried the Wand. Husayn drew the Sword.)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FwW0ey1fwbGA4ATXkzvKYQ.png" /></figure><p><strong>Fire Lord: Husayn</strong></p><p><em>Fire is the element of action. The seen force. It does not calculate from a distance, it moves and the world changes immediately and visibly. It is the element of action, war, and literal alchemy. It burns and it is seen burning. On the Magician’s table, Fire is represented by the Sword.</em></p><p>Husayn did not try to beat his enemy through strategy. He did not negotiate, did not step back, did not play the long game. He rode into <a href="https://en.wikipedia.org/wiki/Battle_of_Karbala">Karbala</a> with <strong>72 believers</strong> against an army of <strong>thousands</strong>, and he beat his enemy the only way he knew: through force, through the <strong>Sword</strong>, through visible and immediate action that is <strong>Fire</strong>.</p><p>One by one his companions fell. His half-brother Abbas was killed at the riverbank trying to bring water for the children. His infant son Ali Asghar was struck by an arrow in his arms. Husayn fought until he could not stand, and was killed and beheaded on the field as a <strong>sacrifice</strong> for our El-magick. The camp was burned after.</p><p>The event did not stay in the past. It never does with Fire. Karbala became the burning center of Shia Islam, mourned every year on <a href="https://en.wikipedia.org/wiki/Ashura">Ashura</a> across the world, in every language, because the wound does not close. Fire does not become ash and stop. It keeps burning.</p><p>In the logic of Surah Al-Kawthar, God gave the Water and asked for a <strong>sacrifice</strong>. Husayn is the answer. The Fire lord, offered completely and consciously, so that the heavenly given element could endure. What the <em>Ummah</em> had in abundance, the Fire, the force, the visible action, it gave. What it was in danger of losing, the vitality, the lineage, the Water, it preserved. The exchange was made at Karbala. That is the alchemy. Magic needs sacrifice.</p><p>From Husayn’s lineage came the Twelve Imams of Shia Islam. The sixth of them, Imam Jafar al-Sadiq, was the master of Jabir ibn Hayyan, <a href="https://sciencenotes.org/who-is-the-father-of-chemistry/">the father of chemistry</a>. Fire is the element of literal alchemy, of chemistry, of transforming and bending the outer world through seen action. That the man who founded chemistry learned at the feet of a direct descendant of the Fire Lord is not coincidence. It is the element expressing itself through the lineage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1bF4ShDT_3daWdnlMxdgQQ.png" /></figure><h4><strong>The Embodying Elements: (1) Earth &amp; (2) Water</strong></h4><p>Humans are made from Earth:</p><blockquote><em>We created you from Earth, and will return you to Earth, and from it We will bring you back again.</em></blockquote><blockquote><em>— Surah Taha 55</em></blockquote><p>And from Water:</p><blockquote><em>Indeed, We created humans from a mix of Water, and We made them hear and see to test them.</em> <br> <br><em>— Surah Al-Insan 2</em></blockquote><p>(1) Earth and (2) Water are the embodying elements. They make a being that has (1) <strong>shape</strong> and (2) <strong>is alive</strong>. Without them there is nothing, no form, no vitality, no vessel for anything else to inhabit. Ali and Fatima are not merely two members of a family. They are the two cosmic principles without which no living being comes into existence. <strong>The Earth King</strong> and the <strong>Water Queen</strong> are the foundation. Everything else stands on top of them.</p><h4><strong>The Instrumental Elements: (3) Air &amp; (4) Fire</strong></h4><p>(3) Air and (4) Fire are are the instrumental elements. They are not needed to form, but to <strong>function</strong>.</p><p>An organism of (1) Earth and (2) Water is grounded and alive. But until it picks up its instruments it can only be acted upon, never act.</p><p>The Wand, Air, is the instrument of the unseen: the mental reach, the strategy, the force that moves before anyone sees it move.</p><p>The Sword, Fire, is the instrument of the seen: the strike, the war, the action that bends the outer world immediately and directly in the alchemical sense.</p><p>One in each hand; the Wand in one, the Sword in the other. Only then is the organism whole: (1) structured, (2) alive, (3) reasoning, and (4) capable of bending the outer world. <strong>Only then can it meet another organism on the field.</strong></p><p>The Magician set the table. <a href="https://en.wikipedia.org/wiki/Ahl_al-Bayt">The House</a> is the table.</p><p>The four elements are in place. Sacrifices are made. The organism is complete. The table is set.</p><p>Now it moves.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8385c1af00b1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-occult-islam/the-house-our-four-elemental-framework-8385c1af00b1">The House: Our Four Elemental Framework</a> was originally published in <a href="https://medium.com/the-occult-islam">The Occult Islam</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Magicians Contest]]></title>
            <link>https://medium.com/the-occult-islam/the-magicians-contest-f339eca9fb8a?source=rss-5670c2cb977c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f339eca9fb8a</guid>
            <category><![CDATA[occult]]></category>
            <category><![CDATA[islam]]></category>
            <dc:creator><![CDATA[Burak]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 22:34:11 GMT</pubDate>
            <atom:updated>2026-01-09T22:34:47.622Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GxfGR-vIe-jU8br-tIqG0A.png" /></figure><p>Rome had arenas where warriors competed. Strength decided rank and fame. Egypt had arenas too, but there, <strong>magicians competed</strong>. Magic and craftsmanship and determined status.</p><p>One day, Pharaoh invited the best magicians from across the land and <strong>threw the grand Magicians’ Contest</strong>.</p><p>God told Moses to attend the contest. <em>“Do not be afraid. Indeed, you will be the one who prevails.”</em> (Qur’an 20:68)</p><p>Moses steps into the arena, and God commanded: <em>“Throw what is in your right hand. It will swallow up what those magicians have crafted.”</em> (20:69)</p><p>Moses threw his staff, and it became the <a href="https://bulbapedia.bulbagarden.net/wiki/Ekans_(Pokémon)">divine-purple Ekans</a>, devouring everything the magicians had played.</p><blockquote><em>“What they crafted was only a magician’s trick. And a magician can never succeed.” (20:69)</em></blockquote><p>The magicians then fell in prostration: <em>“We submit to the Lord of Aaron and Moses.” (20:70)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PTda352-I-dlJLfgxiZmcQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f339eca9fb8a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-occult-islam/the-magicians-contest-f339eca9fb8a">The Magicians Contest</a> was originally published in <a href="https://medium.com/the-occult-islam">The Occult Islam</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Play Ping Pong or NGMI]]></title>
            <link>https://medium.com/brollup/play-ping-pong-or-ngmi-01c36667c21f?source=rss-5670c2cb977c------2</link>
            <guid isPermaLink="false">https://medium.com/p/01c36667c21f</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[custody]]></category>
            <dc:creator><![CDATA[Burak]]></dc:creator>
            <pubDate>Tue, 11 Mar 2025 16:00:24 GMT</pubDate>
            <atom:updated>2025-03-11T17:25:17.254Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b098KAtdkEacTXp1WRkZsg.png" /></figure><p>Breathing in and out is like playing ping pong on a socket connection to life. Each inhale and exhale is a packet of existence sent and received, a constant exchange keeping us in sync with life. Yet, just as every connection eventually times out and all clients disconnect, every organism must face its death. This cycle of breath is a quiet commitment to life, much like the ongoing engagement required to maintain your Bitcoin.</p><p>In Bitcoin, the dilemma between relying on custodians vs. embracing self-custody mirrors a struggle for balance. Self-custody offers full control but risks losing everything with one mistake, while custodianship, on the other hand, comes with its own set of fears.</p><h4>Custody Is Scary!</h4><p>Entrusting your coins to a custodian, such as a crypto exchange or a custodial wallet, creates a single point of failure. History is full of collapses, fraud, and hacks that have wiped out users’ funds overnight. No matter the security measures, the risk remains: if you don’t hold your money, someone else does, and that trust is often misplaced. Custodianship is a ticking time bomb, as disasters like Mt. Gox have proven.</p><h4>Self-Custody Is As Scary!</h4><p>Self-custody, often hailed as the ultimate solution to financial sovereignty, comes with its own terrifying risks. Losing access to one’s seed phrase is a complete disaster, leading to irreversible loss of funds and life savings. There’s no customer service, no recovery process. Just total failure.</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=twitter&amp;url=https%3A//x.com/ChaseYoDream247/status/1870202036060598680&amp;image=" width="500" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/61baaf09b40a92e3b07e5a8b69d3e699/href">https://medium.com/media/61baaf09b40a92e3b07e5a8b69d3e699/href</a></iframe><p>Countless stories exist of people losing access due to misplaced backups, forgotten passwords, or tragic “boating accidents.” The burden of security is entirely on the individual, and for many, that’s a risk just as daunting as trusting a custodian. Bitcoiners are not prepared to be their own bank. Human error is a given.</p><h3>Enter Ping Pong Custody</h3><p>Ping Pong Custody strikes the ideal balance between self-custody and custodians, allowing users to maintain full control for a set duration while making periodic commitments to sustain it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0aGgNhT6qDBT0WcY7cMEWA.png" /><figcaption>Custody Spectrum — Risks at the edges, perfect balance in the middle.</figcaption></figure><p>Custody exists on a spectrum: self-custody on one end, offering maximum control but high responsibility, and custodial solutions on the other, providing convenience but requiring trust in a third party. Ping Pong Custody sits in the middle, blending autonomy with periodic engagement. Users retain control but must actively confirm their ownership at intervals, preventing passive loss while avoiding full dependence on a custodian.</p><p>This model reflects real-world dynamics, such as renewing a lease or maintaining an active subscription. Instead of a single irreversible custody choice, users remain fluid, adapting their level of engagement over time.</p><p>The periodic “pong” back to the system ensures users remain aware and in control, while the structured renewal process protects against permanent loss.</p><h3>Virtual UTXOs</h3><p>Brollup, as a variant of Ark, builds on the concept of <a href="https://docs.brollup.org/virtual-utxos">virtual UTXOs</a> — short-lived, expiring Bitcoin notes that can be redeemed on-chain.</p><p>Rollup operators, in addition to ordering transactions and producing rollup blocks, also act as Ark service providers (ASPs), managing the lifecycle of virtual UTXOs within the system. Users must actively engage with these operators to maintain control over their funds.</p><p>This engagement functions like a continuous game of ping pong between users and the ASP, where users periodically renew their virtual UTXOs (VTXOs) to reset the expiration timer. This renewal process ensures their funds remain accessible and fully under their control.</p><p>On Brollup, virtual UTXOs expire after 90 days. A refresh period begins on the 60th day, during which users can renew their VTXOs without incurring any liquidity fees. If a user fails to refresh within the 90-day window, the timer expires, and custody transitions to a trusted social recovery mechanism. Rather than being permanently lost, funds enter a recovery process that shifts control away from the user but ensures accessibility through designated recovery methods.</p><p>To maintain sovereignty, users must continually refresh their coins. However, this process is fully automated and seamlessly managed by the client software, removing the need for manual intervention. Brollup’s Ping Pong Custody guarantees that users retain control of their funds as long as they remain engaged. This design creates a dynamic and participatory form of self-custody, one that balances resilience, autonomy, and recoverability within a streamlined and user-friendly system.</p><h4>Much Like Breathing</h4><p>Renewal is essential, much like breathing, as continuous engagement keeps the system active. Many aspects of life require ongoing participation. Showing up to church reaffirms faith, learning deepens knowledge, and engagement sustains self-custody.</p><p>With a fully automated renewal process, users stay in control without constant oversight. Ping Pong Custody ensures that as long as they remain engaged, their sovereignty is never compromised.</p><p>Ark’s design principles make self-custody both secure and convenient. By abstracting complexity and aligning with natural renewal cycles, it enables a resilient, user-friendly approach to digital ownership.</p><h3>The Social Graph</h3><p>Brollup employs an account-based model for its underlying design and uses Nostr keys for identification (x-only keys following the npub format).</p><p>This approach allows users to tap into the existing network effect of Nostr’s open ecosystem. While Brollup itself does not integrate with Nostr beyond its key format, users are encouraged to engage with Nostr for social interactions.</p><p>One account standard for social and financial. <strong>npubs are the new 0x!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJOnoXCJkOC42nAfshAZ1g.png" /><figcaption>A Nostrich’s Social Graph</figcaption></figure><p>Identity is more than just a private key. It’s built on relationships, reputation, and the ability to interact freely across networks. The social graph isn’t just a contact list; it’s a framework of trust and connectivity. Instead of depending on centralized institutions, users can rely on their own network for authentication, reputation, and recovery.</p><p>By using Nostr keys, Brollup embraces this approach, creating a seamless identity layer that connects financial transactions with social interactions. This strengthens resilience, enhances security, and enables a recovery design rooted in human connections rather than intermediaries.</p><h3>Social Recovery</h3><p>In the event a user loses access to their private key, recovery isn’t left entirely to chance. Instead, Brollup offers a safeguard through trusted contacts, allowing users to request a refund from the ASP (Brollup operators).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J-E6Zmu1CFgMIk-i_cL5Bw.png" /><figcaption>Social Recovery</figcaption></figure><p>Operators automatically sweep expired VTXOs, and the social graph plays a pivotal role in guiding the recovery process. While the social graph helps coordinate the steps, it’s the foundational mechanics of VTXOs that ultimately make recovery possible.</p><p>Our design empowers users to rely on their personal network of trusted friends, family, or contacts in times of need, rather than relying on centralized authorities. By giving individuals the ability to recover their assets through a decentralized social structure.</p><p>Unlike traditional self-custody, where the loss of a private key often means losing access forever, Brollup introduces a new dynamic. It allows users to keep their funds secure under normal conditions, but offers a clear path for recovery when life’s uncertainties arise. This makes it a compelling choice for those who want to maintain control over their assets, but also desire a safety net in case of emergencies.</p><p>By merging financial independence with social trust, the design principles of Ark creates a harmonious balance between security and recoverability. It reimagines self-custody in a way that acknowledges the importance of community and relationships, allowing users to stay in control without sacrificing peace of mind.</p><h3>WoT Courts</h3><p>The scope extends far beyond just lost keys — it touches on deeper issues like inheritance and long-term asset management. As we look to the future, it’s easy to imagine Web of Trust (WoT) courts emerging as decentralized arbitration systems, resolving inheritance disputes based on the social graph and its associated trust dynamics. In such a scenario, Ark Service Providers (ASPs) wouldn’t just facilitate recoveries but could also act as executors, carrying out court rulings in a way that aligns with pre-established social agreements. This could redefine how digital assets are passed down across generations, blending cryptographic security with social consensus.</p><h4>Would this work on-chain?</h4><p>Not quite. While similar refreshing policies can be implemented with Miniscript for bare UTXOs, periodically refreshing UTXOs on-chain doesn’t scale. This is more of an Ark primitive, designed to refresh coins off-chain rather than on-chain, making the process efficient at scale. As a result, this recovery mechanism is more suited to Ark/Brollup and doesn’t translate as well to on-chain setups.</p><h4>How often do I need to be active to maintain control?</h4><p>A VTXO refresh period begins on the 60th day, during which users can renew their VTXOs without incurring any liquidity fees. This means the user needs to check their wallet at least once every 30 days. The refreshing process is automated and abstracted by the client software, which notifies the user in case of inactivity to ensure they don’t lose access.</p><p>We know though girls check their Instagram every minute, and men check Bitcoin Twitter every hour.</p><h4>What if the ASP misbehaves?</h4><p>Brollup operators aren’t a single server like in the regular Ark setting; they operate as a distributed MPC network with a built-in trustless DKG, removing single points of control and reducing the risk of misbehavior.</p><p>Even if some operators act maliciously, social recovery remains trust-minimized, relying on a decentralized process rather than any single entity. This distributed design strengthens security and resilience, ensuring recovery isn’t undermined by any single failure.</p><h4>How about non-Bitcoin assets?</h4><p>On Brollup, Bitcoin resides in VTXOs, which are off-chain verifiable and on-chain claimable expired notes. Non-Bitcoin assets such as stablecoins, however, exist solely within the virtual machine, meaning recovery for these assets isn’t possible in the same way as for Bitcoin.</p><p>Many token issuers, like Tether, implement issuer actions such as freezing or locking funds. In such cases, these actions need to be managed at the issuer level, not through the core recovery process.</p><p>Have further questions? Join our <a href="https://t.me/brollup">Telegram Community Channel</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01c36667c21f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brollup/play-ping-pong-or-ngmi-01c36667c21f">Play Ping Pong or NGMI</a> was originally published in <a href="https://medium.com/brollup">Brollup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Covenant Emulation with Musig-nested-NOIST]]></title>
            <link>https://medium.com/brollup/covenant-emulation-with-musig-nested-noist-784d428c7446?source=rss-5670c2cb977c------2</link>
            <guid isPermaLink="false">https://medium.com/p/784d428c7446</guid>
            <category><![CDATA[noist]]></category>
            <category><![CDATA[brollup]]></category>
            <category><![CDATA[frost]]></category>
            <category><![CDATA[musig]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Burak]]></dc:creator>
            <pubDate>Wed, 29 Jan 2025 00:19:59 GMT</pubDate>
            <atom:updated>2025-01-29T00:19:59.235Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RS_2o_AsPC8UOktYCcSC1Q.png" /></figure><p><a href="https://eprint.iacr.org/2020/852.pdf">FROST</a> can be nested inside <a href="https://blog.blockstream.com/en-musig-a-new-multisignature-standard/">MuSig</a>, and MuSig can likewise be nested inside FROST. Each of these schemes operates on the fundamental principle of aggregating individual cryptographic keys while preserving security guarantees and maintaining the ability to generate valid signatures.</p><p>MuSig functions by combining multiple public keys into a single aggregate key, ensuring that all participants collaboratively sign messages without exposing their individual private keys. Each participant contributes their key to the aggregation process, forming an aggregate key that appears indistinguishable from a standard public key to external verifiers. This enables multi-party signing schemes while minimizing the overhead associated with traditional multi-signature schemes.</p><p>Our MuSig-nested-NOIST scheme extends this approach by allowing a <a href="https://github.com/brollup/brollup/tree/main/src/transmutive/noist">NOIST</a> quorum — composed of multiple signatories — to act as a single entity within a MuSig signing process. Essentially, instead of requiring every participant to be an individual keyholder in MuSig, we enable a subset of participants, structured as a NOIST quorum, to collectively contribute a single aggregated key to the MuSig operation. This design allows for covenant emulation involving not only individual entities but also a distributed quorum of rollup operators.</p><p>The NOIST quorum itself consists of multiple participants who each hold a distinct FROST share, and their contributions are combined to produce an aggregate NOIST signature. The NOIST quorum is then treated as an individual entity within the larger MuSig setup.</p><p>Our MuSig-nested-NOIST protocol facilitates seamless integration between these schemes, ensuring that FROST-derived shares within a NOIST quorum can be combined with independently held public keys in MuSig to generate aggregate signatures.</p><p>Check out the demo:</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9cb1Jg3spyQ&amp;type=text%2Fhtml&amp;schema=youtube&amp;display_name=YouTube&amp;src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9cb1Jg3spyQ%3Ffeature%3Doembed" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/916343abbd903bc55c1059b82386dac6/href">https://medium.com/media/916343abbd903bc55c1059b82386dac6/href</a></iframe><p>Have further questions? Join our <a href="https://t.me/brollup">Telegram Community Channel</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=784d428c7446" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brollup/covenant-emulation-with-musig-nested-noist-784d428c7446">Covenant Emulation with Musig-nested-NOIST</a> was originally published in <a href="https://medium.com/brollup">Brollup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Brollup: Built for DoS Resilience]]></title>
            <link>https://medium.com/brollup/brollup-built-for-dos-resilience-ec8d7906d4b3?source=rss-5670c2cb977c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec8d7906d4b3</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[do]]></category>
            <category><![CDATA[noist]]></category>
            <category><![CDATA[brollup]]></category>
            <dc:creator><![CDATA[Burak]]></dc:creator>
            <pubDate>Tue, 21 Jan 2025 12:09:05 GMT</pubDate>
            <atom:updated>2025-01-21T17:28:13.318Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ElRHlj92ZkKqdfKwUZhJA.png" /></figure><p><a href="https://brollup.org/">Brollup</a> emulates covenants through a Musig-nested-<a href="https://github.com/brollup/brollup/tree/main/src/transmutive/noist">NOIST</a> protocol, relying on pre-signed signatures produced during highly interactive signing sessions.</p><p>A major drawback of interactive signing sessions is the vulnerability to <strong>denial of service (DoS) attacks</strong>. Protocols like Coinjoins, Ark, and Brollup (as an Ark variant) require participants to commit to signing transactions. If a participant fails to uphold their commitment, they are blacklisted, and the entire signing session must be restarted.</p><p>In on-chain Coinjoins, the barrier to launching a DoS attack is relatively low. To initiate an attack, an attacker only needs a UTXO, which is a fungible cost to hold. However, in off-chain protocols like Ark, the barrier is even lower, enabling attackers to own small <a href="https://ark-protocol.org/intro/vtxos/index.html">VTXOs</a> and disrupt rounds; every time a round is disrupted, the ASP must redo the entire process, including generating new digital signatures (e.g., to sign the tree). To address this, the dynamics surrounding <a href="https://ark-protocol.org/intro/connectors/index.html">connector outputs</a> need to be reworked, possibly using something like <a href="https://bitcoinops.org/en/topics/matt/">MATT</a>.</p><p>The situation is <strong>worsened</strong> by the compounding effect of external DoS vectors (from users) and internal DoS vectors (from malicious signatories), creating a perfect storm of disruptions. Each layer amplifies the other, making the system highly vulnerable.</p><p>Here’s a breakdown of the problem in different setups:</p><ol><li><strong>Single-server ASP</strong>:<br>When the ASP is a single server, the system is a <strong>complete utter single point of failure</strong>. Entrusting 10+ figures to such a vulnerable setup is a non-starter.</li><li><strong>FROST Quorum ASP</strong>:<br>In a FROST quorum, generating a joint signature with a setup involving 999 signatories could <strong>take up to a minute</strong> under non-optimal conditions. If external DoS attacks are affecting rounds, this introduces significant delays. If both internal and external DoS attacks are in play, a single round could take <strong>several minutes</strong> to complete.</li><li><strong>ROAST Quorum ASP</strong>:<br>While a ROAST quorum is faster, producing a joint signature could still take up to <strong>5–10 seconds</strong> under non-optimal conditions. Even a slight 2–3 second delay per round due to external DoS attacks makes this setup impractical for end-users. If both internal and external DoS attacks are in play, a round could take <strong>up to a minute</strong>, which is unacceptable.</li></ol><h3>NOIST to the Rescue</h3><p>We have been working tirelessly to address the critical issues of DoS vulnerabilities and inefficiencies in interactive signing protocols. After extensive research and testing, we developed <a href="https://github.com/brollup/brollup/tree/main/src/transmutive/noist">NOIST</a> to overcome these challenges.</p><p>NOIST is designed to provide fast, secure, and reliable joint signatures, even in large-scale setups. By mitigating the impact of internal attacks with nonce preprocessing, NOIST ensures robust performance and scalability. It effectively neutralizes the impact of internal DoS attacks and guarantees to produce a valid joint signature in constant time, <strong>well under a second</strong>.</p><p>Here’s a demo of NOIST in production with 999 signatories, generating a valid <a href="https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki">BIP-340</a> aggregate signature in just<strong> one tenth of a second</strong>:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FR3S7C9bNYDc%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DR3S7C9bNYDc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FR3S7C9bNYDc%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b7c3838d49927515c1a90cecbb75e214/href">https://medium.com/media/b7c3838d49927515c1a90cecbb75e214/href</a></iframe><h3>How About External Attacks?</h3><p>Brollup (as an Ark variant) outperforms regular Ark in handling external DoS attacks (from users) due to its use of an account model, though this comes at the cost of privacy. Ark, being a privacy-focused protocol, relies on coin mixing to enhance the anonymity set. In Ark, VTXOs are unlinked and treated as independent entities, which allows them to be blacklisted one by one.</p><p>In contrast, Brollup operates without coins, relying solely on accounts for user identification and blacklisting. While Ark blacklists individual coins, Brollup blacklists accounts as a whole. This difference means that, on Ark, an attacker can disrupt rounds by owning small-value coins and blacklisting them one by one. However, on Brollup, the attacker can only disrupt using a single account.</p><p>With Brollup, we effectively trade off privacy for greater DoS resilience, while enabling smart contract utility.</p><p>Have further questions? Join our <a href="https://t.me/brollup">Telegram Community Channel</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec8d7906d4b3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brollup/brollup-built-for-dos-resilience-ec8d7906d4b3">Brollup: Built for DoS Resilience</a> was originally published in <a href="https://medium.com/brollup">Brollup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing NOIST: a non-interactive, single-round t-of-n threshold signing protocol]]></title>
            <link>https://medium.com/brollup/introducing-noist-a-non-interactive-single-round-t-of-n-threshold-signing-protocol-51225fe513fa?source=rss-5670c2cb977c------2</link>
            <guid isPermaLink="false">https://medium.com/p/51225fe513fa</guid>
            <category><![CDATA[schnorr]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[frost]]></category>
            <category><![CDATA[threshold]]></category>
            <dc:creator><![CDATA[Burak]]></dc:creator>
            <pubDate>Sat, 14 Sep 2024 15:41:17 GMT</pubDate>
            <atom:updated>2024-12-31T11:17:01.986Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ithzzFSa2p9dXf9uAIimew.png" /></figure><p>NOIST is a non-interactive, single-round t-of-n threshold signing scheme.</p><p>NOIST allows multiple untrusted entities to come together and jointly produce a group key and generate signatures in constant time, where a disruptive signer cannot force a re-do of the entire round. The resulting signature is a single 64-byte <a href="https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki">BIP-340</a> compatible Schnorr signature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cKqsi8zzM9971GNs1xm69g.png" /></figure><p>NOIST is specifically designed for <a href="https://brollup.org/">Brollup</a> to aggregate liquidity under a unified framework. Brollup operators operate through an internal consensus mechanism to; (1.) jointly control the liquidity, (2) co-sign vTXOs &amp; virtual channels, and (3) advance the rollup state. To outsiders, they appear as a single entity with a well-known public key, resembling a single-sig server.</p><h3>Key-features</h3><ol><li><strong>Non-interactive<br></strong>FROST and ROAST signatories are required to run an uptime software instance (i.e., on a server) to participate in the signing rounds. NOIST, on the other hand, allows signatories to produce a partial signature using any software, with timing not being a concern. This is because partial signatures are guaranteed to produce a valid full signature at some point in the future.</li><li><strong>Single-round<br></strong>FROST and ROAST require multiple rounds to produce a valid signature. In contrast, NOIST guarantees to produce valid signature in a single round, as long as at least t participants collaborate. A disruptive signer from the subset n-t cannot force a re-do of the entire round.</li><li><strong>Mutability<br></strong>FROST and ROAST quorums are immutable once the shares are distributed. In contrast, NOIST allows signatories to add or remove participants or change setup parameters such as the threshold, as long as at least t participants collaborate. This keeps the group key unchanged while distributing new shares to the added members.</li></ol><h3>Watch the full video to learn more</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9cY-xT5W7Ds%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9cY-xT5W7Ds&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9cY-xT5W7Ds%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cf32eb5474432beb3a39aaca6e2203dc/href">https://medium.com/media/cf32eb5474432beb3a39aaca6e2203dc/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51225fe513fa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brollup/introducing-noist-a-non-interactive-single-round-t-of-n-threshold-signing-protocol-51225fe513fa">Introducing NOIST: a non-interactive, single-round t-of-n threshold signing protocol</a> was originally published in <a href="https://medium.com/brollup">Brollup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Can AMMs Be Built on Brollup?]]></title>
            <link>https://medium.com/brollup/can-amms-be-built-on-brollup-8d296c2ec7a3?source=rss-5670c2cb977c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d296c2ec7a3</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[amm]]></category>
            <category><![CDATA[rollup]]></category>
            <dc:creator><![CDATA[Burak]]></dc:creator>
            <pubDate>Mon, 01 Jul 2024 18:33:38 GMT</pubDate>
            <atom:updated>2024-08-14T12:57:57.612Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*9x37aXqptDIM7k8hPSb0Kg.png" /></figure><p><a href="https://medium.com/@brqgoo/introducing-brollups-18ec4081f6e7">Brollup</a> allows us to introduce <em>payable</em> types and enables smart contracts to accept Bitcoin payments. Unlike Ethereum, however, smart contracts in the Brollup context do not hold custody of Bitcoin; instead, they facilitate atomic trades between two parties using introspective assertion logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kLzn4swccAwlwXYc.png" /></figure><p>Our <em>payable</em> construction enables non-Bitcoin asset types, such as collectibles, stablecoins, or even financial derivatives, to be atomically exchanged for Bitcoin. As outlined in the earlier announcement, this covers over 90% of DeFi use cases, whether it’s building an NFT marketplace, where the buyer pays with Bitcoin upon execution, or creating a decentralized order book, where the filler pays with Bitcoin upon execution.</p><p>And you may have been wondering whether it is also possible to build an AMM. The answer is yes!</p><p>First of all, it is certainly possible to build liquidity pools for token-to-token pairs, since this type of construction does not involve a Bitcoin payment; it involves swapping a non-Bitcoin asset for another non-Bitcoin asset.</p><p>Suppose we have a $PEPE token issued on Brollup, and our <a href="https://x.com/paoloardoino">Italian overlords</a> have also issued $USDT. We can deploy an AMM contract as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xd8mIO3lyMgwv6jhUNdiaQ.png" /><figcaption>PEPE&lt;&gt;USDT AMM contract</figcaption></figure><p>With this contract, we can swap between $PEPE and $USDT or add/remove liquidity in a CPMM fashion. However, we can’t swap between $BTC and $PEPE because this contract does not support a <em>payable</em> construction.</p><p>To facilitate swaps involving the $BTC pair, we can create another contract designed for swapping $BTC and $USDT in an orderbook fashion, then route through the AMM contract to execute the $USDT -&gt; $PEPE swap.</p><p>We can deploy a $BTC&lt;&gt;$USDT orderbook as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zIqOC5zcZ-yv6woymXtfjw.png" /><figcaption>USDT&lt;&gt;BTC Orderbook Contract</figcaption></figure><p>With this contract, we can swap between $BTC and $USDT in an orderbook fashion. Due to $BTC &lt;&gt; $USDT being a primary trading pair, this contract is anticipated to be highly liquid.</p><p>Given that contracts can call each other, we can initiate the swap by first converting $BTC to $USDT through the orderbook contract, then route through the AMM contract to execute the $USDT -&gt; $PEPE swap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zE3RBZLdxaTVMWN5Bn8E8A.png" /></figure><p>This setup allows us to execute the $BTC -&gt; $USDT -&gt; $PEPE route when swapping $BTC for $PEPE, or the $PEPE -&gt; $USDT -&gt; $BTC route when swapping $PEPE for $BTC. Either both contracts succeed, or the transaction terminates due to an asserted failure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d296c2ec7a3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brollup/can-amms-be-built-on-brollup-8d296c2ec7a3">Can AMMs Be Built on Brollup?</a> was originally published in <a href="https://medium.com/brollup">Brollup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[State Channel Design]]></title>
            <link>https://medium.com/brollup/introducing-brollup-v2-now-without-the-trusted-setup-fce9c0098177?source=rss-5670c2cb977c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fce9c0098177</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[rollup]]></category>
            <dc:creator><![CDATA[Burak]]></dc:creator>
            <pubDate>Fri, 28 Jun 2024 17:34:50 GMT</pubDate>
            <atom:updated>2024-12-19T18:06:21.216Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2gthw6mrRmCsP43MFN4uhg.png" /></figure><p>Last week, I <a href="https://medium.com/@brqgoo/introducing-brollups-18ec4081f6e7">introduced</a> Brollup, a Bitcoin-native rollup design that works with a native Bitcoin peg and does not require any changes to the Bitcoin protocol. The design, however, generally relied on a trusted setup, requiring at least one member to act honestly.</p><p>With some clever design adjustments, I’ve found a way to eliminate the need for the trusted setup. And now, presenting the v2 design!</p><p>Brollup v2 introduces a new <a href="https://ethereum.org/en/developers/docs/scaling/state-channels/">state channel</a> design and <strong>eliminates the need for a trusted setup</strong> by making the global state <strong>statechannel-aware</strong>. The core idea is to execute <em>payable</em> conditions based on state updates rather than creating new VTXOs. This decouples finality from block production and ties it directly to state updates.</p><p>This is similar to the <a href="https://lightning.network/lightning-network-paper.pdf">Lightning Network</a>; however, Lightning operates in a 2-of-2 setting, where only the involved parties are aware of the channel’s state. The channel state remains private, with outsiders gaining limited information only in the event of a <a href="https://docs.lightning.engineering/the-lightning-network/payment-channels/lifecycle-of-a-payment-channel">force closure</a>.</p><p>The strategy involves making channel states publicly accessible to everyone at all times. By publicly exposing channel content and ensuring accessibility at the DA layer, the global state becomes aware of individual channel states. Implementing this for all channels enables our <a href="https://github.com/bitcoin-vm">Bitcoin Virtual Machine</a> to verify payments between specific channels and execute <em>payable</em> conditions accordingly.</p><p>While one might expect storing channel content in the DA to consume a significant number of bytes, this isn’t the case! Brollup v2 employs an efficient approach where the only overhead comes from an 8 vByte signature commitment s by the operator. All other channel content can be derived from the <em>calldata </em>field<em> </em>outlined in my <a href="https://medium.com/@brqgoo/introducing-brollups-18ec4081f6e7">earlier announcement</a>.</p><p>We can already determine the sender (msg.sender) and receiver (as asserted in the contract logic), along with their respective channel locations. Our channel design also avoids non-deterministic variables like in-flight <a href="https://bitcoinops.org/en/topics/htlc/">HTLCs</a> or <a href="https://bitcoinops.org/en/topics/ptlc/">PTLCs</a>, allowing the entire channel content to be derived from the <em>calldata</em> alone. The only additional overhead is the 8 vByte signature commitment s from the operator, given that the signature nonce R chosen by the operator is also deterministic. This is all there is!</p><h3><strong>Covenant</strong></h3><p>Before delving into the channel specifics, let’s review the changes in the covenant setup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SFJWweGDF9mFZJtmSRWhyQ.png" /><figcaption>The Default Tree— with 90 days-long expiry.</figcaption></figure><p>In contrast to the design described in my <a href="https://medium.com/@brqgoo/introducing-brollups-18ec4081f6e7">earlier announcement</a>, Brollup v2 removes kdc.signers (top 64k accounts) from enforcing the covenant, thereby reducing interactivity. Now, only msg.senders and the operator enforce the covenant, and the tree expires in <strong>90 days</strong> instead of one week.</p><p>As the covenant expires in 90 days, accounts must refresh their VTXOs by sending coins to themselves every 90 days; otherwise, their coins can be taken, in theory, by the operator.</p><p>When accounts refresh their coins, they send coins to themselves, thereby participating in the same covenant setup that they enforce. In this case, the covenant cannot be violated. It is entirely sufficient for msg.senders to enforce the covenant themselves; breaking a covenant involving their own coins would be self-defeating for an owner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rfwvHpMA8LZlGXTEFWNcpA.png" /><figcaption>The Onboarding Tree — with 10 days-long expiry.</figcaption></figure><p>When an account initially onboards, they receive their VTXOs within an onboarding tree that expires in <strong>10 days</strong>. In this case, the covenant enforcing these coins is bound by another sender. Therefore, the account must refresh these coins into the default tree, which they own and control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NMCannp-7A8HJ40SgIzyww.png" /><figcaption>channel:trigger -&gt; channel:root</figcaption></figure><p>Brollup v2 makes it possible to establish a <strong>virtual channel</strong> from the VTXO. To enable this, a virtual UTXO is provided with two spending paths:</p><ol><li><strong>The Channel path</strong><br>This is a 2-of-2 path used by both the operator and the owner to establish a virtual channel.</li><li><strong>The Claim path</strong><br>If the operator is uncooperative in setting up a channel, the owner can access coins from this path after the timeout.</li></ol><h3>Channel Design</h3><p>Brollup channels are easy to reason about;</p><ul><li>No <a href="https://github.com/lightning/bolts/blob/master/05-onchain.md">revocation</a>: Each new channel state overwrites the previous one with higher precedence.</li><li>No <a href="https://github.com/lightning/bolts/blob/master/03-transactions.md">basepoints</a>: It’s always the same key for to_self and to_operator. Keys are re-used without involving any point tweaking.</li><li>No <a href="https://bitcoin.stackexchange.com/questions/83312/lightning-network-asymmetry-in-the-information-tracked-by-each-participant">assymetry</a>: Channel state is symmetric, reproducible, and always descend from the channel root.</li><li>No <a href="https://medium.com/@peter_r/visualizing-htlcs-and-the-lightning-networks-dirty-little-secret-cb9b5773a0">middle-stages</a>: No in-flight HTLCs or PTLCs. It is always about to_self and to_operator. Payments are linked through <a href="https://ark-protocol.org/intro/connectors/index.html">connectors</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXsvbpCgVVd9j44qSU5r1w.png" /></figure><p>Brollup channels operate as a 2-of-2 between <strong>to_self</strong>, which refers to the Brollup account itself, and <strong>to_operator</strong>. Both parties collaboratively sign state updates from the <strong>channel path</strong> to advance the channel state.</p><p>Unlike Lightning, Brollup channels do not use a revocation mechanism. Instead, each new channel state overwrites the previous one with higher precedence, rather than revoking it. This is similar to <a href="https://blockstream.com/eltoo.pdf">Eltoo</a>; however, while Eltoo chains Bitcoin transactions together, we do not. A new channel state always descend from the channel root.</p><p>Brollup v2 utilizes a degrading relative timelock scheme to ensure that each new channel state has higher precedence than the previous one. By default, we use 64 degrading periods. The virtual channel output (channel:root) is a <a href="https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki">taptree</a> with 64 leaves, where each tapleaf corresponds to a degrading period. Each period is a 2-of-2 between <strong>to_self</strong> and <strong>to_operator</strong> with a relative timelock, where the duration starts at 64 days and degrades by one with each subsequent period.</p><p>A user might choose to opt-in to more than 64 leaves, allowing the channel to accommodate more state updates throughout its lifetime. This comes with the tradeoff of increased waiting time in the event of unilateral closure, however, multiple layers of timelocks also serve as a means to provide everyone with a fair guarantee of unilateral exit in a mass-exit scenario, so this isn’t quite really a tradeoff. As for the on-chain footprint, the number of leaves scales logarithmically well for the <a href="https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki">control block</a>.</p><p>A channel completes its lifetime either when 90 days have elapsed or 64 state transitions have occurred. The account then refreshes the virtual channel into a fresh, new tree. In the case where a channel has expired and not been refreshed, or the channel does not have enough <a href="https://bitcoin.design/guide/how-it-works/liquidity/">liquidity</a>, the account receives payments in the form of new VTXOs (within the onboarding tree).</p><p>Brollup v2 incorporates two type of payments:</p><ol><li><strong>P2VTXO (Pay-to-vtxo)</strong> <br>For making payments from a channel to a brand-new VTXO.</li><li><strong>P2SCOM (Pay-to-s-commitment)<br></strong>For making payments from a channel to another channel.</li></ol><h3>P2VTXO (Pay-to-vtxo)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O56Ad2fzhCDiTDkifx3aNw.png" /><figcaption>P2VTXO — the sender pays the recipient 0.1 BTC in the form of a vtxo</figcaption></figure><p>P2VTXO (Pay-to-VTXO) involves making a payment from a channel to a VTXO. The sender swaps out their channel liquidity for a fresh new VTXO. The recipient receives a new VTXO within the onboarding tree, bound by the msg.sender. This occurs when the intended recipient is not yet onboarded or lacks sufficient inbound liquidity in their channels.</p><p>P2VTXO is a straightforward process:</p><ol><li>The operator creates a round transaction by allocating 0.1 BTC to the recipient and adding a connector output to the msg.sender’s channel.</li><li>The msg.sender (to_self) and the operator (to_operator) sign a state update from the channel, pushing 0.1 BTC to the operator’s side in exchange for the atomic payment in the round transaction.</li></ol><p>The connector output provided by the operator also commits to the <em>calldata</em>, ensuring the authenticity and atomicity of the contract execution.</p><h3>P2SCOM (Pay-to-s-commitment)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DNJgpFwkZo3orwK04lqMuA.png" /><figcaption>P2SCOM — the sender (to_self) pays the recipient 0.1 BTC within their channel</figcaption></figure><p>P2SCOM (Pay-to-s-commitment) involves making a payment from a channel to another channel. The recipient receives their payment directly into their channel, rather than as a brand-new VTXO. This occurs when the intended recipient is already a user and has sufficient inbound liquidity in their channels.</p><p>In contrast to Lightning, the recipient can receive payments without needing to be online. The operator simply signs a channel update in favor of the recipient, pushing the value to the recipient’s side, and provides their version of the s commitment in the witness.</p><p>The operator, however, does not disclose the s value outright. Instead, the operator initially commits to the s value using a hashlock in the witness, proves with a zero-knowledge proof that the hashlock commitment is valid, and promises to reveal the actual s<em> </em>value afterward. This precaution is necessary to prevent the sender and recipient from colluding to steal funds from the operator by refusing to sign the channel update after obtaining the s value. Once the sender forfeits their channel liquidity by signing a state update, the operator reveals the s value directly in the witness.</p><p>As outlined in my <a href="https://brqgoo.medium.com/introducing-brollups-18ec4081f6e7">earlier announcement</a>, the <em>calldata</em> output is utilized as the change output for the operator, revealing the payload and now the s values<strong> </strong>in the subsequent transaction. With the new <em>calldata</em> output structure, the operator must now reveal the s values (in pushdata chunks) to access their change funds; otherwise, the output can be taken by the msg.senders :</p><pre><strong>Witness Elements:</strong></pre><pre>1. &lt;operator signature&gt;<br>2. &lt;s values in single chunk&gt;<br>3. &lt;0x01&gt; // True</pre><pre>--------------------------------------------------------------------</pre><pre><strong>Witness Script:</strong></pre><pre>OP_IF</pre><pre>// Operator must reveal the s values to access their change</pre><pre>OP_HASH160<br>&lt;s values commitment&gt;<br>OP_EQUALVERIFY</pre><pre>&lt;operator key&gt;<br>OP_CHECKSIG</pre><pre>OP_ELSE</pre><pre>// Or otherwise this change becomes spendable by msg.senders[]</pre><pre>&lt;24 hours&gt;<br>OP_CHECKSEQUENCEVERIFY</pre><pre>&lt;msg.senders[] aggregate key&gt; // msg.senders pre-sign from this key<br>OP_CHECKSIG</pre><pre>OP_ENDIF</pre><pre>// Calldata is revealed regardless</pre><pre>OP_FALSE <br>OP_IF </pre><pre>&lt;calldata&gt; </pre><pre>OP_ENDIF </pre><h3>Nonce Selection</h3><p>Picking signature nonces deterministically from a well-known basepoint is not safe, as it can lead to private key recovery. However, using different keys for the same nonce is safe against private key recovery, as long as the nonce remains secret and keys are unlinked.</p><p>Brollup v2 employs a unique approach to save 32 bytes for the signature nonce R by pre-selecting 64,000 nonces hardcoded in the client software, and re-assigning the <strong>to_operator</strong> key from a random entropy in every state transition. This approach involves using identical nonces with varying keys, rather than using identical keys with varying nonces.</p><p>The pool of 64,000 hardcoded nonces (that is 2MB!) effectively supports the potential creation of up to 1,000 new virtual channels, with each capable of accommodating a maximum of 64 state updates in each state transition.</p><h3>What’s changed in v2?</h3><ol><li>✅<strong> No trusted setup </strong><br>State channel design eliminates the need for trusted setup.</li><li>✅ <strong>Efficient liquidity</strong> <br>State channel design leads to a more efficient use of liquidity.</li><li>✅ <strong>Interactivity cut significantly<br></strong>Reduced interactivity due to the removal of kdc.signers from the set.</li><li>✅ <strong>Longer liveness<br></strong>Our use of state channel enables a longer expiration period of 90 days.</li><li>✅ <strong>Immediate finality <br></strong>Finality for <em>payable</em> executions no longer tied to block-production.</li><li>❌ <strong>8 vByte overhead<br></strong>Reduced TPS for <em>payable</em> executions due to an 8 vByte overhead.</li></ol><h3>New TPS Projections</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jyCuXNifUupmdulTbI62Dg.png" /></figure><p>Due to the 8 vByte overhead in <em>payable</em> executions, TPS projections for token order place &amp; fill and nft auction list &amp; sell have been reduced to 147 and 148, respectively. TPS projections for non-payable transaction types such as token transfers and nft transfers remain unchanged.</p><h3>Conclusion</h3><p>Brollup v2 is a net improvement over the earlier design. It makes liquidity more efficient, increases liveness, enables higher liquidity velocity, and most importantly, removes the need for a trusted setup — all without requiring a protocol change to Bitcoin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4QLjqFfvrK-ORxNJTxWxnw.png" /><figcaption>BVM vs. EVM comparsion</figcaption></figure><p>Brollup provides an order of magnitude better user experience than Ethereum, operating natively on Bitcoin with BTC as the native gas asset.</p><p>Interested in learning more? Join our <a href="https://t.me/brollups_community">TG community channel</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fce9c0098177" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brollup/introducing-brollup-v2-now-without-the-trusted-setup-fce9c0098177">State Channel Design</a> was originally published in <a href="https://medium.com/brollup">Brollup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Brollup]]></title>
            <link>https://medium.com/brollup/introducing-brollups-18ec4081f6e7?source=rss-5670c2cb977c------2</link>
            <guid isPermaLink="false">https://medium.com/p/18ec4081f6e7</guid>
            <category><![CDATA[rollup]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Burak]]></dc:creator>
            <pubDate>Fri, 21 Jun 2024 02:06:21 GMT</pubDate>
            <atom:updated>2025-01-12T09:05:38.440Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k3z82PqODHqB5zN7ccoUSA.png" /></figure><p><a href="https://github.com/brollup">Brollup</a> is a rollup designed for scalable, Bitcoin-native smart contracts. A ‘true’ layer two with unilateral exit, Brollup ensures users retain full custody of their funds while rollup operators solely provide the service. No trusted setup. No 1-of-n trust assumption.</p><p>Brollup utilizes Bitcoin block space for data availability and incorporates a state channel model with global state. Operating in a layer-two setting, Brollup supports unilateral exit and does not rely on any trust assumptions.</p><p>Brollup is in a category of their own, neither optimistic, ZKP, nor sovereign. Brollup is deeply baked into Bitcoin and work natively with Bitcoin as a <em>payable</em> construct.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gcwd-rypOOhAkklKn5tDJw.png" /><figcaption>Rollups Competitive Landscape</figcaption></figure><p>Brollup is operated by a quorum of operators. Operators provide liquidity to the protocol and advance the rollup state by chaining Bitcoin transactions at regular intervals.</p><p>Brollup uses the Bitcoin blockchain as the data availability layer<em>,</em> and run transactions on a virtual machine with a global state.</p><p>Brollup is build upon the concept of <a href="https://ark-protocol.org/intro/vtxos/index.html">virtual UTXOs (VTXOs)</a>; simply enabling their use in smart contracts as <em>payable</em> constructs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Py9GAm6vvV1_9lWkn_kWTg.png" /></figure><p>Brollup is, in short, coinswaps between VTXOs and <em>calldatas</em>.</p><p>Like how <a href="https://ark-protocol.org/">Ark Network</a> swaps VTXOs for new VTXOs, Brollup swaps VTXOs for <em>calldata (</em>plus<em> </em>new VTXOs<em>)</em>.</p><p>VTXOs are verifiable off-chain, and enforceable on-chain. <em>Calldata</em>, on the other hand, undergoes client-side validation; Bitcoin clients only see it as bytes, while Brollup clients read and interpret the bytes.</p><p>Since <em>calldata</em> is evaluated within the client-side validated context, and VTXOs are verifiable off-chain, a VTXO can be swapped for <em>calldata </em>that executes a <em>payable</em> condition in the smart contract.</p><p>Brollup combines <em>calldata</em> with VTXOs to execute <em>payable</em> contract conditions, where, for example, the contract can grant tokens to the <strong>msg.sender</strong> in exchange for paid Bitcoin, with the location of the payment VTXO derived from the <em>calldata</em>.</p><p>This covers &gt;90% of DeFi use-cases, whether it’s listing an NFT for sale in exchange for Bitcoin, where the buyer pays with Bitcoin upon execution, or placing a token sell order on a decentralized exchange, where the filler pays with Bitcoin upon execution. All atomically executed, verifiable, scalable, and enforcable on Bitcoin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sep6ABfEvgYXtFChbIjgyg.png" /><figcaption>Possible Brollup Applications</figcaption></figure><p>Simply put, Brollup extends upon <a href="https://ark-protocol.org/intro/vtxos/index.html">VTXOs</a> and utilize them as <em>payables</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aQsiA3yMBzbRmRVKScu_lQ.png" /></figure><h3>TPS Projections</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V9qzoUPDxPXosW-dL7n3Gw.png" /><figcaption>TPS projections (assumes entire Bitcoin blockspace is used and others fields are ignored)</figcaption></figure><p>Brollup scales exceptionally well in terms of transactions executed per second (TPS). This efficiency is attributed to the effective use of data availability, which can be categorized into <strong>three key areas</strong>:</p><ol><li><strong>Compact DA Encoding<br></strong>Brollup employs a compact DA encoding structure with bit-level commitments to efficiently store transactions.</li><li><strong>Signature Aggregation<br></strong>Brollup aggregates signatures by summing the nonces and commitments, rather than aggregating signatures using ZKPs.</li><li><strong>Virtual UTXOs<br></strong>Brollup works with <a href="https://ark-protocol.org/intro/vtxos/index.html">virtual UTXOs</a> instead of bare UTXOs. This means Brollup consume almost no on-chain footprint for <em>payable</em> referencing.</li></ol><h4>Brollup vs. PSBTs</h4><p>An on-chain Ordinals PSBT trade consumes roughly <strong>∼330 vBytes</strong>, whereas the entire process of trading an NFT on a Brollup marketplace, from listing to selling, consumes only<strong> 3.25 vBytes</strong>. This means that trading NFTs on Brollup is <strong>100x times</strong> more scalable than trading with PSBTs.</p><h4>Brollup vs. Omni</h4><p>An on-chain Omni Layer token transfer consumes roughly <strong>∼250 vBytes</strong>, whereas transferring tokens on Brollup consumes only<strong> 2.21 vBytes</strong>. This means transferring tokens on Brollup is <strong>110x times</strong> more scalable than transferring on Omni Layer.</p><h3>Contract Example— NFT Marketplace</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cB1rA90ZGgfqK7GxXsHWMg.png" /></figure><p>This is an example NFT marketplace contract that can be run on the <strong>Bitcoin Virtual Machine</strong>, containing three callable methods:</p><ol><li><strong>nft_auction_list<br></strong>msg.sender (Alice) calls this method to list her piece for sale, providing two arguments: her NFT contract address (Contract) and price tag (u32).</li><li><strong>nft_auction_buy<br></strong>msg.sender (Bob) calls this method to buy Alice’s piece, providing an argument and a payment: Alice’s NFT contract address (Contract) and the Bitcoin payment (Payable).</li><li><strong>nft_auction_cancel<br></strong>msg.sender (Alice) calls this method to cancel her listing if no one is interested in buying her piece, providing one argument: her NFT contract address.</li></ol><h3>The Covenant</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YGrsGCCuRUPZ1IMcqLVePQ.png" /></figure><p>Brollup uses Musig-nested-<a href="https://blog.brollup.org/introducing-noist-a-non-interactive-single-round-t-of-n-threshold-signing-protocol-51225fe513fa?source=collection_home---4------0-----------------------">NOIST</a> to emulate covenants. The two involved parties in the covenant setup are:</p><ol><li><strong>Operator Key</strong><br>The Brollup operator is a <a href="https://blog.brollup.org/introducing-noist-a-non-interactive-single-round-t-of-n-threshold-signing-protocol-51225fe513fa?source=collection_home---4------0-----------------------">NOIST</a> quorum of thousands of signatories. The quorum members jointly sign with their FROST shares to contribute to the broader Musig-nested covenant.</li><li><strong>msg.senders[] Aggregate Key</strong><br>Accounts that transact on the Brollup (msg.senders) each sign with their key to constrain virtual UTXOs. All individual msg.sender keys are aggregated into a single key in coordination with the operator.</li></ol><h3>Forfeiting</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u7ONXKTaMCt1pioxALlG_w.png" /></figure><p>To call a <em>payable</em> smart contract and pay transaction fees on Brollup, <strong>msg.senders</strong> atomically swap their VTXOs for new VTXOs through a process known as <a href="https://ark-protocol.org/intro/connectors/index.html">forfeiting</a>.</p><p>To forfeit a VTXO, the owner (<strong>msg.sender</strong>) signs the VTXO outpoint together with the <a href="https://ark-protocol.org/intro/connectors/index.html">connector</a> provided by the operator. The outpoint reference of the provided connector commits to <strong>three areas</strong>:</p><ol><li><strong>Calldata</strong><br>Forfeited VTXOs commit to <em>calldata</em>, encoded in the witness of the calldata output (the payload). This ensures the atomicity of the committed data whether its a contract call or a contract deployment.</li><li><strong>Payable VTXOs</strong><br>Forfeited VTXOs commit to new VTXOs, similar to vanilla <a href="https://ark-protocol.org/">Ark</a> payments. In the Brollup context, however, these VTXOs serve as <em>payable</em> constructs in smart contracts, as they are verifiable off-chain without additional DA overhead (the location is derived from <em>calldata</em>).</li><li><strong>Transaction fees<br></strong>Forfeited VTXOs commit to transaction fees that are distributed among miners, the operator, and kdc.signers, in accordance with feeconomics.</li></ol><p>Calldata outputs are utilized as the change output for the operator, revealing the payload they contain in the subsequent transaction. The calldata output contains the following script:</p><pre>// Store calldata in the witness<br>OP_FALSE<br>OP_IF<br><br>OP_PUSHDATA<br>&lt;CALLDATA&gt;<br><br>OP_ENDIF<br><br>OP_IF<br><br>// The operator uses this as the change output for the next round.<br>&lt;operator key&gt;<br>OP_CHECKSIG<br><br>OP_ELSE<br><br>// The otherwise this becomes anyone-can-spend. <br>// This encourages the operator to keep its operations running without interruption.<br>&lt;24 hours&gt;<br>OP_CHECKSEQUENCEVERIFY<br><br>OP_ENDIF</pre><h3>Account Model</h3><p>Brollup operates on an account-based model, where <a href="https://nostr.com/">Nostr</a> public keys function as the designated accounts. Much like Ethereum addresses, Nostr keys serve as the dedicated identifiers through which users interact and transact on the network.</p><p>To facilitate efficient transactions and minimize blockspace usage, accounts are indexed and identified by their index numbers, similar to the data encoding scheme used in optimistic rollups.</p><p>Initially, a large list of existing Nostr keys will be indexed and hardcoded into the <em>npub directory</em> of Brollup clients. This allows Brollup clients to access and reference accounts using their compact index numbers.</p><p>As new users transact, their accounts are automatically appended to the <em>npub directory</em> for efficient referencing later. This efficient referencing occurs during the bit-encoding process of the payload.</p><h3>Compact Payload Encoding (CPE)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yVQ4uXP5B9S1AnWxRumNsQ.png" /></figure><p>Transactions on Brollup are referred to as entries. An entry either calls a smart contract or deploys a new contract.</p><p>Brollup employs a compact payload encoding structure with bit-level commitments to efficiently store entries. Entries are sequentially encoded within the payload, followed by the aggregate signature.</p><p>Brollup aggregates signatures by summing the signature nonces and commitments, similar to how ZK rollups aggregate signatures using ZKPs. This aggregation occurs during the <strong>entry signing session</strong> in coordination with the operator.</p><p>The payload is split into 520-byte chunks and stored directly in the witness;</p><pre>OP_FALSE<br>OP_IF<br><br>OP_PUSHDATA<br>&lt;chunk_1&gt;<br><br>OP_PUSHDATA<br>&lt;chunk_2&gt;<br><br>...<br><br>OP_PUSHDATA<br>&lt;chunk_n&gt;<br><br>OP_ENDIF</pre><p>Entries contain the following fields in the payload encoding:</p><ol><li>account index</li><li>contact index</li><li>method call</li><li>calldata</li></ol><h4>Account Index</h4><p>Accounts are indexed by their rank, which is determined by how frequently they transact. First two bits of the <strong>account index</strong> maps to four different index tiers;</p><p><strong>00</strong> -&gt; this an <strong>unregistered</strong> <strong>account</strong>, followed by the 256-bits x-only <em>npub</em>.<br><strong>01</strong> -&gt; this a<strong> registered frequent</strong> account,<strong> top-65025</strong> on the rank. followed by the 16 bits index number.<br><strong>10</strong> -&gt; this a<strong> registered non-frequent </strong>account, between <strong>65025–16646400</strong> on the rank. followed by the 24 bits index locator number.<br><strong>11</strong> -&gt; this a <strong>registered non-frequent </strong>account, between <strong>16646400–4244897025</strong> on the rank. followed by the 32 bits index locator number.</p><p><strong>account index</strong> is followed by the <strong>contract index</strong>;</p><h4>Contract Index</h4><p>Contracts are indexed by their rank, which is determined by how frequently they are called. First two bits of the <strong>contract index</strong> maps to four different index tiers;</p><p><strong>00</strong> -&gt; this is a <strong>contract deployment</strong>, followed by the <strong>contract bytecode</strong> starting with the <em>varint</em> prefix.<strong><br>01</strong> -&gt; this is a <strong>frequent</strong> contract, <strong>top-64</strong> on the rank. followed by the 6-bit index number.<br><strong>10</strong> -&gt; this is a <strong>non-frequent</strong> contract, between<strong> 64–65089 </strong>on the rank. followed by the 16 bits index locator number.<br><strong>11</strong> -&gt; this is a <strong>non-frequent</strong> contract, between<strong> 65089–1061208000 </strong>on the rank. followed by the 30 bits index locator number.</p><p><strong>contract index</strong> is followed by the <strong>method call</strong>, if it is not <strong>0b00</strong>.</p><h4>Method Call</h4><p>Method calls are indexed based on their written order when the IDE compiles the contract into bytecode. First bit of the <strong>method call </strong>maps to two different index tiers;</p><p><strong>0</strong> -&gt; index of the called method is <strong>#4 </strong>or less, followed by the 2-bit index number.<br><strong>1</strong> -&gt; index of the called method is between <strong>#4 — #20</strong>, followed by the 4-bit index locator number.</p><p><strong>method call</strong> is followed by the <strong>calldata</strong>.</p><h3>Sessions</h3><p>A Brollup state transition involves four subsequent sessions;</p><ol><li><strong>Entry Signing Session</strong>;<br>This session sums individual signatures from <strong>msg.senders</strong> of the round and results in an aggregate signature to authorize the payload.</li><li><strong>KDC Session</strong><br>This session sums individual signatures from the <strong>top 16,384 accounts</strong> by their rank and results in an aggregate signature to constrain <em>payable</em> VTXOs to the shared output.</li><li><strong>Covenant Signing Session</strong><br>This session sums individual signatures from <strong>msg.senders </strong>of the round<strong> </strong>and results in an aggregate signature to constrain <em>payable</em> VTXOs to the shared output.</li><li><strong>Forfeiting Session<br></strong>This session forfeits VTXOs from <strong>msg.senders</strong> of the round to cover transaction fees and <em>payable</em> VTXOs.</li></ol><h4>Entry Signing Session</h4><p>Accounts that are initiating calls or deploying contracts initially participate in this session to aggregate their signatures in coordination with the operator. This session employs a straightforward, single-round aggregation scheme where each <strong>msg.sender</strong> signs their own version, with the signature committing to <strong>H(m)</strong> rather than <strong>H(R || P || m)</strong>. This allows the operator to simply sum all signatures in a single round. The resulting signature is a 64-byte Schnorr signature, which is batch-verified within the Brollup context.</p><pre>  +--------------+                                      +--------------+<br>  |              |--(1)---       entryCtx         -----&gt;|              |<br>  |              |&lt;-(2)---       entryAck         ------|              |<br>  |              |                                      |              |<br>  |  msg.sender  |     // wait until the operator       |   operator   |<br>  |              |     // aggregates all entries        |              |<br>  |              |                                      |              |<br>  |              |&lt;-(3)---      payloadCtx        ------|              |<br>  +--------------+                                      +--------------+</pre><p>(1) msg.sender creates a <strong>entryCtx</strong>, and requests to join the round;</p><p>let <strong>entryCtx</strong> = <em>(</em>prevHash<strong>, </strong>npub<em>, </em>entry, sig<em>), </em>where;</p><ul><li><strong>prevHash </strong>is the hash of previous Brollup state</li><li><strong>nsec </strong>is secret key of the msg.sender</li><li><strong>npub </strong>is the public key of the msg.sender; nsec • G</li><li><strong>entry</strong> is the non-compact bytecode of the entry that msg.sender intends to transact;</li></ul><pre>account id (32 bytes) || contract id (32 bytes) || method call (1 byte) || calldata (varsize)</pre><ul><li>let <strong>message</strong> = TaggedHash(bytes(prevHash<strong> || </strong>entry<strong>)</strong>, “SighashEntry”)</li><li>let <strong>nonce</strong> = TaggedHash(bytes(message<strong> || </strong>nsec<strong>)</strong>, “DeterministicNonce”)</li><li>let<strong> sig </strong>= (nonce • G, (nonce + message • nsec<strong>)</strong> mod n)</li></ul><p>(2) operator responds with an acknowledge message, <strong>entryAck</strong>.</p><p>(3) The operator gathers all entries, sums the signatures, and responds with <strong>payloadCtx</strong>;</p><ul><li>let <strong>aggpub</strong> = nsec<em>1</em> • G + nsec<em>2</em> • G .. nsec<em>N</em> • G</li><li>let <strong>aggmsg</strong> = m<em>1</em> + m<em>2</em> .. m<em>N</em></li><li>let <strong>aggnonce</strong> = 𝑘<em>1</em> • G + 𝑘<em>2</em> • G .. 𝑘<em>N</em> • G</li><li>let <strong>aggcmt</strong> = (𝑘<em>1</em> + m<em>1</em> • nsec<em>1</em><strong>) + </strong>(𝑘2 + m2 • nsec2<strong>) … </strong>(𝑘<em>N</em> + m<em>N</em> • nsec<em>N</em><strong>)</strong></li><li>let <strong>aggsig = </strong>(aggnonce, aggcmt)</li><li>let <strong>payloadCtx</strong> = <em>(</em>prevHash<em>, </em>npubs[], entries[], fee, aggsig)</li></ul><p>At the end of the round, based on the list of <strong>entries[]</strong> and the <strong>fee</strong> provided, msg.senders can deterministically see the outcome of their execution and determine the precise amount they need to pay for the execution.</p><p>If the outcome of the execution results in an asserted failure in the contract logic, the msg.sender is removed from the round. This prevents failed transactions from being included in blocks, thereby saving space and fees.</p><h4>KDC Session</h4><p>A Key-Deletion-Covenant session, or KDC session for short, gathers signatures from the <strong>top 16,384 accounts</strong> by their rank and results in an aggregate signature to constrain <em>payable</em> VTXOs to the shared output. If at least one of the 16,384 accounts is honest, the covenant holds true. The information about which of the top 16,384 accounts participated in the KDC session is encoded in a compact field called <strong>bitmap</strong>.</p><h4>Bitmap</h4><p>Bitmap is a compact 16,384-bit-long bitstring that maps to the participants of the KDC session. Each bit indicates whether the <em>n</em>th account by rank participated in the session. Bitmap is stored in the <a href="https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#cite_note-5"><em>annex</em></a> of the first prevout, consuming a discounted space of 256 vBytes in each state transition.</p><pre>1st bit: <strong>0</strong> -&gt; Account #1 by rank <strong>did not</strong> participate in the KDC<br>2nd bit: <strong>1</strong> -&gt; Account #2 by rank <strong>did</strong> participate in the KDC<br>3rd bit: <strong>1 </strong>-&gt; Account #3 by rank <strong>did </strong>participate in the KDC<br>4th bit: <strong>0 </strong>-&gt; Account #4 by rank <strong>did</strong> <strong>not</strong> participate in the KDC<br>5th bit: <strong>1 </strong>-&gt; Account #5 by rank <strong>did</strong> participate in the KDC<br>.<br>.<br>.<br>16,384th bit: <strong>1</strong> -&gt; Account #16384 by rank <strong>did</strong> participate in the KDC</pre><p>It is possible to map from <strong>bitmap</strong> to an array of signers <strong>kdc.signers[] </strong>using a function <strong>bitmapToSigners()</strong>;</p><ul><li>let <strong>bitmapToSigners</strong>(bitmap) =&gt; kdc.signers[]<br><strong> </strong>For each <strong>bit</strong> in the <strong>bitmap</strong>, output the array of signers <strong>kdc.signers[]</strong>;<strong><br>1 </strong>-&gt; kdc.signers.push( npub_directory[ iterator++ ] )<br><strong>0 </strong>-&gt; iterator++</li></ul><p>It is possible to compute aggregate KDC key <strong>aggkey</strong> by summing the npubs of kdc.signers[];</p><ul><li>let <strong>keyaggCtx</strong> = KeyAgg( kdc.signers[] ) =&gt; (Q, gacc, tacc)</li><li>Let <em>(</em><strong>aggkey</strong><em>, _, _) = </em><strong>keyaggCtx</strong></li></ul><pre>  +--------------+                                      +--------------+<br>  |              |--(1)---     covenantCtx        -----&gt;|              |<br>  |              |&lt;-(2)---      pubnonce          ------|              |<br>  |              |                                      |              |<br>  |              |     // wait until the operator       |              |<br>  |              |     // aggregates all pubnonces      |              |<br>  |              |                                      |              |<br>  |   operator   |--(3)---       kdcCtx           -----&gt;|  kdc.signer  |<br>  |              |&lt;-(4)---     partialsig         ------|              |<br>  |              |                                      |              |<br>  |              |    // wait until all signers         |              |<br>  |              |    // respond with partial sigs      |              |<br>  |              |                                      |              |<br>  |              |--(5)---       aggsig           -----&gt;|              |<br>  +--------------+                                      +--------------+</pre><p>(1) operator prepares and responds with <strong>covenantCtx;</strong></p><p>let <strong>covenantCtx</strong> = <em>(</em>outpoint_self, spks[], values[]<em>), </em>where;</p><ul><li><strong>outpoint_self</strong> is the prevout that contains the aggregate key, from which msg.senders aim to produce an aggregate signature.</li><li><strong>spks[] </strong>is an array of scriptPubKeys containing the <em>payable</em> VTXOs</li><li><strong>values[] </strong>is an array nValues containing the <em>payable</em> VTXO amounts.</li></ul><p>(2) kdc.signer prepares and responds with <strong>pubnonce</strong>;</p><ul><li>let (<strong>secnonce</strong>, <strong>pubnonce</strong>) = NonceGen(<strong>nsec</strong>, <strong>npub</strong>)</li></ul><p>(3) operator responds with <strong>kdcCtx, </strong>containing the aggregate nonce <strong>aggnonce</strong> and compact list of signers <strong>bitmap</strong>;</p><ul><li>let <strong>kdcCtx = </strong>(aggnonce, bitmap)</li><li>let <strong>aggnonce</strong> = NonceAgg(pubnonce<em>1 </em>.. pubnonce<em>N</em>) =&gt; aggnonce</li></ul><p>(4) kdc.signer signs and responds with partial signature <strong>partialsig</strong>;</p><ul><li>let <strong>kdc.signers[]</strong> = bitmapToSigners(bitmap) -&gt; kdc.signers[]</li><li>let <strong>sighash</strong> = ReturnSighashCov(covenantCtx)</li><li>let <strong>sessionCtx</strong> = (aggnonce, kdc.signers[], sighash)</li><li>let <strong>partialsig = </strong>Sign(secnonce, nsec, sessionCtx) =&gt; partialsig</li></ul><p>(5) operator responds with aggregate signature <strong>aggsig</strong>;</p><ul><li>let <strong>aggsig = </strong>PartialSigAgg(psig<em>1 </em>.. psig<em>N</em>, sessionCtx) =&gt; aggsig</li></ul><h4>Covenant Signing Session</h4><p>Accounts that pass the entry signing session move into this session to constrain <em>payable</em> VTXOs to the shared output. This session employs a <a href="https://github.com/bitcoin/bips/blob/master/bip-0327.mediawiki">Musig2</a>-based two-round aggregation scheme, where <strong>msg.senders </strong>aim to produce an aggregate signature<strong> </strong>from the aggregate key. The resulting signature is a 64-byte valid <a href="https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki">BIP-340</a> Schnorr signature.</p><pre>  +--------------+                                      +--------------+<br>  |              |--(1)---      signerCtx         -----&gt;|              |<br>  |              |&lt;-(2)---     covenantCtx        ------|              |<br>  |              |--(3)---      pubnonce          -----&gt;|              |<br>  |              |                                      |              |<br>  |              |     // wait until the operator       |              |<br>  |              |     // aggregates all pubnonces      |              |<br>  |  msg.sender  |                                      |   operator   |<br>  |              |&lt;-(4)---      aggnonce          ------|              |<br>  |              |--(5)---     partialsig         -----&gt;|              |<br>  |              |                                      |              |<br>  |              |    // wait until all signers         |              |<br>  |              |    // respond with partial sigs      |              |<br>  |              |                                      |              |<br>  |              |&lt;-(6)---       aggsig           ------|              |<br>  +--------------+                                      +--------------+</pre><p>(0) Given <strong>payloadCtx</strong> from the earlier session, msg.sender computes the aggregate key <strong>aggkey</strong>;</p><ul><li>let (prevHash<em>, </em>msg.senders[], _, _, _) = <strong>payloadCtx</strong></li><li>let <strong>keyaggCtx</strong> = KeyAgg(msg.senders[]) =&gt; (Q, gacc, tacc)</li><li>Let <em>(</em><strong>aggkey</strong><em>, _, _) = </em><strong>keyaggCtx</strong></li></ul><p>(1) msg.sender<strong> </strong>joins the round with <strong>signerCtx;</strong></p><ul><li>let<strong> signerCtx</strong> = <em>(</em>prevHash, npub<em>)</em></li></ul><p>(2) operator<strong> </strong>returns<strong> covenantCtx;</strong></p><p>let <strong>covenantCtx</strong> = <em>(</em>outpoint_self, spks[], values[]<em>), </em>where;</p><ul><li><strong>outpoint_self</strong> is the prevout that contains the aggregate key, from which msg.senders aim to produce an aggregate signature.</li><li><strong>spks[] </strong>is an array of scriptPubKeys containing the <em>payable</em> VTXOs</li><li><strong>values[] </strong>is an array nValues containing the <em>payable</em> VTXO amounts.</li></ul><p>(3) msg.sender prepares and responds with <strong>pubnonce</strong>;</p><ul><li>let (<strong>secnonce</strong>, <strong>pubnonce</strong>) = NonceGen(<strong>nsec</strong>, <strong>npub</strong>)</li></ul><p>(4) operator aggregares <strong>pubnonces</strong>, and responds with<strong> aggnonce</strong>;<br>NonceAgg(pubnonce<em>1 </em>.. pubnonce<em>N</em>) =&gt; <strong>aggnonce</strong></p><p>(5) msg.sender signs and responds with partial signature <strong>partialsig</strong>;</p><ul><li>let <strong>sighash</strong> = ReturnSighashCov(covenantCtx)</li><li>let <strong>sessionCtx</strong> = (aggnonce, aggkey, sighash)</li><li>let <strong>partialsig = </strong>Sign(secnonce, nsec, sessionCtx) =&gt; partialsig</li></ul><p>(6) operator responds with aggregate signature <strong>aggsig</strong>;</p><ul><li>let <strong>aggsig = </strong>PartialSigAgg(psig<em>1 </em>.. psig<em>N</em>, <strong>sessionCtx</strong>) =&gt; <strong>aggsig</strong></li></ul><h3>Design Considerations</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4OesSdUlXNKq-E8spI8-5Q.png" /><figcaption>BVM vs. EVM comparison</figcaption></figure><h4>Determinism</h4><p>The <strong>Bitcoin Virtual Machine (BVM)</strong> aligns more heavily on p2p use-cases such as atomic trades between two parties. Smart contracts in this context act as facilitators of these interactions.</p><p>While it’s also feasible to construct more complex contracts such as AMMs for token-to-token swaps that operate out-of-band and aren’t atomic, BVM transactions are deterministic, meaning the transaction outcome is determined upon creation. In contrast, EVM transactions rely on their ordering, which exposes them to risks like MEV.</p><p>Even Brollup operators themselves cannot modify transaction ordering through additional fees; Brollup is designed with a rank-based ordering system where higher-ranked accounts are given priority. Every entry in a payload pays an equal fee for the same execution.</p><p>Although higher-ranked accounts are prioritized in the ordering, front-running is not feasible for them either, since there is no mempool to track transactions; operators gather and aggregate transactions themselves.</p><h4>Gas &amp; Failures</h4><p>Given the deterministic nature of transaction outcomes, the <strong>msg.sender</strong> knows in advance whether the transaction will succeed or fail before entering the forfeiting session where fees are paid. Likewise, the <strong>msg.sender</strong> is aware in advance of the exact amount of transaction fees to be paid.</p><h4>Internal State</h4><p>Given the inherent design of operators chaining Bitcoin transactions together, each state-transition is interconnected. A <strong>msg.sender</strong> knows in advance the specific Brollup payload height at which their transaction will be included, eliminating the need for tracking internal state. Consequently, a nonce field is not required in the entry encoding.</p><h3>DoS, Blaming &amp; Blacklists</h3><ul><li>A <strong>kdc.signer</strong> can interrupt a KDC signing session. This leads to a redo of the earlier Entry signing session. kdc.senders, however, are each part of a well-known list of top accounts by their rank. Their behaviors can be further analyzed, and they can be temporarily or permanently blacklisted by the operator.</li><li>A <strong>msg.sender</strong> can interrupt a covenant signing session or a forfeiting session, resulting in a redo of the affected sessions. Their behaviors can be further analyzed, and they may be temporarily or permanently blacklisted by the operator. A blacklisted account might be required by the operator to place a refundable collateral bond in advance of participating in further sessions. The required bond amount varies according to the rank of the account.</li><li>A permanently blacklisted account can still transact without needing permission from the operator. This is because an account does not require an operator to transact on the Brollup; they can execute transactions by incorporating their own version of the on-chain transaction and placing calldata in the respective fields. A Brollup operator acts solely as an aggregator and liquidity provider, facilitating efficient transactions at scale.</li></ul><h3>Conclusion</h3><p>Brollup is a Bitcoin-native rollup design that operates with a native Bitcoin peg and does not require protocol changes to Bitcoin. Brollup brings over 90% of DeFi use cases natively to Bitcoin and further scale Bitcoin usage.</p><p>Brollup is currently <a href="https://github.com/brollup/brollup/tree/main">under development</a>, and the project is not associated with any issued tokens.</p><p>Interested in learning more or contributing? You should definitely join our <a href="https://t.me/brollups_community">TG community channel</a>! Alternatively, you can reach out me on <a href="https://x.com/brqgoo">X</a> or <a href="http://primal.net/p/npub18aq8s3z9xl87e74twfk93mljxq6alv4a79yheadx33t9np4g2wkqrtmask">Nostr</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18ec4081f6e7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brollup/introducing-brollups-18ec4081f6e7">Introducing Brollup</a> was originally published in <a href="https://medium.com/brollup">Brollup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>