Zcash Thorchain Integration Grant

Zcash Thorchain Integration Grant

Zcash faces challenges with centralized exchanges changing their stance on ZEC support. Zcash users need 24x7 access to liquidity for their holdings. Hence, having the ability for a native ZEC swap via a decentralized exchange would be crucial for growth in adoption.

Thorchain enables decentralized native ZEC swaps with popular cryptocurrencies, ERC20 tokens and stablecoins. Zcash being the digital money focussed on privacy; adding support on a dex with native ZEC functionality instead of wrapping the ZEC with a custodian opens up tremendous opportunity for existing and new Zcash users to acquire ZEC via simplified UX. Additionally, Thorchain incentivizes wallets, node runners and liquidity providers to integrate ZEC support to all their existing users by getting a fraction of the fees. e.g. ShapeShift uses Thorchain as a backend to swap native cryptocurrencies and a ZEC integration will expose Zcash to their existing user base. The low Zcash network transaction fees combined with defined swap fees & slippage % from liquidity pools will give Zcash users an exact quote for each Zcash swap that needs to be performed. See: Asgard Exchange & https://app.thorswap.finance for various native coins performance on Thorchain.

Thorchain integration beneficiaries

There are multiple users & stakeholders that benefit from this proposal:

  1. The users of Zcash bridge and thin client would be Thorchain node runners & native swap wallets like ASGARDEX/https://app.thorswap.finance
  2. The end users will be users who can easily swap their ZEC holdings between BTC, ETH, BCH, LTC, BNB, BUSD, USDT and many ERC20 tokens.
  3. The end deliverable would also bring an understanding to possible Nighthawk Wallet integration in the future where the users would be able to swap between ZEC and the supported list of coins within Nighthawk. Additionally, all developers from the Zcash community can investigate & integrate the native swap functionality once the solution is delivered.

Solution Format

  1. The deliverables would be Pull Request Merges to add Zcash support to Thorchain wallet and node integration code to their repositories.
  2. Work with Thorchain core team to deploy Zcash nodes and onboard a large Zcash liquidity provider.
  3. Test, verify the Zcash native swaps with one of the existing thin clients.
  4. Provide additional support post deployment with minor hotfixes if required. Any medium-large sized issue would not be covered in the extended support.

Technical approach

There are 4 software deliverables for this proposal:

  1. Bitfrost chain client integration - this piece observes the new chain and passes information to Thorchain.
  2. Zcash node daemon - the actual node daemon to run a Zcash node that’ll be required by the node operators.
  3. Unit Tests for ZEC.
  4. xchainjs wrapper for the wallet - the cross-chain JS library that serves as the UI/application integration point for all Thorchain products in the ecosystem (basically wraps the new chain w/ a uniform API in JS)

Native ZEC swaps from/to T-addresses will be guaranteed to be supported, with possible support for Z-addresses after testing/evaluating a Z-addr based setup.

How big of a problem would it be to not solve this problem?

  • Zcash being limited to centralized exchanges and up to the whims of local regulations which keep flip flopping support for Zcash is a risk and uncertainty for ZEC holders.
  • This proposal will aim to provide Zcash liquidity via our partner NineRealms, and take part in the Thorchain protocol which also opens up APY earning opportunities for existing Zcash holders.
  • Accomplishing this task via a decentralized codebase will be instrumental in more parties holding Zcash.

Execution risks

  • Delays due to unforeseen challenges and setbacks would need to be worked through with Thorchain core team.
  • Support of our liquidity provider partner will be crucial to see a successful launch of Zcash on Thorchain.

Unintended Consequences Downsides

  • Adding support for Unified Addresses after NU5 for interoperability when it becomes available.
  • The need for ongoing automation & maintenance of Zcashd nodes within Thorchain framework, this responsibility will be handed to Thorchain core team after the Zcash bridge software is merged.

Evaluation plan

  • Monitor Zcash pool size and ZEC liquidity deployment by partners.
  • Monitor daily ZEC transaction volume (the existing coins are between $100k & $3M as of July 2021).
  • Monitor number of Thorchain DEX clients integrating Zcash support.

Schedule and Milestones

  • 45 days: Setup testnet & sync all Thorchain supported blockchains in Kubernetes and hire a team with expertise in Golang, JavaScript client & Helm/Kubernetes. Write Bifrost chain client integration software, add Zcash daemon, write unit tests and xchainjs wrapper to enable Zcash swaps.
  • 30 days: Sync with Thorchain team & liquidity partner to deploy Zcash swaps on main-net.
  • 15 days: Deliver integration of xhainjs wrapper and help front ends to implement it to enable ZEC swaps.

Budget and Payout Timeline

  • $228,260: Software development, planning, evaluation, testing & deployment. (includes 1 year of support till Dec 2022).
Task                     Total   Resources    Cost
Development             120,000      4    $197.37/hr x 608 hrs
Testing + Integration    60,000      3    $98.69/hr x 608 hrs
Planning + Deployment    22,000      2    $36.18/hr x 608 hrs
                      202,000 + 26,260(13% tax) = $228,260
  • $10,000: $2,500 x 4 Thorchain core developers consultation, reviewing Pull Requests and deploying to prod.
  • $20,000: $5,000 x 4 months of multiple large AWS instances to run Thorchain test-net environment.

Total: $258,260 incl. taxes

Note: 1) The pull request review and main-net integration timeline depends on the Thorchain core team side and such delays will affect milestones planned grant. 2) Unused cloud credits will be returned at end of 1yr support.

Applicant background

Nighthawk Apps has more than 30 years of combined experience in developing, deploying & supporting scalable applications for start-ups and Fortune 500 companies. We have been building applications within the cryptocurrency eco-system since 2014 and recently focussed our efforts towards making financial privacy accessible to everyone in the world via Zcash.


Though I have no objections against the idea of this project, I would like to bring a couple of points.

In my opinion,

A. Budget

The budget is excessive.

10k and 20k for Thorchain devs + infrastructure seem reasonable, but 228 260 $ for the development of the bridge is too high. Especially for a task, which in teams’ own words, is

  1. Bitfrost chain client integration - this piece observes the new chain and passes information to Thorchain.
  2. Zcash node daemon - the actual node daemon to run a Zcash node that’ll be required by the node operators.
  3. Unit Tests for ZEC.
  4. xchainjs wrapper for the wallet - the cross-chain JS library that serves as the UI/application integration point for all Thorchain products in the ecosystem (basically wraps the new chain w/ a uniform API in JS)
  1. is zcashd. 3) are tests. The team’s deliverables are a script and block chain monitor. This should be more likely ~20k considering they can reuse their block explorer code.

B. Execution

The team has received 2 majors grants and has not delivered anything of substance yet.

  • Nighthawk Wallet Design & Development '21: 351 200 USD
  • Zcash Block Explorer: 51 000 USD

AFAIK (I do not represent ZOMG), there are no progress reported and no visible deliverables yet. Also, if I recall correctly, they requested and obtained upfront payment.

Personally, I do not find them reliable and their work so far has not met the quality of zcash software.


One question I have is: are Thorchain folks on board with this?

Also, can you break down the software development costs more so we can see what at least your expectations are in terms of what pieces will cost the most?

1 Like

Yes, we are in touch with Thorchain core team members and clarified the deliverables of the code, testing and deployment. NineRealms is on board to run the nodes and deploy the first liquidity pool on Thorchain.

For the Software Development costs, the quoted rate includes all expenses for the 5 contributors to make the deliverable and follow up support happen. We are onboarding 3 new developers to deliver this cross chain swap feature for the Zcash Community.

For a further development breakdown: the Bitfrost chain client integration includes implementation of Zcash client specific code in Golang, the Zcash node daemon template per helm framework within the Thorchain Infrastructure, Unit tests for Thorchain swaps via RUNE bridge written in Python and xchainjs wrapper for easy integration by third-party clients.

All this needs to be delivered by experienced developers with solid end-to-end testing & deployment. Also note, none of the code is re-useable from any existing Zcash repositories.


ZOMG met last night and many of us are very eager to have a user-friendly decentralized solution for exchanging from BTC and ETH to ZEC.

Low-fee decentralized exchange between other popular currencies seems super important to privacy, usability, resiliency, and adoption, so we’re very interested in funding this.

That said, we have a few questions and we will probably need more detail and perhaps a bit more time to approve the grant:

  1. Can you give us—and other community members here—a clearer picture of what the end user experience will be for buying Zcash from, say, BTC or ETH once this grant is completed? Probably the best way to do this would be a screencast, but a walkthrough with a series of steps and screenshots would work too! If there are different use cases, can you walk us through each of the main ones?

  2. If there won’t be a user-friendly experience for this at the end of the grant because more work is required, could you give us an idea of what that additional work would look like? For example, you could write this up as an additional milestone in the proposal. We might not choose to fund this milestone right now, but we’ll have an idea of what the cost of necessary follow-on would would be.

  3. Because Nighthawk already has a few open grants, and because this would be another large grant, we’d like to make sure work is going well on all of your other grants before approving this one. Can you post updates here, or links to the latest updates if they’ve already been posted, so that we have it all in one place? Are all of the other projects on schedule right now? Is there anything else it would be helpful for us to review to be confident that work is on-schedule on the other grants?

  4. We want to make sure that this grant will not leave you spread thin across too many projects. Can you talk us through how your team is set up, and give us some assurance that you will not be spread too thin?

  5. Generally, we’re cautious about having too many open grants with a single grantee. Would you be open to waiting until the main Nighthawk wallet grant is completed before beginning this work? I believe the final milestone is scheduled for October, which isn’t too far off. There’s also an upcoming milestone for that grant in August.

  6. We’d like to see a more granular breakdown of costs, hours, and hourly rates for the different roles involved. Can you add this?

  7. It might be especially helpful to see if there any pieces of this work that are optional or could be broken out into another grant proposal. For example, am I right in understanding that a Zcash client in Go a necessary piece of this? Is that a full node or a light node? Would it make sense to break that out into a separate proposal, for clarity and reducing risk?

Again, we’re overall very interested in funding this. I know these are a lot of questions and might be a hassle to respond to, but it is a big grant and it will be better for all of us to settle all these questions up front.



Just noting that Aditya and I have also scheduled a voice call for later today, in line with past experience that synchronous communication is helpful in cases like this where there are lots of questions, and we’ll be posting notes from that here a bit later.


Thank you @ZcashGrants & @holmesworcester for reviewing the grant proposal and writing up all the questions & concerns, please find my replies below.

To start, I would request you to watch a video by Naomi Brockwell on the need for a DEX https://www.youtube.com/watch?v=VTnD-p-smVI

Here is a simple video walkthrough of using ASGARDEX Desktop https://youtu.be/yCmEiUM2eKc?t=175
The UX is just like Uniswap, except that native assets can be traded with upfront fees. There will be multiple DEX interfaces that will enable Zcash support once they upgrade their Thorchain nodes & make a small lift per front end for which we have the support from Thorchain devs.

ASGARDEX Desktop, ASGARDEX, THORSwap will be the front ends with user friendly front ends as seen in the video. Additionally, we might apply for a Nighthawk Wallet grant to make the front end integration possible within the wallets. Similarly, as mentioned in the grant, all Zcash developers can take advantage of this native swap feature once it goes live.

Nighthawk grants are on schedule. Block Explorer’s July/August Delivery Timeline as per the grant & Nighthawk Wallet July Milestone are both on track. Work is going on towards the milestones. Thorchain work will begin only after the Block Explorer is delivered, that way there is no overlap or shortage of resources. We don’t want to hurry and release incomplete/insecure software that is prone to stability/security/privacy risks for the Zcash community. For following updates, please follow our GitHub commits https://github.com/nighthawk-apps or Twitter updates https://twitter.com/nighthawkwallet & https://twitter.com/lightwalletd or reach out to me anytime to setup a live features demo. Nighthawk Wallet Development Status will be regularly updated here https://nighthawkwallet.com/changelog/

For a quick gist of active Nighthawk grants:

  1. https://lightwalletd.com for real time status, monthly warranty canaries, the next milestone is on January 2022 https://grants.zfnd.org/proposals/1759503645
  2. https://github.com/nighthawk-apps/zcash-explorer Zcash Block Explorer work is on track too, with the last 2 pending items - Viewing Key support & 1 year hosting with tor onion access support, here is the latest update https://forum.zcashcommunity.com/t/zcash-block-explorer-grant/38141/29 Next Milestone July/August 2021 https://grants.zfnd.org/proposals/1456367676
  3. https://nighthawkwallet.com is live with the first milestone wrapping up following the release of T-address support and manual shielding on Android, we had the iOS release go live this week. Our updates are spread out across the Zcash Weekly Newsletter & the Light Client Working Group https://github.com/zcash/lcwg with a Milestone 1 update due in July 2021 which will go live on the website. https://grants.zfnd.org/proposals/1037824787

Here is a grant Nighthawk has successfully delivered https://grants.zfnd.org/proposals/68882602

The Nighthawk team is here to help further the mission of Zcash and create tools that help sustain open networks, enabling anyone and everyone to protect their own privacy on their own terms.

None of the developers working on the Nighthawk Wallet will be working on the Thorchain grant. We are extending the team with 3 new developers for Thorchain and current developers will wrap up work on the Block Explorer before starting on the Thorchain tasks. The thorchain work will go on in parallel with the Mobile Wallet development which is disconnected with each other. There are 0 shared components or developer crossover.

I don’t believe it is necessary to block a feature development that has nothing to do with the wallet, none of the developers working on the wallet will be working on the Thorchain grant. Additionally, Nighthawk Wallet’s final milestone is in December, October is just the beginning of the 3rd milestone. So it would be unfair for the Zcash community to delay a feature that would benefit a new cohort of users of a privacy coin on a DEX. And Thorchain is actively looking to add additional native assets beyond the current 4 BTC, ETC, BCH & LTC and it would be great to have ZEC as the 5th one.

The compensation for this proposal is based on the value of the outcome for Zcash attaining increase in adoption on a DEX with high on-chain volume swaps being performed on a daily basis. The existing coins are doing between $100k for LTC & $3M for BTC as of July 2021, even if ZEC manages to clinch $25k, it equates to creating a $9M+ yearly DEX volume and incentives to earn ZEC by becoming a liquidity provider on Thorchain following the solution.

We are going with the standard quoted rates for experienced developers, which are getting very difficult to find as there is a talent crunch with all senior and lead developers as most tech companies are hiring remote, even in India. Ex. Coinbase is hiring 1000 Engineers in India and we are competing for talent against them amongst many other blockchain projects (like Blockfi) paying top dollar.
Also note, Nighthawk developers have promised to resolve all outstanding Thorchain Integration issues before the final delivery, this is a flat rate grant. Here is the cost breakdown:

Task                     Total   Resources
Development             120,000      4
Testing + Integration    60,000      3
Planning + Deployment    22,000      2
                      202,000 + 26,260(13% tax) = $228,260

Golang based Bitfrost is completely native for Thorchain node that is supposed to observe the incoming Zcash transactions, make calculations and broadcast to thorchain network. It is not a full/light node in its essence, but it enables the Thorchain node operator to run a Zcashd full node natively within Thorchain’s blockchain. So, it doesn’t make sense to break this out into a separate proposal as this piece is an essential portion to deliver the end-to-end swap functionality. The only portion that can be broken out is the custom front end, which we haven’t included in this grant. Additionally, the work done as part of this grant would be reusable by future Zcash projects, especially the Kubernetes based setup for spinning up Zcash nodes at large scale.

To summarize:
We are prepared with access to both the human resources & a roadmap of items to be delivered for Thorchain integration that does not affect active Nighthawk grants. And we are reachable to formally provide current status of our work privately without making any incomplete, work-in-progress features public.

1 Like




I don’t understand these statements put together. Simply put: Do you need to hire if you were offered this grant or not?

If I understand correctly, you are quoting a price based on the value the integration offers to the ecosystem but not on the actual work?

Well, as a community member, I find the lack of transparency towards the public concerning and I don’t agree with you on the need to keep your progress private.

I’d have to trust your word on this since you don’t want to show anything.


Hey @hanh

Please review my post thoroughly before taking points out of context which only creates uncertainity and doubts within the Zcash community. I have worked really hard to make a lot of ends meet to make progress happen, so let’s work towards collaboration and improvements.

Please DM me your timezone & when you can get on a call so I can answer to any shortcomings that you see.

1 Like

What did I take out of context? Besides, I am just asking for clarification.

Can’t you answer this question simply?

Again, I don’t see why you need to discuss privately.


As an example, today https://moeda.casa uses a few swap services under-the-hood for the FIAT conversion, run a full zcash node, nginx serving Ruby/Sinatra apps, a database and other microservices, many over TOR hidden services. All on a $15 server/month in New York done with a 6k grant.

I co-run a dozen of other VPS for friends with other services since 2007… today you could even orchestrate hundreds of kubernets/dockers images in your own machine to test things, and just replicate it online, if that is the case - which is also unclear.

Sorry for my radical sincerity, but

$20,000: $5,000 x 4 months of multiple large AWS instances to run Thorchain test-net.

sounds not just too excessive, it sounds absurd. But I might be missing something.
Are those nodes mining rigs? :sweat_smile:

“THORNodes network is intended to be initially 100, but can scale to 300.”

You dont have to replicate it all to integrate into it, I suposse. With 230k you could afford 57 young Software Engineers in Europe at once, or 3 Seniors Devs for a full-year work project. It is not because we are sat on an oil basin that we have to become greedy making as many holes we can to suck it. Isn’t it?

Also, for many years I’ve being extremely underpaied for contractors making tons of money, and I would like the Grant Team to check if Nighthawk Team outsource other devs, they dont promote the same. I bet those mentioned 1k Indians contracted by Coinbase are not getting 1/3 of the formers.

Since many people are interested on this feature, and Moeda Team has some developed modules in our monolith, we might make a parallel proposal soon.


Hey @extrapo Thank you for your feedback.

That’s great! As long as your traffic is within the limits of the hosting plan you are on. Otherwise, check if you can leverage lightwalletd calls for your use, we operate load-balanced Zcash full nodes at https://lightwalletd.com that you are free to use to reduce your costs.

Good point, and yes, our estimates of running the Thorchain test-net for development comes to approx. $5,000 and I’ll ask our DevOps lead @vamsi to expand on the setup. To deliver this grant, we will need the entirety of the Thorchain infra spun up for end-to-end testing as we are adding Zcash support on all the levels of Thorchain’s blockchain, namely THORChain, Midgard, ASGARDEX. The setup also requires full nodes of the supported blockchains BTC, ETH, BCH, LTC & RUNE services running.

Each THORNode is comprised of 5 major components.

  1. thord - this is a daemon that runs the THORChain chain itself

  2. thor-api - this daemon runs an HTTP server, that gives a RESTful API to the chain

  3. bifrost - this daemon creates connections to remote chains (like Bitcoin, Ethereum, Binance, etc) to both observe activity on those chains (incoming/outgoing transactions), and also sign/broadcast outgoing transactions (moving funds on remote chains).

  4. thor-gateway : THORNode gateway proxy to get a single IP address for multiple deployments

  5. midgard - this daemon is a layer 2 REST API that provides front-end consumers with semi real-time rolled up data and analytics of the THORChain network. Most requests to the network will come through Midgard. This daemon is here to keep the chain itself from fielding large quantities of requests. You can think of it as a “read-only slave” to the chain. This keeps the resources of the network focused on processing transactions.

  6. Full nodes - for every chain that is supported by the network, each THORNode operator will run their own full node of each chain (Bitcoin, Ethereum, Binance, etc).

You can read more at THORNode Overview - THORChain

Sorry, where is this quote coming from?

Per the Thorchain devs, we actually do need to run the setup as mentioned, additionally, they recommend not to setup the nodes manually(which could have brought the costs down).

I have connected with recruiters and seen the profiles of engineers from Europe, but I haven’t come across any senior/lead engineers with blockchain experience. I have also worked with junior/mid-level engineers from Europe, and the work from them is just not on par with what can be delivered as a scalable solution. Please ping me if you find 57 software engineers with blockchain experience who can promise to deliver work for a flat budget.

That’s a good point, we have not advertised our needs on the forums for hiring members to the Nighthawk team as we have access to talent pools directly that we can work with to deliver the work per our milestones. This is something we can improve on.
And no, we don’t “outsource” our work to third-party, but bring in experienced developers to develop features on a per module basis. I would like to chat with you if you are interested to working with us in the future.

@hanh My reply was about the active grants to @holmesworcester and how this grant is un-affected, but you seem to have confused with statements for the ongoing-grants VS this grant. This is where a quick call helps resolve any uncertainty.

Yes, we need to pay the developers that we will onboard for this grant. For now, all we have is availability of developers(10+ years experience) beginning at the end of month. Generally, we prefer having access to talent to reduce delays in finding talent after the grant is already started.

We can record our call and make it public if you want :slight_smile: I just want to answer your concerns in a concise manner since you have many.

1 Like

This excludes public checks of the development process which is risky - this also excludes public collaboration while in development. I think something like this should never be accepted by the Zcash community and the ZOMG committee. Especially given the budget we are talking about.

I ask the @ZcashGrants committee to comment on this.

1 Like

From their docs. :smirk:

1 Like

On the contrary, releasing work-in-progress code to non-contributing developers is very risky.

If contributors really want to help and need an insight, we share our progress with the Light Client Working Group Friday calls at GitHub - zcash/lcwg: Light Client Working Group project management repository (Light client developers, Protocol developers, and lightwalletd developers are invited to attend the meetings. This is not a meeting for passive participants).

Additionally, any code that is released publicly without our review and merged in develop would bring up issues with what is pending/what is not. The grants provided to us are to deliver functional work and not to open source our internal-processes or non-compiling code.

@mika to access the code for existing deliverables, see nighthawk apps · GitHub

My ‘inner geek’ says “yeah, this sounds cool”…but I wonder just how useful (or used) this would be? Its not something I would use but that’s just my humble opinion.

Just because we can doesn’t mean we should, its a lot of $$ that could be used elsewhere.


That’s an good question @ChileBob

My initial review of Thorchain, the LP incentives & inter-blockchain swaps was that it would be first be a strong vehicle to onboard new users from the DEX ecosystem to the Zcash network by using native coins on Zcash blockchain VS token based system limited on Ethereum that does result in ZEC token exposure but adds primary on-chain value to ETH network only.

Then, we might start seeing existing Zcash users test & access the decentralized native swaps VS going via centralized swap providers like https://stealthex.io or https://sideshift.ai/btc/eth

Overall, I see the result of this implementation demonstrate Zcash expanding to new blockchains and making it easy for the larger cryptocurrency economy to access privacy oriented Zcash while reducing reliance on centralized exchanges. And personally, I think the budget of ~$250k of community funds will go a long way once the implementation is complete. Now it’s up to @ZcashGrants to decide if they see value in this proposal.

1 Like

Right, just want to make sure as I didn’t remember bringing it up :grinning_face_with_smiling_eyes:

So, Thorchain has their own internal incentive system where they control the RUNE inflation to attract more node runners on main-net, I heard that running a public node is very profitable at this moment, but it takes around ~$2.5M in RUNE just to get started.

The work from this grant will only touch main-net in the deployment phase when we interact with our partners who are node runners.

I agree that the usefulness is questionable at the 200k + price.

We are talking about 9M trading volume and yearly. It’s not a very useful metric but even so, this is tiny.

If there is interest, I’d suggest considering several bids and picking the best team at the best price. There doesn’t seem to be any urgency anyway.


Would love to see another similar proposal. Competition is good for Zcash.

I think Nighthawk team needs to deliver their funded projects first before adding a new major grant like this one.