zDEX is a decentralized peer to peer cryptocurrency exchange. zDEX utilizes the masternode network from PIVX in order to coordinate multisignature escrow accounts and orderbook matching. The “z” in zDEX comes from the fact that zDEX allows trades that ultimately involve zPIV which is a Zerocoin protocol version of PIVX that provide ultimate off-chain anonymity of the coins held.
Heidi: So to access the exchange, you’ll need to download an app. It isn’t necessary to run a zDEX node correct?
Jakiman: That’s correct. To access the exchange, you just need to download and run the zDEX app on one of the supported OS. (for now, Linux/Windows/Mac) There is no need to own/run your own zDEX Node unless you are willing to invest in a PIVX masternode to support the network and in return earn both PIVX masternode rewards and also 20% of zDEX trade fees that the node was involved in. (will elaborate on this more later) The website only displays the trade activity of the zDEX network.
However, do note that it’s currently in alpha testing stage that runs on testnet. So it will be a while later before users will be able to actually trade real coins.
Heidi: Why do the account expire after 24 hours?
Jakiman: zDEX main developer, Presstab, is quite proud that zDEX is one of the truly decentralized exchanges. As a result, there is no centralized control by the devs to perform order manipulation (to cancel erroneous accounts etc).
So instead, a big feature that was implemented was an automatic FailSafe mechanism. e.g. The funds locked in an account automatically unlock to the user (owner of that fund/address) after 24 hours. This prevents an issue that can occur with multisig transactions where it cannot get all of the needed signatures from the signatories (zdex nodes) and freezing the user’s funds indefinitely.
Heidi: Am I understanding correctly that just by using this DEX you are anonymizing your coins (via PIVX?)
Jakiman: One of main unique feature of zDEX (Zerocoin Decentralized Exchange) is that all supported coins such as BTC are traded against zPIV which is a Zerocoin protocol unit of PIVX where it is essentially off-chain while it is in that form factor. https://pivx.org/zpiv/
So basically you are sending your coin to the seller of zPIV while you end up buying & receiving zPIV to your account/wallet. The seller of zPIV will receive your coin as normal and if it is a non-privacy coin such as BTC, then the BTC trail will still be visible on the blockchain. (from your address to the seller’s address)
While you own zPIV, there is no PIVX blockchain address associated with it nor is your balance determinable by an external party by looking at the PIVX block explorer. So you end up with completely fungible, untainted and untraceable Zero Knowledge Proof PIVX Zerocoins. It is not an easy concept to grasp at first but think of zPIV as an IOU version of an equivalent amount of basecoin PIV that are on chain.
Heidi: Half of the fees are paid to the zDEXnodes while the other half of the fees are paid to the zDEX team, what will the team be building with these funds?
Jakiman: Fee payout structure is actually 80% to development and 20% to the zDEX nodes. The initial development costs of zDEX were privately funded by the founders. So it is a way to recoup some of that expense while also using it to constantly develop new features and enhancements to ensure zDEX becomes more technically advanced while also making improvements to the user experience aspect. Making zDEX the best truly decentralized & anonymous exchange is the goal.
Heidi: What kind of payouts can a zDEX node expect? How often? What are the requirements for running this node?
Jay: We calculated that when there are 100 zDEX nodes in the network, each zDEX node could receive up to approx.0.0075 BTC per month if there is an average of 100 BTC trade volume per day.
How the fee reward works is, for every trade, a quorum of 15 nodes are randomly selected from the zDEX node network. When the trade occurs, the 15 nodes (or less if some drop off the network before it but no less than 10 online nodes) get the share of the fee of that particular trade in the type of coin that was traded. (if LTC was traded, then zDEX nodes will receive the fee in LTC)
Note that each zDEX node can be part of multiple quorums and can also perform multiple transactions at the same time.
Heidi: What kinds of lessons has the PIVX and zDEX team learned from other DEXs and how are they aiming to be different?
S3v3nh4cks (founder): The lessons are that if the decentralized exchange does not have the familiar trading atmosphere that centralized platforms have, then users will struggle to use it.
Jakiman: We wanted a DEX that is as close to being fully decentralized as possible in every aspect, running on actual people’s computers with zero personal information collection and allowing trades between a basecoin with a zerocoin (PIVX zPIV) for users to be able to benefit from its privacy traits.
Heidi: Also, the trades are done via atomic swaps? On chain, Off chain?
Trades are not done using Atomic Swaps, they are done using a combination of CLTV (BIP 65) and Multisig Contracts.
As for being off chain/on-chain, it is a combination of both. Example;
For BTC seller = BTC (on-chain) -> PIV (on-chain) -> zPIV (off-chain)
For BTC buyer = zPIV (off-chain) -> PIV (on-chain) -> BTC (on-chain)
Note1: PIV to zPIV conversion (called minting) and zPIV to PIV conversion (called spending) is done automatically in the backend so the user does not need to manually perform that task.
Hence the end result of trading will simply look like:
For BTC seller = BTC (on-chain) -> zPIV (off-chain)
For BTC buyer = zPIV (off-chain) -> BTC (on-chain)
As zPIV is involved in both trade directions, every user will benefit from Zerocoin protocol privacy during a trade. Once you own zPIV, there is no way of anyone knowing who has how many as they do not have any public address associated with them.
Jakiman: zDEX is currently in its infancy (hence why it’s alpha and only running on testnet atm) and will have huge amount of development put into it (in both backend trading engine, for the frontend UI/UX and also the website) over the next many weeks before it is launched as a full-fledged public release. So a lot of things can change/improve over time and nothing is set in stone. 🙂