Currently, the current commitment merkle tree is using MiMc hash to calculate the root. By using Poseidon, there would be a reduction of the gas cost and also a reduction of the number of constraints used by the circuit. To provide more accurate numbers:
By using Poseidon, checking in the circuit that a commitment is on the Merkle tree would result in a reduction of 16.000 constraints (each hash done with MiMc has 500 more constraints that a hash done with Poseidon). This means that single transfer would have 16.000 less constraints and double transfer would have 32.000 less.
In terms of gas, each hash done with Poseidon results in 14.000 less gas used. Iden3 created a Poseidon implementation in Solidity that we could make use of, but there might be issues with the license.
Currently, the current commitment merkle tree is using MiMc hash to calculate the root. By using Poseidon, there would be a reduction of the gas cost and also a reduction of the number of constraints used by the circuit. To provide more accurate numbers:
By using Poseidon, checking in the circuit that a commitment is on the Merkle tree would result in a reduction of 16.000 constraints (each hash done with MiMc has 500 more constraints that a hash done with Poseidon). This means that single transfer would have 16.000 less constraints and double transfer would have 32.000 less.
In terms of gas, each hash done with Poseidon results in 14.000 less gas used. Iden3 created a Poseidon implementation in Solidity that we could make use of, but there might be issues with the license.