Support muxed contract addresses #1950
Replies: 5 comments 9 replies
What are the use cases and test cases we know of that can validate both the need and the way that this might be implemented or the way that this might show up for contracts? Figuring this out up front, I think, will be critical to designing this in a way that makes sense for the contract use cases. |
|
Thank you for starting the discussion and providing the use cases. My initial take on this is to just extend the existing semantics of muxed G-addresses to C-addresses in exactly the same fashion. Specifically:
I believe this is pretty non-controversial, as we just replicate what we already do for G-addresses in a consistent fashion. But I'm open to any suggestions or additional requirements for the design. |
|
CAP-67 and the accompanying changes to SEP-41 added muxed address support to four places:
It did not add muxed address support to other places that a destination address exists in SEP-41 or the SAC. That decision was based on the use cases of G-muxed addresses, but the use cases of C-muxed addresses may be different. Do we have a sense of whether the existing four places are sufficient for the C-muxed address use cases, or to be useful to the new use cases does this proposal also need to add muxed address support to other events or functions? |
|
Hot take maybe, but I'd like to offer a rebuttal to not including this feature. First, on why muxing contract addresses doesn't make sense. Someone can check my historical work here, but my understanding is that we needed them for classic because they were easier to manage for a custodian (one secret key) and were cheaper than maintaining accounts per-customer (no reserve requirement). That makes muxxing a bug fix rather than a feature. The point of smart contracts is programmability, and you can still have one auth to rule them plus do an implementation-specific muxing adaptation in the contract itself. Second, on why we shouldn't propagate memos further. They're bad UX for many reasons, number one being forgetting them, and while muxed strkeys were a way to improve on that, most of us remember how long it took for anyone to adopt them. The same goes for adding yet another way to represent an address. We're asking the entire stack (both internally and the entire ecosystem), to introduce protocol-level complexity (handling the new ScAddress arm, handling a new strkey, etc.), for the benefit of..... whomst? The cost-benefit math doesn't math for me. Finally, on the SEP-24 case, specifically: the benefit of memos there is so that the anchor can differentiate between its users on the deposit and withdrawal flows. But contracts are already unique! You just transfer it directly. If they decide to lump all their users into a single contract, they can already do that... just write your own contract! We could have an example of how it's done and standardize that rather than introduce yet-another-transfer-method. TL;DR: We introduced programmability to the network for a reason. Let's leverage it instead of forcing protocol-coupled solutions. |
|
@JakeUrban we had a protocol meeting that included CAP-0084, and there were questions around what the actual use cases are. @Shaptic (thread) and some others were questioning if we should be propagating the usage of muxed accounts like this, as opposed to some other solution that just uses the programmability available in Soroban. Your input, along with input from the ecosystem partners (either directly or indirectly) would be helpful. |
Uh oh!
There was an error while loading. Please reload this page.
CAP-67 introduced support for multiplexing Stellar account addresses in soroban contracts, including updating the Stellar asset contract's
transferfunction and its corresponding event to support muxed destinations.However, the use cases for multiplexing are not exclusive to Stellar accounts. Users of contract accounts may also benefit from multiplexing, but this is currently not supported by the protocol.
We should consider adding support for multiplexing contract addresses the same way we support multiplexing of Stellar accounts.
All reactions