<p>There are 2 variants of this question worth addressing:</p>
<ol>
<li>Can an AMM be built for any existing token standard using OP_CAT?</li>
</ol>
<p>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 <a href="https://x.com/reardencode/status/1791681803843207446" rel="nofollow noreferrer">article</a> covering this.</p>
<ol start="2">
<li>Can a token standard be designed that would enable an AMM using OP_CAT?</li>
</ol>
<p>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 <a href="https://docs.ordinals.com/runes" rel="nofollow noreferrer">Runes</a> or <a href="https://docs.lightning.engineering/the-lightning-network/taproot-assets" rel="nofollow noreferrer">Taproot Assets</a>). 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.</p>
<p>See <a href="https://x.com/Ademan555/status/1805266853020803341" rel="nofollow noreferrer">this</a> conversation for more.</p>

CC BY-SA 4.0
2024-08-01T15:42:27.327Z
2024-08-01T15:50:06.080Z
2024-08-01T15:50:06.080Z
Brandon - Rearden
<p>OP_CAT (<a href="https://github.com/bitcoin/bips/blob/master/bip-0347.mediawiki" rel="nofollow noreferrer">BIP 347</a>) 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?</p>

<script><smartcontracts><bip347-op-cat>
Is it possible to build an Automated Market Maker with OP_CAT?
Murch
# Is it possible to build an Automated Market Maker with OP_CAT?

(Asked by: username_0 on 2024-08-01)

OP\_CAT ([BIP 347](https://github.com/bitcoin/bips/blob/master/bip-0347.mediawiki)) 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?

**Tags:** script, smartcontracts, bip347-op-cat


---

## 1 answers

### Answer by username_1 on 2024-08-01. Score: 3 | Accepted answer

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](https://x.com/reardencode/status/1791681803843207446) covering this.

2. 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](https://docs.ordinals.com/runes) or [Taproot Assets](https://docs.lightning.engineering/the-lightning-network/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](https://x.com/Ademan555/status/1805266853020803341) conversation for more.


---

