Blog

WaaS is winning: Why onchain companies are leaving wallet infrastructure to the experts

Resources
·
June 10, 2025
·
Bryce Ferguson, Co-Founder & CEO of Turnkey

Wallet infrastructure is one of the most critical components of any crypto project. It’s responsible for securing private keys, protecting user funds, and facilitating transactions — all while meeting requirements for performance, compliance, and scalability.

Because of its importance, some teams consider building wallet infrastructure in-house. It can seem like the better path: more control, more flexibility, and potentially fewer dependencies. But in practice, building wallet infrastructure is far more complex and risk-prone than most teams anticipate.

That’s why the majority of onchain companies partner with proven Wallet-as-a-Service (WaaS) providers – platforms that offer secure, ready-to-integrate wallet infrastructure – as the safer, faster, and more scalable path forward.

Let’s explore this in more detail.

“Key management may seem straightforward on the surface, but underneath it’s a minefield of edge cases, hidden attack vectors, and difficult-to-understand tradeoffs.” – Jack Kearney, Co-founder of Turnkey

Why rolling your own wallet infrastructure is a tall task

Wallet infrastructure contains multiple layers, from secure wallet and private key generation to transaction signing, access control, and audit logging. 

Implementing each of these layers requires specialized expertise in cryptography, secure systems design, and threat modeling — skill sets that are often difficult to hire for due to the global shortage of 4.8 million professionals in this space.

Even with the right talent on-hand, constructing secure wallet infrastructure requires a significant investment. Here are some of the steps needed to implement secure, flexible and scalable wallet infrastructure:

1. Isolate sensitive operations using secure execution environments

Sensitive wallet operations like key generation and transaction signing should be isolated from the broader application stack. This typically involves using secure execution environments, like secure enclaves, hardware security modules (HSMs), or other trusted execution environments (TEEs), to prevent exposure even if other systems are compromised. This separation prevents tampering, even if other parts of the stack are compromised. Without this level of isolation, a single breach could expose user funds. 

2. Develop cryptographically sound key generation processes 

While private keys are designed to be unguessable, real-world incidents have shown that flawed key generation can lead to serious vulnerabilities. The Blockchain Bandit case, where over 45,000 ETH was stolen, exposed how poor randomness and implementation bugs in wallet software led to weak, guessable keys. 

More recently, the Milk Sad vulnerability (CVE-2023-39910) revealed that the widely used Libbitcoin Explorer tool generated keys with only 32 bits of entropy — making wallets trivially brute-forceable. Turnkey engineers helped uncover this flat as part of a broader investigation into unexplained wallet drains. 

Secure key generation requires deep cryptographic expertise and strict adherence to high-entropy randomness and well-audited libraries.

3. Build tamper-resistant transaction signing flows 

Even if private keys are protected, the moment of transaction signing presents another attack surface. Tamper-resistant signing flows are crucial to ensure only authorized actions are executed and that transaction details can’t be altered mid-process. Without strict validation, users could think they are approving one action while actually authorizing another.

4. Define and enforce granular, policy-based access controls 

Wallet infrastructure needs to support detailed access policies that define exactly what actions can be performed, by whom, and under what conditions. These controls might include transaction limits, usage time windows, multi-device approvals, or restrictions based on user roles. 

In fast-moving or high-risk environments, hardcoded permissions quickly become a liability. A flexible, fine-grained policy engine gives teams the ability to adjust access dynamically without rewriting core logic, reducing risk and maintaining control as requirements evolve.

5. Conduct thorough threat modeling to identify edge cases 

Crypto attacks often exploit edge cases, which encompass obscure interactions or overlooked assumptions. Threat modeling systematically maps out potential vulnerabilities before attackers find them. Without this discipline, teams risk being blindsided by sophisticated exploits that could have been anticipated pre-emptively.

6. Secure the software supply chain to prevent insider and third-party risks

When it comes to compromising a dependency, the software development and deployment workflow can be an easier path than attacking the infrastructure directly. The software supply chain includes every component involved in building and deploying code: open-source libraries, CI/CD pipelines, package managers, build scripts, and more. 

A secure software supply chain protects every stage of code delivery, ensuring that only verified, authorized code makes it to production with no hidden changes, tampered dependencies, or unauthorized additions. Without these safeguards, it’s dangerously easy for a malicious dependency update, compromised contributor, or misconfigured pipeline to introduce backdoors into production.

What’s at stake when wallet infrastructure fails

Checking each of the above boxes in-house can significantly delay time to market while opening up your company to numerous security risks. We’ve seen how even benign mistakes within this process lead to the loss of millions in user funds. 

For example, Bybit suffered a $1.4 billion exploit after attackers compromised its transaction signing flow. By injecting malicious code into the front end used to approve multi-signature transactions, the attackers tricked signers into authorizing a transfer that gave them control over the cold wallet contract. This breach didn’t stem from a failed signature scheme, it came from a vulnerable interface and a breakdown in transaction validation. Incidents like this highlight the importance of tamper-resistant signing flows and a wallet infrastructure design that clearly separates trusted and untrusted components.

“Building wallet infrastructure is exceptionally hard. It requires deep security expertise in areas like key management, access control, and threat mitigation — the kind of knowledge most teams building marketplaces, DeFi protocols, or consumer apps don’t have in-house.” – Jack Kearney, Co-founder of Turnkey

The hidden costs of building wallet infrastructure in-house

Beyond technical complexity, building wallet infrastructure in-house comes with ongoing costs that add up quickly. Teams face challenges like long-term maintenance, regular security audits, and the need to stay ahead of constantly evolving attack surfaces. These aren't just one-time investments; they require sustained focus and resources that can strain even mature engineering teams.

Maintaining secure infrastructure over time

Building secure wallet infrastructure is far from a one-time effort. It takes continuous investment to write, review, and maintain code that holds up under real-world conditions. Without constant vigilance, even well-built systems can drift into vulnerability or lose performance over time.

Staying ahead of evolving threats

Secure wallet infrastructure demands regular, professional assessments and constant monitoring as new vulnerabilities and attack surfaces emerge. Teams need dedicated resources to track changes in the threat landscape, respond to issues quickly, and adapt their systems before attackers do. Without this continuous investment, even well-designed systems can become vulnerable.

Mitigating regulatory risks

In the UK and parts of the EU, regulators are introducing tighter oversight that could extend to non-custodial services, especially those involved in wallet provisioning or transaction facilitation. Organizations that mishandle key management or transaction authorization could face unexpected legal exposure.

Building for scalability and compliance from day one

Wallet infrastructure that works for thousands of users can quickly break under hypergrowth. Retrofitting systems to handle scale or meet new compliance requirements often leads to expensive rework, rushed audits, and operational slowdowns that could have been avoided with the right foundations.

All of the above challenges can make DIY wallet infrastructure unsustainable, especially for resource-strapped teams who also need to focus on building and improving their core products.

Why onchain companies choose WaaS providers

WaaS providers (like Turnkey) deliver comprehensive and secure wallet infrastructure from day one — helping onchain companies launch projects faster while maintaining a high standard of security and control. These providers take on the complexity of key management, transaction signing, access control, and auditability so that teams can focus on building and scaling their products.

Security is one area where many WaaS providers shine. Leading providers reduce risk by separating critical operations into trusted and untrusted services. Only the systems responsible for sensitive key-related actions are trusted. Everything else, such as transaction generation or user-facing workflows, is treated as untrusted by default. Some providers go further by running trusted services inside secure enclaves to prevent tampering, even if other systems are compromised.

In addition to key protection, WaaS providers often include policy engines, audit trails, and user authorization layers. These features enable developers to set clear rules for how keys can be used. For instance, an application might allow users to swap tokens within the platform but block any transfers to external wallets. This level of granularity can be difficult to build in-house but can come as standard by using a WaaS provider.

Despite outsourcing wallet infrastructure, teams can still remain fully in control — especially with providers that offer modular architectures. For example, Turnkey specializes specifically on  the secure signing layer. Developers continue to own transaction creation, broadcasting, and application logic. This modularity helps address common concerns around customization and vendor lock-in.

Above all, WaaS providers help teams move faster. Instead of investing months building secure infrastructure, they can integrate a production-ready system and focus on product development. Over time, this translates into lower engineering costs, fewer security incidents, and less time spent maintaining foundational systems.

Bonus read: Want a deeper look at Turnkey’s architecture and security model? Check out the Turnkey whitepaper on verifiable key management for a technical deep dive.

In short, WaaS providers offer a practical alternative to building everything from scratch. They bring together security, speed, and long-term flexibility in a way that empowers product teams to innovate and launch projects without friction.

Choose a faster, safer path for your wallet infrastructure

We’re a system that can sign transactions securely. Developers stay in control of how transactions are generated and broadcast — that flexibility is what makes it powerful.” – Jack Kearney, Co-founder of Turnkey

Wallet infrastructure is critical to getting crypto products to market quickly, securely, and at scale. Building it yourself demands specialized expertise, long-term investment, and constant vigilance: resources that most teams can't afford to divert from their core products.

Turnkey gives you a better way forward. Built by the team behind Coinbase Custody, Turnkey delivers production-grade crypto wallet infrastructure that combines industry-leading security with performance, flexibility, and operational efficiency.

See why leading onchain companies like Moonshot, Parallel Studios, DIMO, and Droppp all trust Turnkey with their wallet infrastructure by contacting our team today!