Replies: 7 comments 8 replies
-
A complementary implementation to this proposal can be found here: https://github.com/input-output-hk/marlowe-cardano/tree/PLT-6793-Open-Roles |
Beta Was this translation helpful? Give feedback.
-
I don't think it's essential to use a blank token name for that thread token. It could be any name that does not appear in the contract itself. |
Beta Was this translation helpful? Give feedback.
-
The Plutus script's check for the presence of the thread token is sufficient for security. Parties to the contract (or Marlowe Runtime's safety checks) need to verify that that the token is an NFT residing in the Marlowe contract of interest. |
Beta Was this translation helpful? Give feedback.
-
Technically, we only need to ensure this if there are no more "dynamic roles" in the contract after the thread token would be released. |
Beta Was this translation helpful? Give feedback.
-
This wastes ada. No security considerations remain after the contract closes, so the disposition of this thread token is immaterial from that point of view. Mostly, it would be convenient to unmint it an any other role tokens that the parties don't want to keep for reuse or as souvenirs. |
Beta Was this translation helpful? Give feedback.
-
@bwbush Should we extend the token release logic so it validates any Marlowe inputs as long as they have shape:
Meaning that we ignore drop |
Beta Was this translation helpful? Give feedback.
-
@bwbush I started to think that actually the currency of the thread token could be different than currency for the roles. The benefit of having different currency symbol for thread token is that it can be useful to carry proof about preconditions (using constant minting policy) and validator could enforce it's burning at the end - related comment: #708 (comment) |
Beta Was this translation helpful? Give feedback.
-
Until we have something like entry deposit as a part of the language we should probably provide a standard solution for dynamic role distribution.
I propose to add to the Runtime a really simple
Plutus
script which performs few checks:Value
should contain onlyminAda
and a single "role token" -(currencySymbol, role, value)
Marlowe
UTxO which contains a corresponding thread token(currencySymbol, "", 1)
in theValue
.Marlowe
UTxO and theinputs
list in the redeemer provided to Marlowe validator should have as a first input:IDeposit _ (Role partyRole) _ _
andpartyRole == role
.currencySymbol
in Marlowe context?In other words we want to release the role token only when a transaction performs a deposit for that given role which will implement part of the
AnonymousDeposit
semantics mentioned above.f
The above script is constant so it can be used by reference on the chain and it could be included as part of the Runtime toolkit.
Regarding the thread token we can consider few points:
NFT
.{ "address": "000000...00" }
).account
map) which enforces burning.Beta Was this translation helpful? Give feedback.
All reactions