This study presents the hot wallet infrastructure that Vinu Digital developed for a regulated custody service provider, with no per-user private keys.
Overview
Custody platforms that assign a separate externally owned account (EOA) to each user take on a key management burden that grows in direct proportion to the number of users. As crypto asset custody regulation tightens, each of these keys becomes subject to audit: the generation, storage, access, backup and destruction of every key must be provable. This case study describes a custody hot wallet platform developed from scratch for Bastion, a regulated custody service provider. The platform is built on a smart contract-based deposit architecture in which, by design, there are no per-user private keys. On EVM networks, user deposit addresses are derived deterministically with CREATE2 and created as EIP-1167 minimal proxies that accept calls only from an upgradeable EIP-2535 factory contract. On Solana, the same property is provided by program-derived addresses (PDAs). The remaining signing authority is limited to a small number of operator keys held in a PKCS#11-compatible hardware security module (HSM) and AWS Nitro Enclave. The EVM contracts and the SVM program were audited by CertiK and received a full score; all minor dependency updates identified during the audit were resolved during the project. The project consisted of a two-month setup, including the on-chain components, followed by six months of operational support.
Background
In July 2025, Vinu Digital published a two-part article on Medium about sweeping user balances to admin wallets on centralized exchanges. The second part describes a problem encountered on a platform for which Vinu Digital provides development and technical support, and the solution developed for it: Part-2: Sweeping User Balances to Admin Wallets in Centralized Exchanges: The Power of WEB3.
This problem is widely known in the industry. When a user is assigned a standard address, sweeping USDT deposited to that address into the main wallet first requires topping up the address with ETH for gas and then executing the token transfer. This results in two separate transactions and two gas payments for every deposit. Vinu Digital solved this problem using addresses precomputed with CREATE2 and minimal proxy clones. In this design, the contract is deployed during the first sweep, and the balances of multiple users can be collected in a single transaction. According to Vinu Digital's own measurements, gas consumption was reduced by approximately 84%. The article focused mainly on the cost advantage of the architecture. What caught Bastion's attention, however, was a different outcome of the same architecture.
Client: Bastion
Bastion is a US-based financial technology company that builds the technology, operations and regulatory compliance infrastructure for the stablecoin programs of global businesses and financial institutions.
Working with global organizations such as Samsung and Sony Bank, Bastion supports the development and operation of large-scale stablecoin programs. In the USDC-based service of Samsung Wallet announced in October 2026, Bastion is one of the partners responsible for stablecoin accounts, transaction authorization, compliance controls and cross-border payment infrastructure.
Backed by investors such as Andreessen Horowitz (a16z) and Coinbase Ventures, Bastion brings together technology, regulated services and operational capabilities for enterprise stablecoin infrastructure.
Client Requirements
The first meeting with Bastion made it clear that the priority was regulation, not cost. In a conventional hot wallet setup, every user address is backed by a private key. When the number of users reaches tens of thousands, so does the number of keys that must be protected. In a regulatory or audit review, the following questions must be answered for each of these keys: Where was the key generated, who can access it, how is it backed up and what happens if it leaks? As custody regulation tightens, these questions shift from a technical choice to a legal obligation.
Bastion did not want to take on this burden. What the company was looking for was not a better way to protect keys, but a structure in which no key needed to be protected on the user side at all. In this structure, which Bastion itself described as "Coinbase-style", the user's deposit address would be a smart contract, and assets arriving at that address could only be transferred to destinations permitted by the contract.
The architecture meets this need directly. Although the article emphasized cost, the design has a more critical consequence: minimal proxy clones have no private key. A clone accepts calls only from the factory contract, and the factory contract can be called only by authorized admin keys.
Evaluation Process
Before the contract was signed, commercial negotiations and technical due diligence sessions were held over approximately one month. During this period, Bastion's technical team reviewed the architecture in every respect.
The first question examined was where the remaining keys are held in a structure with no user keys. Solana support was also set as a mandatory requirement from the outset. Although Solana has no contract clones as EVM does, program-derived addresses (PDAs) provide the same property, and by definition these addresses also have no private key. The authorization model, audit trail, network isolation and monitoring were also addressed.
At the end of the evaluation, a contract was signed covering two months of setup and transition to production, followed by six months of support.
Solution
On the EVM side, the approach was adapted to the requirements of a production environment. At the center of the architecture is a single upgradeable main contract based on the EIP-2535 Diamond pattern. This contract acts as the wallet factory, the sweep router and the layer where rules are enforced. Each user address is an EIP-1167 clone linked to this contract, with the factory address immutably set in the clone. The only way to move assets out of a clone is therefore through the factory; this rule also applies to Bastion's own servers. Clones are created during the first sweep, within the same transaction. The allowlist of trusted destinations and role-based access control are enforced at the contract level. New features can be added as modules without touching user wallets.
On the Solana side, the same principle was implemented with an Anchor program. User addresses are created as PDAs, sweeps can be performed in batches, and SPL and Token-2022 tokens are supported in addition to native SOL. A separate management and handover procedure was prepared for the program's upgrade authority.
In a structure where assets are protected directly by contract and program rules, an independent review of the code was considered essential. The EVM contracts and the Solana (SVM) program passed a CertiK audit with a full score. Only minor package updates were identified during the audit, and all of them were resolved during the process. No findings remained open when the audit closed.
As there are no keys on the user side, only a limited number of admin keys that call the contract and the program remain. These keys are also subject to strict security controls. All signing operations are routed through a single dedicated signing service. EVM keys are generated inside an HSM and never leave it. Solana keys are used inside AWS Nitro Enclave, and only their KMS-encrypted forms are written to the database. No other service on the platform can access the keys.
Operating the contracts as a product requires a system running around them. The following components were therefore built as well: blockchain indexers that detect deposits and handle chain reorganizations (reorgs), a Kubernetes operator developed in Rust that autoscales these indexers based on load, a metadata service that holds chain and asset definitions, a scheduler that triggers fee and sweep jobs, and a webhook service that forwards events to Bastion's systems. All components run in a Kubernetes environment with network policies that block all traffic by default, mTLS between services and identity and access management via Keycloak.
Deployment and Go-Live
The system was built from scratch. Within two months of contract signing, the development environment was brought up end to end, with the infrastructure, contracts, Solana program and all services running together. Deposit, sweep and withdrawal flows were tested end to end in this environment together with the Bastion team.
The production environment was set up by Bastion. The admin keys were also generated inside the HSM and enclave by the Bastion team. Vinu Digital had no involvement at this stage, by deliberate choice. For an organization that prioritizes regulatory requirements, the fact that production keys were never exposed to an external company at any stage is as important as the architecture itself. At this stage, Vinu Digital supported the process with a setup validated in the development environment, documentation and support.
During this process, the Bastion team received a documentation portal protected by Keycloak, together with upgrade and emergency procedures for the contracts and the program.
Operational Support
Support was provided for six months following the transition to production. The main objective of this period was to enable the Bastion team to operate the platform independently.
Conclusion
In this architecture, the number of keys that must be protected does not change, no matter how much the number of users grows.
The benefits described in the article were also achieved: there is no longer any need to send gas to user addresses, the upfront cost of address creation has been eliminated, and sweeps can be performed in batches. The same architecture works the same way on EVM networks and on Solana.
The project showed that the most valuable outcome of an architectural decision is not always the one originally targeted. A design built to reduce gas costs was chosen by Bastion to meet a regulatory requirement.
Technology stack: Solidity, Foundry, EIP-2535, EIP-1167, CREATE2 · Rust, Anchor, Solana PDA, SPL, Token-2022 · TypeScript/NestJS, Rust (kube-rs), Java · PostgreSQL, Redis, Kafka · PKCS#11 HSM, AWS Nitro Enclave, AWS KMS · Kubernetes, Helm, Istio, Keycloak, Prometheus, Grafana, Loki
- Client
- Bastion
- Industry
- Fintech · Stablecoin Infrastructure · Digital Asset Custody
- Technologies
- Solidity, Foundry, EIP-2535, EIP-1167, CREATE2 · Rust, Anchor, Solana PDA, SPL, Token-2022 · TypeScript/NestJS, Rust (kube-rs), Java · PostgreSQL, Redis, Kafka · PKCS#11 HSM, AWS Nitro Enclave, AWS KMS · Kubernetes, Helm, Istio, Keycloak, Prometheus, Grafana, Loki
Results
In this architecture, the number of keys that must be protected does not change, no matter how much the number of users grows. The benefits described in the article were also achieved: there is no longer any need to send gas to user addresses, the upfront cost of address creation has been eliminated, and sweeps can be performed in batches.





