_transfer in EncryptedERC20

If you look at the _transfer function, it operates with + and -.

From what I understand, the value entered in balances[key] is not the ciphertext itself, but only the hash value of the ciphertext. Shouldn’t I use TFHE.and or TFHE.sub instead of + or - as above?

Hi, under the hood we are overloading the + and - operators in the TFHE.sol library as you can see here : fhevm/lib/TFHE.sol at main · zama-ai/fhevm · GitHub so these are equivalent to TFHE.add(euintXX,euintXX) and TFHE.sub(euintXX,euintXX). Notice however that it works only if both operands are encrypted types, overloading is not working if we have mixed types , i.e if the first operand is a ciphertext and the second is in cleartext, you still must use TFHE.add and TFHE.sub explicitly.