While implementing the IssuanceFactory covenant, whose primary purpose is to validate asset issuance and token reissuance, I encountered some interesting behavior in the asset reissue mechanism as a whole.
To perform an asset reissuance, the reissuance token must always remain confidential. This follows from the discussion on simplicity-contracts and from the code, for example, in the issuance_ids function of the Input structure.
Given that a token’s AssetId for reissuance depends on its initial issuance (as can be seen in the reissuance_token_from_entropy function), there is no scenario in which we would need to issue an explicit reissuance token, since we would never be able to reissue the asset we need using it.
Simplicity provides the calculate_confidential_token and calculate_explicit_token jets, which always return an ExplicitAsset type. This means that to validate the issuance of a reissuance token, we need to pass abf and vbf in the witness, just as was done in the Option contract.
My main question is: is it possible to modify this logic so that token reissuance also works with explicit reissuance tokens? From a protocol perspective on Simplicity, it would be very useful and convenient to have this capability, since the reissuance token itself could contain a Simplicity script that controls the reissuance of assets. In the current version, this logic is also possible, but it is greatly complicated by the logic of the confidential reissuance token, which is not always needed in a confidential form.
While implementing the IssuanceFactory covenant, whose primary purpose is to validate asset issuance and token reissuance, I encountered some interesting behavior in the asset reissue mechanism as a whole.
To perform an asset reissuance, the reissuance token must always remain confidential. This follows from the discussion on simplicity-contracts and from the code, for example, in the
issuance_idsfunction of theInputstructure.Given that a token’s AssetId for reissuance depends on its initial issuance (as can be seen in the
reissuance_token_from_entropyfunction), there is no scenario in which we would need to issue an explicit reissuance token, since we would never be able to reissue the asset we need using it.Simplicity provides the
calculate_confidential_tokenandcalculate_explicit_tokenjets, which always return anExplicitAssettype. This means that to validate the issuance of a reissuance token, we need to passabfandvbfin the witness, just as was done in theOptioncontract.My main question is: is it possible to modify this logic so that token reissuance also works with explicit reissuance tokens? From a protocol perspective on Simplicity, it would be very useful and convenient to have this capability, since the reissuance token itself could contain a Simplicity script that controls the reissuance of assets. In the current version, this logic is also possible, but it is greatly complicated by the logic of the confidential reissuance token, which is not always needed in a confidential form.