Definitive’s technical architecture borrows the best concepts from traditional finance execution while integrating DeFi native elements such as on-chain activity monitoring and cross-protocol smart contract execution.

The architecture is composed of 2 main components

TradingVault Smart Contract

The TradingVault is the main contract used to support advanced execution at Definitive. It is a fully non-custodial contract composed of modules that perform specific tasks such as swapping and access control.

OpenZeppelin's AccessControlis used for role management. The different roles on a TradingVault are:



Owner of the contract. It is set to address provided by the client or Definitive’s Multisig (for retail clients).

  • Can add/remove other roles below.



Address provided by the client.

  • Can deposit/withdraw funds from the TradingVault .

  • Can initiate a Trading Session on the Definitive UI

  • Can initiate swaps from the Definitive UI.



Address owned by the Definitive team.

  • Can perform swaps with assets in the TradingVault.


TradingVault Setup

  • Definitive deploys a bespoke TradingVault (smart contract) per user per chain. The address of the TradingVault is the same across all EVM chains.

  • The client's address is designated as ROLE_CLIENT and only this address is able to deposit and withdraw funds.

  • Definitive's address is designated as ROLE_DEFINITIVE and can perform predefined actions like swaps. This address CAN NOT withdraw funds from the TradingVault .

  • The DEFAULT_ADMIN_ROLE is set to a backup address owned by the client. There can only be one DEFAULT_ADMIN_ROLE per TradingVault.

    • We recommend using a different address than what is set for ROLE_CLIENT. In case the ROLE_CLIENT address is compromised or lost, only the DEFAULT_ADMIN_ROLE can set a new ROLE_CLIENT.

  • All roles can be verified on-chain.

Executing Trades

  • Let's assume a client wants to swap ETH for USDC.

  • Once a TradingVault is set up, the client connects with their desired wallet provider (Fireblocks, Metamask Institutional, any EOA, etc.).

  • ROLE_CLIENT deposits ETH into the TradingVault.

  • ROLE_CLIENT initiates a trading session by signing a payload that verifies that the address connected to the UI is, in fact, the same address with ROLE_CLIENT on the TradingVault smart contract.

  • Once the trading session is active, the client can execute trades on the UI in a way similar to how they would execute in CeFi.

  • To execute the trade on-chain, the ROLE_DEFINITIVE address call the TradingVault with a swapPayload (data such as from asset, to asset, slippage, price impact), and this triggers an on-chain swap at a whitelisted venue.

  • If the swap is successful, the client now has USDC in the TradingVault.

  • The funds can only be withdrawn from the TradingVault by ROLE_CLIENT .

The same architecture is applied to Definitive’s Automated Yield product. Individual smart contracts are deployed per user per position, with the same roles and access control as listed in this document.

Last updated