TRANSFERFT

Transfers (part of) a fungible UTXO. This effectively moves a certain balance of a fungible asset from one private ZEOS wallet to another. For this operation the entire ZEOS Action Circuit is used since one existing UTXO is being spent while two new UTXOs are being created by this action.
Privacy Implications
This action provides full privacy protection:
- sender: untraceable - hidden in zk-SNARK
- asset: untraceable - hidden in UTXO ciphertext
- memo: untraceable - hidden in UTXO ciphertext
- receiver: untraceable - hidden in UTXO ciphertext
Flow
The following steps specify the flow of TRANSFERFT.
Step 0
The UTXO represents an amount of a fungible EOSIO/Antelope asset from which a certain (partial) is to be transmitted. Therefore the following must apply: .
Step 1
Create a new UTXO tuple representing the receiving of the asset:
- Diversifier index of the receiving ZEOS wallet address
- Public key of the receiving ZEOS wallet address
- Choose a random value
- Choose a random value
- Choose a random value
Create a new UTXO tuple representing the 'change' to of :
- Diversifier index of the sending¹ ZEOS wallet address
- Public key of the sending¹ ZEOS wallet address
- Choose a random value
- Choose a random value
- Choose a random value
¹ Note that it is also possible to choose a third wallet address for instead of the sender's address.
Step 2
Calculate the diversified transmission keys of all ZEOS wallet addresses involved (see section 5.4.1.6 of the Zcash Protocol Specification):
Step 3
Calculate the Commitment of all three UTXOs , and :
Step 4
Calculate the of the Commitment Tree based on the sister path of .
Step 5
Calculate the Nullifier of :
Step 6
Choose a random value and calculate the Spend Authority for this action (see section 4.17.4 of the Zcash Protocol Specification):
- Choose a random value
where is the Spend Validating Key of which is part of the Full Viewing Key.
Step 7
Set the private inputs of the arithmetic circuit:
- sister path of in the Commitment Tree
- leaf index of in the Commitment Tree
- Spend Validating Key of which is part of the Full Viewing Key
- Nullifier Deriving Key of which is part of the Full Viewing Key
- Randomness of which is part of the Full Viewing Key
Step 8
Set the public inputs of the arithmetic circuit:
Step 9
Generate a proof of knowledge of satisfying arguments so that
The pair is the zk-SNARK which attests to knowledge of private inputs without revealing them.
Step 10
Generate UTXO ciphertexts of and of for the receivers of the UTXOs (see section 4.19.1 of the Zcash Protocol Specification)
Step 11
Execute the TRANSFERFT action of the ZEOS smart contract. This action takes the following arguments:
- : The zero knowledge proof of satisfying arguments
- : The public inputs of the zero knowledge proof
- : The UTXO ciphertext which is transmitted to the receiver of
- : The UTXO ciphertext which is transmitted to the receiver of
The ZEOS smart contract then performs the following checks:
- Is the zero knowledge proof valid?
- Is the NFT flag unset ()?
Step 12
If , the ZEOS smart contract performs the following operations:
- Add , the nullifier of to the Nullifier Set
- Add , the note commitment of , to the next free leaf of the Commitment Tree
- Add , the note commitment of , to the next free leaf of the Commitment Tree
- Add the new root of the Commitment Tree to the Commitment Tree Root Set
- Add ciphertext to the Transmitted UTXO Ciphertext List
- Add ciphertext to the Transmitted UTXO Ciphertext List
If , cancel execution.