Skip to main content
Every virtual output expires with the batch output that holds it. Before then, renew it in a batch swap, which moves it into a new batch with a new expiry. By default, the SDK renews automatically; see Renewal & Recovery.

Batch Expiry

After a batch output expires, the operator can sweep its bitcoin through the sweep path. Expiry lets the operator reclaim the bitcoin it puts into each batch. The operator can sweep a virtual output that you have not renewed before its batch expires. The operator still lets you recover the funds in a new batch swap (Virtual Output States), but you can no longer claim them onchain alone.

Liveness Requirements

Renewal needs someone online before each batch expires: the operator to run the batch, and the SDK or an executor to register the user’s outputs.

Operator Liveness

If the operator is unavailable, users cannot make new Arkade transactions until it returns. Their funds stay safe: each user can exit unilaterally with the presigned transactions, and should do so before the batch expires.

User Liveness

While your app is running, the SDK renews its virtual outputs before their batch expires, so the user doesn’t have to. For the times your app is offline, delegate renewal, and the outputs keep their right to exit onchain alone.

Delegation

A user who cannot be online at the right time can delegate renewal to an executor, a service that renews outputs for their owner, without giving up custody. Anyone can run an executor.

How Delegation Works

To delegate, the wallet moves its virtual outputs into a delegated contract and registers that contract with an executor. The contract has three functions:
  • User + operator. Standard spending.
  • User + timelock (exit path). The user claims the funds onchain alone.
  • renew. A function with Arkade Script that lets anyone register the output in a batch swap near its expiry, so the executor needs none of the user’s keys.
The executor watches the delegated outputs and renews each one through renew, so the user signs nothing at renewal time. While the app runs, the SDK renews any output that the executor has not renewed by halfway through the renewal window.

Guarantees

  • The user keeps custody. A renewal must keep the contract’s script and assets, so the executor cannot move funds anywhere else. The exit path stays with the user.
  • The fee is capped. The renewed output keeps the input’s value, minus at most maxFee, a limit the user sets.
  • Timing is fixed. renew passes only within renewalWindow of the batch’s expiry, in a batch registration request with no onchain output.

Contract Renewal

A contract can make renewal need no request from the user at all. Its renew function lets anyone register the output in a batch swap, as long as the new output keeps the contract’s script, its value, and its assets. Because nobody signs for the user, a server can keep the output renewed for as long as it exists, and the exit path stays with the owner. See Renew Without the Owner.