🛡️Unshielding Tokens

Unshielding Tokens in KALIUM

Unshielding is the process of moving funds from the KALIUM privacy system to a public 0x address. Users can execute this action by initiating an unshield transaction, specifying any 0x address, whether it belongs to them or not. The technical mechanics of these withdrawals are akin to a typical private send transaction, as they both invoke the 'transact()' function.

The primary distinction lies in the nature of the zk-SNARK circuit outputs for withdrawals. In this case, these outputs are not encrypted and incorporate a special check to determine whether the transaction is flagged as an unshield transaction. This check is encapsulated in the unshield parameter. If the unshield parameter holds a non-zero value, the transaction is recognized as an unshield operation, and the smart contract proceeds to verify whether the hashed note aligns with the transaction hash output.

If all the input criteria successfully pass the zk-SNARK proof, the tokens are promptly transferred to the unshield address. This address, a public 0x address, is selected by the user and serves as the final destination for the unshielded tokens.

Last updated