Skip to Content

Custody compartments

Gummiworm’s custody over funds is naturally compartmentalized:

  • The main compartment holds funds under Gummiworm’s unconditional, indefinite custody. Gummiworm has full discretion over these funds, which it manages via its consensus protocol and a set of ledger rules.
  • Deposit compartments hold funds that depositors conditionally and temporarily place under Gummiworm’s custody. Each deposit lives in its own compartment because it may come from a different depositor, who may provide different instructions for managing the deposit.
  • The fallback contingency compartment holds funds belonging to the head peers, which can only be used by Gummiworm for the fallback and finalization effects.
  • The equity compartment holds funds belonging to the head peers, which Gummiworm is permitted to use for its operational costs on the L1 blockchain.
  • The exit compartment holds funds set to leave Gummiworm’s custody. Gummiworm still controls these funds, but it has irrevocably decided to transfer them out — the decision’s execution is imminent.

The diagram below traces a happy path with four users, omitting equity and fallback contingency:

  • Alice initializes the head, seeding her funds directly in the main compartment.
  • Bob deposits funds into the head, and then they get absorbed into the main compartment.
  • Alice and Bob submit a transaction request that transfers their funds to Carol and Daniel.
  • Carol and Daniel both withdraw their funds, at roughly the same time.
  • The head emits a settlement effect that remits Carol’s funds directly and queues up Daniel’s funds in the exit compartment to be remitted (due to payout overflow).
  • The head emits a rollout effect that remits Daniel’s funds from the exit compartment.

In principle, Gummiworm’s compartment structure is flexible because it emerges from the conditions under which Gummiworm holds custody over funds. Customize the conditions to get different compartments:

  • In the simplest case, disable the deposit compartments for a head that receives all its funds at the start and receives no further funds afterward.
  • A head that holds custody over funds across multiple L1 blockchains should have the above compartments for each L1 blockchain. The compartments capture the condition that funds cannot be natively transferred between the chains – perhaps the purpose of the head is to facilitate such transfers.
  • A head that applies one set of L2 ledger rules to some of its funds and another to the other funds should separate those funds into compartments. The compartments capture the condition that the funds are expected to be governed by different ledger rules.
Note

Gummiworm’s implementation currently supports only one L1 blockchain per head, and only the main, deposit, equity, and exit compartments. We plan to extend that in future work.

Last updated on