Confidential Transfer (Sending)
Last updated
Last updated
Transferring confidential tokens between accounts is essential to a functional defi ecosystem. In Redact, transferring tokens is performed from within the Wallet using the SEND button.
Transferring confidential tokens requires setting the transaction mode to confidential, entering the amount to send, and the address to send to.
In Redact, this is how it appears:
This example transaction sends 1 eLINK between accounts, but as you can see from the block explorer link, only an indicated amount is shown:
In order to preserve the confidentiality of the amount to be transferred, it must be encrypted before it is sent to the blockchain to be used in a transaction. In the case of the tx above, we must first encrypt the value 1.
This encryption is handled using cofhejs.encrypt
which converts the input value into an InEuint128
, a datatype that is used in FHERC20.encTransfer(address to, InEuint128 calldata amount)
This information is not necessary to use Redact, as it is all handled in the background, but it is crucial information in understanding how Redact and CoFHE preserve data confidentiality.
TX: