- Forfeits + hash-locks for refreshes.
- Forfeits + connectors for on-chain payments (including offboards).
Connectors replaced by hash-locks for refreshesAs of version 0.1.0-beta.6, Bark uses hArk (Hash-lock Ark), which achieves refresh atomicity through hash-locks instead of connectors. Connectors are now used exclusively for on-chain payments and offboards.
Ark and Lightning payments don’t use forfeitsArk and Lightning payments don’t involve forfeiting a VTXO.In Ark payments, the user pre-signs a new off-chain transaction with the Ark server that extends the leaf of an existing VTXO, creating a spend VTXO.In Lightning payments, the user relies on HTLC-based spending policies to ensure atomic execution.
How forfeits work
If you are familiar with penalty transactions in the Lightning Network, you should already have a good idea of how forfeits on Ark work. To support forfeits, each VTXO’s exit transaction (leaf) has two spend paths:- Spend path 1: A 2-of-2 multisig between the user and the Ark server. The user signs this path to create a forfeit transaction granting the VTXO to the server. This path has no timelock—if the exit transaction ever makes it on-chain, the server can broadcast the forfeit before the user claims the bitcoin.
- Spend path 2: Controlled solely by the user for emergency exits. This path has a relative timelock of
{{ ark.vtxo_exit_delta }}blocks (approximately{{ ark.vtxo_exit_delta_description }}), implemented using OP_CHECKSEQUENCEVERIFY (CSV).
Spending conditions in an exit output (leaf) that enable forfeits
Forfeits usually never make it on-chain
Under normal operations, neither spend path is used. The server simply sweeps the entire round transaction once its absolute timelock expires. The forfeit is held as insurance—only used if a user attempts an exit after forfeiting.Preventing malicious exits
If a user attempts a malicious exit after forfeiting, they must broadcast their VTXO’s branch transactions and then wait for the relative timelock on the leaf before claiming. The timelock (expected to be around 10 hours) gives the server ample time to detect the attempt and broadcast the pre-signed forfeit first.How hash-locks work for rounds
For rounds, Bark uses hash-locks instead of connectors. During a round, the server generates a secret (known as a preimage) for each new VTXO and shares its hash with participants. Both the new VTXO and the user’s forfeit transaction are constructed with a hash-lock condition—neither can be used on-chain without providing the preimage.The hash-lock ensures the forfeit is only valid once the server reveals the preimage.
How connectors work for on-chain payments
Connectors ensure that a user’s forfeit is only valid if the corresponding on-chain payment is confirmed. The server constructs the payment transaction with both the destination output and a connector output. Because the user’s forfeit requires the connector output to exist, the forfeit cannot be used unless the corresponding payment transaction is confirmed first.The connector ensures the forfeit is only valid once the payment transaction is broadcast.