Replies: 0 comments 9 replies
-
Global mutable state via an anyonecanspend output is a very clever idea worth exploring. It might be useful in things like RGB24 decentralized DNS. |
Beta Was this translation helpful? Give feedback.
-
That is incorrect. There is a global state which is "unowned" (i.e. is not backed by UTXO).
and what if someone spends it without creating a proper commitment? Anyway, this is a non-issue since the existing RGB global state was specifically designed to allow AMM-like functionality |
Beta Was this translation helpful? Give feedback.
-
I am watching how this whole structure is developing and I am very surprised how quickly it is happening. |
Beta Was this translation helpful? Give feedback.
-
To my knowledge (I might well be wrong) currently there is no way in RGB to define an unowned mutable state that is public, this might be a hurdle when implementing AMM swap pools (like Uniswap), lending pools (like Aave), DAO treasuries and possibly other things.
I am drawing inspiration from Prime "merge mining", where there is a defined anyonecanspend seal that is then spent to commit to new block and create the next anyonecanspend output. I believe similar approach could be used to allow for unowned publicly mutable state in RGB - an anyonecanspend single use seal is created at the contract genesis, that can be spent by anyone to advance the state of the contract (make a trade with AMM, borrow from lending pool, deposit/withdraw from DAO treasury) and create a new anyonecanspend single use seal to be used by the next user of the contract. In case the anyonecanspend output is griefed (spent without committing to a valid state transition) the protocol reset happens with OP_RETURN (same as described in prime paper), and the state should be re-allocated to this newly created anyonecanspend single use seal.
The problem I see with such a solution is mainly data availability, in case you spend the single use seal, and commit to the state transition that you then don't make publicly available others cannot continue advancing the state and a protocol reset needs to happen. A different problem is how can you prove that you really published the state transition and it is publicly available - because otherwise anyone can trigger a protocol reset at any time and this essentially invalidates your latest state transition.
The reason I am starting this discussion is to see if building something like this would be possible with current RGB capabilities, or if there are other known ways to have unowned public mutable state in RGB, lastly I am interested to see your views on the proposal and problems mentioned.
Beta Was this translation helpful? Give feedback.
All reactions