Feature Proposal: Confidential Mint & Burn Extension #6879
Description
Proposed feature
Token-2022 adds the token-extension of confidential transfers. In order to increase or decrease the supply of a token in the confidential balance space the tokens have to be first minted normally and then deposited into the confidential balance for the former and withdrawn from the confidential balance and then burned in the unencrypted balance space for the latter.
If the purpose of a token is to only operate in the confidential balance space, it should be possible to skip the deposit and withdraw steps and directly mint into or burn out of the confidential balance.
Why is this needed
One possible application confidential token balances is the representation of RWAs via a token. At Iron we’re using Token Extensions to issue tokenized bank deposits which comes with a wide range of regulatory requirements. In this more regulated environment there are two relevant considerations to minting and burning confidentially:
- Only the issuer should be able to discern (and share with authorities when necessary) the balance and transaction amounts of individual holders
- The supply of the token should always represent the amount of the RWA held, i.e. mint on inflows and burn on outflows
The currently available functionality of going via the unencrypted space to change the supply goes against point 1 as on on each inflow tokens have to be minted without encryption and then deposited into the confidential balance of the token account. An alternative to this would be to premint a large amount of tokens into a "treasury" account and then send those out confidentially as inflows happen, this would however obviously be in violation of point 2. The issue for burns is similar with either burning unencrypted to trigger / represent an outflow or sending the tokens back to a pooled account instead of that.
Proposed solution
A confidential-mint-burn
extension adding a ConfindentialMint
and a ConfidentialBurn
instruction. This extension would add a separate mint-authority used for minting confidential tokens to the token's mint account.
The ConfindentialMint
instruction can reuse most of the Deposit
logic to add tokens to the confidential balance, but requires an additional proof that the supplied ElGamalCiphertext
s represent a 48-bit number, so as to properly fit into pending_balance_hi
and pending_balance_lo
.
The ConfidentialBurn
can also reuse some existing code, but that of the Transfer
instead of the Withdraw
instruction. To achieve a confidential burn, and guarantee correctness of the confidential balance before / after the burn, the source-side logic of the transfer can be used. This provides a simple way of generating the correct proofs and applying them in a proven way. The destination side of the logic and proofs would obviously not be used, as a burn can be represented as a transfer to /dev/null.
Other considerations
One issue with the above approach is that the supply of the token would not be available on the mint account anymore, but only attainable by going through all mint and burn transactions and deciphering amount / summing with the auditor elgamal-keypair.
In order for the extension to not have side-effects on the unencrypted balance space the activation of this extension would disable the Deposit
and Withdraw
instructions of the confidential-transfer
extension.
Another option would be to add a confidential supply to the confidential-mint-burn
extension and track the supply there, this would likely be a significant effort though, requiring additional proof logic to guarantee correctness of said confidential supply.