Stablecoin and custody platform
A multi-tenant platform on which a large US bank issues stablecoins and runs custody and treasury operations. I worked on network management and custodian keys.
96 → 3
networks listed → networks open for transactions
How it was measured
Networks in the platform's network list at the time versus networks marked as implemented. The allowlist I built into both portals lets only implemented networks be switched on.
3
features merged within one week
How it was measured
Pull requests I authored and merged into the main branch: network reports, network management and custodian key rotation.
On this page
Context
A multi-tenant platform on which a large US bank issues stablecoins. Each issuer defines a token backed by a weighted basket of reserve assets, deploys it to EVM networks or Solana, and mints and burns it from wallets at an institutional custody provider.
The system is a .NET 8 modular monolith: two admin portals over one REST API, SQL Server, background workers, and adapters for the custody provider, blockchain nodes and FX rates. I joined through Valletta Software during a migration of the core data model.
Problem & constraints
- The data model was being replaced while the system ran: old and new entities lived side by side.
- The platform listed 96 networks but supported only 3. Admins must not switch on a network the code cannot handle, and issuers may use only what the platform allows.
- Custody API keys carry signing authority over vaults. A wrong key must not replace a working one.
- Each tenant sees only its own data: tenant context from the route, soft delete and checks per tenant.
- Platform-wide changes must be all or nothing.
Architecture
Scroll the diagram sideways
Key decisions
Build on the new data model, not the old one
- Context
- The team was moving to a new set of entities, and the old ones were due to be removed.
- Options considered
- A: extend the old network entity with the new flags. This was my first local attempt. B: query the new model and map results into dedicated response models.
- Trade-offs
- B meant rewriting queries and mappings, plus a temporary workaround for an old foreign key. A would have put schema changes on a model that was about to go.
- Outcome
- Chose B. The old entities were later removed as planned.
Two levels of network permission
- Context
- A network can be listed, implemented, allowed by the platform and chosen by an issuer. One flag cannot express that.
- Options considered
- A: a single enabled flag. B: an implemented flag set in code, a platform switch for admins, and issuer selection checked against the platform list.
- Trade-offs
- B means more states and more UI. In return unsafe combinations are blocked in the API, not only hidden in the UI.
- Outcome
- Chose B, using the flags of the new model in both portals and in the API. Admins see switches only for implemented networks, and the API rejects an issuer's network the platform has not allowed.
Check a new custodian key before switching to it
- Context
- A custody API key controls signing. A typo or a revoked key would break every operation that follows.
- Options considered
- A: save the new key and let the first real operation fail. B: store it under a new credential tag, call the provider, and switch the custodian to the new tag only on success.
- Trade-offs
- B adds a round trip to the provider and depends on it being available, and failed attempts can leave unused credential rows.
- Outcome
- Chose B. A wrong key is reported to the user, and the working key stays in place.
Results
- Network report pages in both portals on the new model: status per network, deployed tokens and market cap in a chosen currency.
- A network management page for platform admins, with switches only for implemented networks, and an API that returns DTOs instead of database entities.
- A network selection page for issuers, checked against the platform's allowlist.
- Custodian API key update on a teammate's scaffold, checked with the custody provider before the switch.
- Across the team: stablecoin issuance on EVM networks and Solana through the custody provider, and the move to the new data model.
What I'd do differently
- I would write handler tests before merging. A duplicate-key check of mine sat inside a catch-all, and a teammate fixed it the next day.
- I would not work around the old foreign key with a placeholder value. I would make the old column nullable in the migration.
- I would push for custodian secrets to live in a secret store or be encrypted by the application, with only a reference in the main database.