zMiner
zMiner overview
Last updated
zMiner overview
Last updated
Oshiya Operators are Protocol Miners, named zMiners
In the proposed Protocol, zMiners provide distributed computational power to support the Protocol and earn rewards
Oshiya prepares batches of UTXOs to be inserted into the Bus tree; the Merkle Tree that stores UTXOs
Operating an Oshiya node requires no technical know-how
This enables future versions of the Protocol to allow users to self-process their own UTXOs and write them on-chain from within the dApp
Optimizing Oshiya may be possible; this does require technical know-how
zMining is a gas-optimized approach to transaction validation in Panther’s Shielded Pool. Panther zMiners run the Oshiya code (previously referred to as Miner code) responsible for computing the updates required to append batches of UTXOs on-chain. zMiners provide off-chain execution and submit the proof to the Panther contract to verify the validity of their computation.
Within Panther, transfers (P2P transactions), deposits, and withdrawals result in UTXO commitments. Oshiya fetches the batch of pending UTXOs from one of the queues on the Bus tree, computes the required updates to the Merkle tree needed to append the UTXOs of the queue to the Bus tree, creates a SNARK proof that proves the correctness of the updates and the validity of the UTXOs to be committed and, if the proof is valid, these updates are written on-chain by Panther Protocol’s smart contracts.
A successful update results in the miner’s EAO (externally owned account, an Ethereum address for mainnet beta release) receiving a reward, as shown:
Oshiya operates on the principle of redundancy, meaning that several zMiners may attempt to compute the commit required to process the batch of UTXOs. Only one zMiner will succeed and receive the reward. The total amount of rewards for batching and processing all UTXOs in a queue is split into two parts:
Guaranteed reward
Premium payment
The Protocol assumes that the zMiner will collect accumulated rewards, i.e. they will accumulate a reward pot and extract this at intervals. This makes more sense than paying gas fees for small value extractions.
A “guaranteed” reward, as set by the DAO.
The proposal is that the zMiner is guaranteed a minimum of 80% of the reward available for that batch in the queue. The remaining 20% goes into a pool to pay out premiums.
The premium depends on the queue’s age. It’s calculated proportionally to the number of blocks that have passed since the queue was started, counting from the creation of the earliest UTXO in the queue. The premium will be calculated through accrual at a fixed factor, with the caveat that a premium is paid out only if the fund is not depleted.
The proposal is to initially set at the premium as 0.1% of the “assigned reward” for every pending block.
See the reward functions in the source code.
Technical Oshiya Operators are welcome to run the Docker service, however, even non-technical Operators may run an Oshiya node via a simple dApp interface.
Batch Processing: Oshiya processes up to 64 UTXOs in batches, integrating them as leaves in the Merkle tree within the Bus tree contract. This approach maximizes efficiency and scalability when handling transactions.
SNARK scalability: At the heart of Oshiya’s architecture is the efficiency gain of validator vs. prover. SNARK technology ensures the validity of Merkle Tree updates by placing the computational load on the prover (Oshiya), allowing the validator to verify the validity of the offered proof with a relatively trivial amount of computational effort.
Optimized Gas Usage: By processing UTXOs in batches and employing SNARK proofs, Oshiya significantly reduces the gas costs associated with processing transactions individually, offering a more cost-effective solution.
Enhanced Privacy: Outsourcing the computational load to Oshiya allows the Protocol to use a larger Bus tree at reasonable costs. This larger tree accommodates more UTXOs, hence increasing the anonymity set.
Note that, in the Multi-chain vision, this anonymity will be shared between Shielded Pools across different networks.
Cost Efficiency: Users benefit from reduced transaction costs due to the gas-optimized approach.
The Protocol can also support a tip from the transaction initiator; however, this feature will not be included in testnet or mainnet beta versions.
The codebase for Oshiya is open for community involvement. We encourage developers and blockchain enthusiasts to contribute towards optimizing and enhancing Panther Protocol’s mining feature — ensuring it stays at the forefront of blockchain technology.