Skip to content

Pool Announcement (SUMMON)

When a new liquidity pool is created on Cauldron, the transaction includes a special OP_RETURN output containing the marker SUMMON followed by the owner's public key hash (PKH).

Because Cauldron pools are P2SH32 contracts, the actual contract bytecode is hidden until the pool is first spent. The SUMMON announcement solves this by providing the owner PKH, which allows indexers to reconstruct the expected contract, hash it, and verify that the P2SH32 output is a valid Cauldron pool.

OP_RETURN Format

The SUMMON output is 29 bytes with the following structure:

Byte(s) Hex Description
1 6a OP_RETURN
2 06 Push 6 bytes
3-8 53 55 4d 4d 4f 4e ASCII SUMMON
9 14 Push 20 bytes
10-29 Owner PKH (20 bytes)

Example scriptPubKey in hex:

6a0653554d4d4f4e14b034dc7821b2b25c38b5825cdc4af9e6ace02be7

Verifying a Cauldron Pool

The Cauldron contract is a fixed template with a 20-byte PKH placeholder. Given the PKH from the SUMMON output, an indexer can verify a P2SH32 output is a Cauldron pool:

  1. Insert the PKH into the contract template to get the full redeemscript
  2. Compute the SHA256d hash of the redeemscript
  3. Check if any P2SH32 output in the transaction matches the resulting hash

If the P2SH32 output matches and contains tokens, it is a valid Cauldron pool owned by the given PKH.

Transaction Structure

A pool creation transaction that includes the SUMMON announcement looks like this:

flowchart LR
   UserBCHInput --> CreateTransaction --> CauldronOutput["Cauldron P2SH32 Output"]
   UserTokenInput --> CreateTransaction --> SUMMONOutput["OP_RETURN SUMMON + PKH"]
                      CreateTransaction --> UserBCHChangeOutput

The OP_RETURN output is unspendable. The pool's token ID and initial balances are in the Cauldron P2SH32 output, while the OP_RETURN provides the PKH needed to verify it.

How Indexers Use It

The Riften Labs Indexer monitors the mempool for transactions matching the SUMMON scriptPubKey pattern. When found, the indexer fetches the full transaction, extracts the PKH from the SUMMON output, and uses it to verify and parse the Cauldron P2SH32 output.

This means the indexer can discover new pools as soon as they appear in the mempool, before they are confirmed in a block.