1

OP_CAT (BIP 347) would be a fairly simple code change, but advocates have been abuzz with creative ideas what could be built if OP_CAT were introduced. One concern that comes up in the context is whether it is possible to build an automated market maker (AMM) with OP_CAT. Is that possible?

1 Answer 1

3

There are 2 variants of this question worth addressing:

  1. Can an AMM be built for any existing token standard using OP_CAT?

No - existing token standards are not provable to bitcoin scripts. The existing token standards can only be tracked by an outside indexer reviewing the history of all transactions that they may have been involved in. Without a way to prove the location of the tokens the CAT-based AMM cannot execute trades. I wrote an article covering this.

  1. Can a token standard be designed that would enable an AMM using OP_CAT?

With significant limitations, yes. A token protocol that relies on a grandparent proof and recursively asserts that the token script is applied can be designed to allow an AMM contract that sells bitcoin for the token. This token standard would have significant limitations compared to other designs (such as Runes or Taproot Assets). For example CAT-AMM compatible tokens could not be used in Lightning, and only one such asset could be held in any single UTXO. These properties are necessary to enable the token balances to be evaluated by CAT-based scripts.

See this conversation for more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.