Musings on Fungibility
Problem: Even if Anoma provides perfect fungibility within its own ecosystem through protocol adaptors and endorsement mechanisms, some of these assets like Ether already trade on existing chains with existing bridges and representations. Any assets that come into Anoma “pre-wrapped” will not be fungible with each other.
Example Scenario
Let’s say @apriori spawns a Patrick controller. I decided to create one hundred PATRICK token resources. I then send equal amounts (twenty resources - could also be one resource with twenty tokens attached, but just for the example assume the former) of the resources to Chris, Adrian, Maurice and Jeremy controllers. The token distribution across the different controllers is the following.
- Patrick - 20
- Chris - 20
- Adrian - 20
- Maurice - 20
- Jeremy - 20
All of these resources are fungible across the different controllers, meaning that I can assume that the exchange rate of PATRICK-XAN will trade at the same rate on each controller (assuming arbitrageurs exist for these PATRICK-XAN [AMM or DLOB])
Now lets say I have ETH. The Ethereum controller has issued a certain amount of ETH ~ 120M tokens give or take. However, Anoma is only aware of 10M ETH that @apriori has deposited in the Ethereum controller PA. Now let us say I send 2M ETH to four additional controllers which are;
- Patrick - 2M
- Chris - 2M
- Arbitrum - 2M
- Base - 2M
@apriori then deposits some ETH from Arbitrum EVM that he already has into the protocol Adaptor on Arbitrum and sends some to all the controllers above. @apriori does the same exercise for Base EVM as well. @apriori now wants to swap ETH for XAN on each controller.
In principle, all the ETH-XAN pairs trading on each controller should be priced the same. However here is where I have a question. Patrick and Chris are running some version of HPB for consensus and the full Anoma node stack. They spun these controllers up only recently since the controller party just happened. Lets think of them as chains for the sake of this example. Arbitrum and Base are connected to Anoma via the protocol adaptor and have been for some time. Let’s assume ETH issued through an Ethereum bridge to Arbitrum and Base trades at a discount to main-net ETH not 1:1 because the asset issuer is different as noted above. You then have different denominations of ETH as resources. You’d have different flavors depending on which PA contract there is, even though the ETH is technically redeemable on main-net for 1:1.
- Ethereum ETH on ETH controller
- Ethereum ETH on Chris controller
- Ethereum ETH on Patrick controller
- Ethereum ETH on Arbitrum controller
- Ethereum ETH on Base controller
- Arbitrum ETH on Arbitrum
- Base ETH on Arbitrum
- Base ETH on Base
- Arbitrum ETH on Base
- Arbitrum ETH on Chris controller
- Arbitrum ETH on Patrick controller
- Base ETH on Chris controller
- Base ETH on Patrick controller
So in our example you would have:
- Chris Controller - 2M Ethereum ETH, 2M Arbitrum ETH, 2M Base ETH
- Patrick Controller - 2M Ethereum ETH, 2M Arbitrum ETH, 2M Base ETH
- Arbitrum Controller - 2M Ethereum ETH, 2M Base ETH, 2M Arb ETH
- Base Controller - 2M Ethereum ETH, 2M Base ETH, 2M Arb ETH
Could our system help with reconciling fungibility?
Maybe?
If Ethereum controller just had one canonical bridge contract across all chains then the ETH in Anoma would be fungible across all chains. But it does not and some ETH that lives on these rollups will be deposited into the Anoma protocol adaptor when deployed to those rollups.
The only ways I can see to reconcile this would be;
- Only have one entrance to Anoma in Ethereum land. This won’t work because anyone can deploy a protocol adaptor.
- We might be able to convince all the Ethereum validators to endorse any resource denomination of ETH with a signature that any ETH withdrawn from the Anoma PA on main net is redeemable 1:1. This likely wouldn’t work, though as its a coordination or social problem.
- I think Metastability Mechanism absorbing the difference subsidized through XAN is the only viable way to fix the issue. For example, if you are trying to in one intent go from ArbETH to withdraw to main net the protocol adaptor would mint say 1.0001 ETH and burn the 1.0 ETH making up the difference of .0001 with an equivalent XAN amount held by the MSM.
- Likewise MSM could subsidize any solver making different denominations of ETH intent matching for users where if ETH is not 1 ETH the solvers just presents a proof to the MSM which then gives the solver the difference which they can rebate to users and keep any surplus
Am I thinking about this correctly? I would appreciate your input @cwgoes.