Substrate Ledger app and contract with Zondax

Hello everyone. I wanted to open up a conversation regarding Zondax and their Ledger app integration with parachains in the ecosystem.

Background and Motivation

As many parachains are aware by now, around May of this year, Zondax and Web3 Foundation struck a deal to provide parachain projects with free Ledger app support for basic pallets (source).
However, the article and announcement neglect to mention that this package will only support the balance pallet, which is insufficient for most parachains as we need at least the standard plan to make the app usable with most dApps. Custom solutions for adding more frame pallets or custom pallets.

Furthermore, they will only offer 3 months of free support (which covers app update when the extrinsic interface changes) in a ecosystem that is growing and changing everyday.

I am not saying that their plans are completely unreasonable and we shouldn’t use them because they are a very capable team who deserves the attention. But when we consider that most parachain projects are relatively small companies or small networks (and in case of Astar Fondation, a team of builders without any other source of income outside of our network), I feel like the announcement of the partnership with the Web3 Foundation did not result in anything practical outside of transferring balance (and God know what would happen after three months).

What is the problem?

I believe that for most parachains, the standard plan is not enough (in the case of Astar, we don’t use the proxy pallet and the staking pallet) to create something usable and representative of the parachain’s value proposition. And considering that most Substrate-based chains are using a shared pallet in the Substrate frame, having the parachains pay separately to support the same pallet to the same organization seems wrong. I am also unhappy with having the parachain responsible for paying the full support fee for commonly used pallets when upgrades are inevitable, and the chain is always evolving. Another issue is when we have to add the contract pallet support for the Ledger app as the Ledger app UI rendering is done on an interface basis (similar to how EVM signatures work on Ledger for ERC20 transfers).
Of course, it doesn’t make sense for the parachain not to pay anything to Zondax, but having the parachains for everything separately for the same feature doesn’t seem right to me. Especially when the burden of UX (Ledger support to the dApp front-end and gracefully fail unsupported pallets) and mass adoption for Polkadot ecosystem projects rely on the hands of the parachains.

I am not a fan of businesses treating small sovereign layer 1 blockchains like parachains as business clients to perform a service instead of an open platform that any projects can build on or use. This is not the Web3 way.

Proposal

I feel that it’s not far-fetched to have the Polkadot’s (or Kusama’s) treasury to pay the development fee for common standard pallets (frame) or the maintenance fee to Zondax. This would encourage more projects to add Ledger support, leading to more adoption from new users, not to mention the added security for key management.

Discussion

We were presented with a hefty amount per year for the full integration with a couple of custom pallets and the contract pallet support. This is impossible for us to support in the long run as a small team, and I don’t know how we can continue to support once we become a DAO.
I want to start the discussion by asking parachain projects who are working with Zondax for their Ledger app and what your thoughts are.

I will not claim that my proposal is the only way to solve this issue, or even if the problem I raised is an actual problem for others. But I think it’s worth talking about it.

5 Likes

We have been working for over a year with Zondax on our side. All the points mentioned by @hoonkim generally apply to us as well. However, I’d like to suggest a different path forward.

Indeed, Zondax currently has the monopoly of Ledger development for Substrate and thus can charge hefty fees to each Parachains. Not only that, but the work done should generalize among Parachains that use similar pallets, right now, we all pay the same fees for the same piece of code which is duplicated across codebases. This sounds like a waste of resources. Not only that, but we also end up having to support one Ledger app for every single Parachain, while the underlying primitives are almost the same.

I am wondering whether there would be a path towards a single general application, potentially with some extensions for each parachain. This would be similar to the ETH Ledger app for which extensions are then developed (for example, that’s how the LIDO works from what I know). Are there any technical blockers behind this structure? If not, is this something we could push for and sponsor via some grants from all of us?

2 Likes

I think the major technical blocker for that approach would be handling different pallet versions, embedding chain metadata, and handling custom pallet interfaces. Especially with common basic pallets, we could probably just make a unified codebase that allows us to add something like GitHub - paritytech/ss58-registry: Registry for SS58 account types for our chain.
But the biggest challenge is handling custom pallets and smart contracts. The codebase is a bit challenging for us to make scalable for different solutions since it’s not easy as adding a JSON file with the custom interfaces.

1 Like

My gut feeling is that the custom pallets / smart contracts could be supported via a second app/shim that serves as an extension. This is how ETH-based and BTC derivatives apps are implemented on Ledger, they all piggyback on the main ETH/BTC app. (Correct me if I am wrong obviously)

Thanks @hoonkim and @eliott for bringing this forward! I do think there are synergies across parachains that can be useful for this, and that potentially the Polkadot/Kusama Treasury, even combined with the different chains Treasuries can provide the needed funding for this development.

I think it would be interesting to discuss some particular case. I’ve put together this list some time ago with the pallets being used on each parachain’s runtime on both Polkadot and Kusama. These are ranked by which one is present in the most amount of runtimes (note that these are counted by name; if any team is using the same pallet name but there is something different inside, this analysis wouldn’t notice it).

From this particular list: which pallet(s) could be a good target for the idea being discussed here? Personally I think it should be a combination of pallet(s) that users will use, and that are extensively being used in the different runtimes.

1 Like

Thank you for the list! Yes, I think pallets listed here with at least 30% usage expected for the end users to directly interact with (ex: pallets that you would put in your custom UI) are a good starting point in my opinion.

2 Likes

This sounds similar to the discussion around which pallets we need to move to the independent FRAME organization. Maybe a good approach could be to say that if a pallet is in the FRAME org + exposes external extrinsic, then it could be a good candidate for a generalized integration.

1 Like

This topic is quite essential and has been brought up by a few individuals and institutions of ours about not having hardware wallet support for the tokens on the Kusama Parachain.

I would like to ask for general Substrate-based Blockchain support on the Ledger, as it was already previously mentioned for the basic transfers and signing process.

Instead of Kusama Parachains paying for individual integration, it would make more sense to pay once as a collective for a general implementation usable for the basic functionalities.

If that is technically not possible, it would be interesting to know what the blocking matter is and if we could overcome it, at least for the Parachains.