How Defined built a fully customizable trading terminal for tokens, perps, and predictions with Turnkey
3
99,9%
50-100
.jpg)
.jpg)
Between the engineering overhead and regulatory risk involved, building wallet infrastructure in-house was way out of scope. Turnkey helped us offload that necessary step, and our user experience has never been more seamless.
.jpg)
Learn how this up-and-coming trading terminal partnered with Turnkey to support its beta launch with seamless user authentication, low-latency signing flows, and gasless transactions.
- 3 weeks to initial integration
- 99,9% uptime
- 50-100 ms signing
“Between the engineering overhead and regulatory risk involved, building wallet infrastructure in-house was way out of scope. Turnkey helped us offload that necessary step, and our user experience has never been more seamless.” — Ehsan Rezaie, Senior Software Engineer at Defined
About
Defined is a fully modular trading terminal powered by Codex, an industry-leading blockchain data API. Founded in 2021 to redefine onchain trading experiences, Defined goes well beyond token trading, offering users instant access to spot, perp, and prediction markets.
Challenge
Defined required flexible and scalable wallet infrastructure to support its launch
During peak memecoin mania, Defined saw the opportunity to evolve from a real-time charting platform into a full-featured trading terminal. Using its industry-leading blockchain data API, Codex, Defined would offer traders enriched data and powerful analytics tools to give them an edge in everything from token trading to spot, perp, and prediction markets.
Ehsan Rezaie, Senior Software Engineer at Defined, was tasked with leading this transition, and his first objective was to reshape Defined’s wallet infrastructure.
At the time, Defined relied on smart contract wallets for everything from user onboarding to transaction execution. While functional, these wallets introduced significant provisioning costs, required deep crypto expertise, and restricted trading to EVM-compatible chains. For a terminal looking to break into the Solana-dominated memecoin market, that limitation was a non-starter.
The challenge extended beyond provisioning costs and flexibility. Supporting complex, server-side actions, such as limit orders, would introduce looming compliance hurdles related to custody of user funds.
“The primary goal for Defined was not to become a custodian,” Ehsan shares. “We needed a way to give users unrestricted access to onchain actions, while giving them full control over their funds.”
As new entrants continued to flood into the memecoin market, Ehsan realized that building this infrastructure in-house would not only delay time to market but also command a significant amount of engineering bandwidth on maintenance alone. He needed a proven wallet infrastructure partner that would deliver streamlined onboarding flows and native cross-chain compatibility while securing the terminal’s non-custodial status.
“With smart contract wallets, you could spend up to $20 just on provisioning before a user makes a single trade. That upfront cost plus the overhead required for maintenance made the decision to outsource our wallet infrastructure a no-brainer.”
Solution
Abstracting the complexities of wallet management with Turnkey
Defined partnered with Turnkey to establish a robust wallet layer for its trading terminal, accelerating time-to-market while streamlining the user experience from end to end.
Ehsan initially used Turnkey for wallet provisioning alongside a separate authentication system. But before long, he migrated to Turnkey’s native authentication. Through a single login flow, users can sign up, create a wallet, and begin trading without context switching or repeating authentication steps.
Now, when a new user creates a Defined account, Turnkey instantly provisions an embedded, non-custodial EVM and Solana wallet, both of which are linked to the terminal’s mobile app. Email and social logins ensure even the most non-crypto-native traders can onboard with ease, while email-based recovery flows ensure lost funds can be recovered without memorizing a 24-word seed phrase.
Turnkey's flexible policy engine helped Ehsan bring enhanced platform functionality to Defined without compromising its non-custodial architecture. By implementing sub-organizations per user with granular policies for server-side actions, he maintained user root control while enabling seamless backend execution. Time-limited session keys further supported complex trading workflows such as limit orders and non-interactive execution flows.
All of these policies are enforced within Turnkey’s secure enclaves, ensuring keys never leave protected memory, even during server-side signing operations. This cryptographic guarantee allowed Defined to support advanced trading functionality without taking custody of user assets.
Ehsan also implemented Turnkey’s transaction sponsorship capabilities to reduce friction during cross-chain trading flows. Instead of requiring users to acquire native gas tokens before executing transactions, Defined can sponsor network fees through a funded server-side wallet, simplifying movement across chains and trading environments.
“Turnkey enabled us to define clear boundaries around which actions could be executed on behalf of the user without ever taking control of the wallet. That made it possible to support workflows like limit orders without being classified as a custodian.”
Results
Expedited time-to-market, accelerated user adoption, and infrastructure built for scale
With Turnkey, Defined brought its modular trading terminal to market in time to capitalize on memecoin mania without impacting engineering bandwidth or introducing custodial roadblocks. With wallet infrastructure on autopilot, Ehsan and his team can devote their time entirely to building new trading workflows and refining the user experience as the terminal scales.
- 3 weeks to initial integration
- 99,9% uptime
- 50-100 ms signing
As Defined moves from closed beta to full public launch, Turnkey’s wallet infrastructure will continue to play a pivotal role in solidifying long-term growth and supporting its evolving product surface.
“As we’ve built the product, we’ve evolved alongside Turnkey’s platform. New capabilities like social login and gas sponsorships have directly shaped our user experience, and it’s only going to get more intuitive moving forward.”
Related case studies
How Frontrun powers extension wallets for thousands of professional traders with Turnkey
Learn how this next-gen trading OS partnered with Turnkey to solidify user trust and adoption through secure, embedded wallets.
How dYdX powers frictionless cross-chain interoperability with Turnkey
Learn how this decentralized trading platform automatically bridges funds from EVM to Cosmos through Turnkey’s secure, non-custodial embedded wallets.
