Offshift’s Momiji Testnet Debuts Confidential Transactions
The first iteration of Offshift’s Momiji Testnet is now live on the Offshift GitLab. The Momiji testnet v1 repository contains an application that generates proofs of valid state transition and set membership using Pedersen-hash Merkle trees, and allows you to perform test transfers on a local testnet instance using a Solidity verifier. You can try it out yourself by cloning the repo, and then following the instructions in the repo’s README.md to test sending a private transfer.
The primary feature of the testnet is that it carries out confidential transfers which, when submitted by a relayer, are completely private - confidential and anonymous.
In the tests available on the repo, a set of UTXO commitments are generated (up to 16 in total), and a deposit is made with a proof to validate that the generated UTXOs correspond to the total amount deposited. The proof and public inputs are then verified on-chain by the solidity verifier, and the root generated by the state change is recorded to the contract.
UTXO ownership is determined by secret byte strings randomly generated by the depositor, the hashes of which are used in the encoding of a UTXO commitment. These secret byte strings are also used as nullifiers, and the nullifier hashes are stored on-chain to prevent double spending and to eliminate the potential for reuse with a new commitment.
To execute a transfer or withdrawal, a user must generate a set membership proof to show that the funds were deposited under a valid state root. The circuit checks the hash paths for the individual transaction created by the deposited UTXO set, as well as the hash path to the root of the batch, and to the root of the tree created by all the previous state roots.
If part of the spend is being withdrawn back into the public, then the sum of the newly generated UTXOs (the change) and the public output (the withdrawal) must match the sum of the spent UTXOs. The tests contain two steps, first a deposit where 10 UTXOs are made with a total value of 1ETH, and then a withdrawal where the equivalent of 0.5 ETH is withdrawn to a new address, and the remainder is re-committed into new UTXOs.
Keep your eyes on the Offshift Twitter and stay active in the official Telegram for more updates as we move from a command line interface to a user-facing frontend, it’s right around the corner.