I am wondering also about sidecoins fungibility and redemption:
let's say I have locked one bitcoin to release one sidecoin. To release the locked bitcoin, does my sidechain-enabled wallet simply collect one sidecoin (plus tx fee) worth of sidechain unspent outputs or are there other constraints on my sidechain transaction transferring the coin back to the bitcoin blockchain ?
My understanding of the white paper was that there must be a link between the initial coin unlocked on the SC and the coins used to exit the SC. Therefore, my questions about fungibility.
While locked on the parent chain, the coin can be freely transferred within the sidechain without further interaction with the parent chain. However, it retains its identity as a parent chain coin, and can only be transferred back to the same chain that it came from.
But I must confess that I'm still not sure to get it right. For example, how to track this link if the SC implements some anonymity features like the unlinkability of utxos ? (or does it means that there could be some kind of incompatibility between this required link and anonymity ?).
Another hypothesis is that any SC coin can be used to escape the SC. The peg just checks that the global amount ever transfered from the SC to its parent is lower than what was transfered from the parent to the SC. In that case, parent chains are protected against the creation of "fake" coins coming from a SC and fungibility in the SC is not such an issue.
But with this hypothesis, we may imagine some "funny" scams:
- Let's take again the diamond architecture and let's imagine that SC1 is a legit SC but SC2 and SC3 are scam chains working together.
- Honest users transfer coins into SC3 via SC1
- Attackers transfer coins from SC2 to SC3
- Attackers transfer coins from SC3 to BTC via SC1
- At a moment, it becomes apparent that there may be a problem with SC3 (creators appear to be shady actors or whatever).
SC1 decides to "cut the link" with this chain. Users of SC1 gradually stop transferring SC1 coins to SC3.
- Honest users still holding coins in SC3 can redeem them in SC2 but can't get back to BTC...
Well, seems better to wait for answers from the experts.