User Journey

This page describes the end-to-end flow from a new user signing up to having a managed DeFi portfolio.

The Two User Paths

NMT supports two distinct user types with different onboarding flows:

NEW USER
    |
    +-- "I want an advisor to manage my DeFi" → SAFE PATH (Managed)
    |
    +-- "I want to trade directly"            → EOA PATH (Self-Directed)

Safe Path: Managed Portfolio

This is the primary flow — a user delegates DeFi strategy execution to an advisor/operator.

Step 1: Sign Up & Connect Wallet

  1. User visits the platform and clicks "Connect Wallet"
  2. Dynamic Labs SDK presents wallet options (MetaMask, WalletConnect, Coinbase, email, Google)
  3. User connects and signs a message to authenticate
  4. Dynamic Labs issues a JWT → frontend creates an iron-session cookie
  5. A user record is created in PostgreSQL (or matched to an existing one)

Step 2: Advisor Assignment

  1. A platform administrator (super/admin role) assigns the user to an advisor via the Admin panel
  2. The user's advisor_id is set in the database, linking them to their advisor
  3. Both user and advisor can now see each other in the platform

Step 3: Safe Deployment (All Chains)

  1. The advisor (or user) initiates Safe creation from the platform
  2. The frontend deploys a Gnosis Safe on all 4 supported chains (Base, Ethereum, Arbitrum, Optimism) using ERC-4337 Account Abstraction:
    • A saltNonce is used for deterministic addresses — the Safe gets the same address on every chain (via CREATE2)
    • The deployment is submitted as a UserOperation to Gelato's ERC-4337 bundler
    • Gelato sponsors the gas (zero cost to the user)
  3. In a single atomic UserOperation per chain, the following is set up:
    • Safe contract is deployed
    • Protocol modules are enabled (Aave, Uniswap V3, Morpho, Yearn, Aerodrome, Relay, Cow, Krystal)
    • Permissions are granted to both the owner and the delegate (advisor)
    • On Base chain: subscription is initialized (first month free)
  4. Database records are created: safe_account, safe_delegate, module status records

Step 4: Fund the Safe

  1. User transfers tokens (USDC, ETH, etc.) to their Safe address from their personal wallet or an exchange
  2. The frontend displays the Safe's token balances (read from blockchain via Viem)

Step 5: Subscribe

  1. User navigates to the subscription page
  2. Approves the SubscriptionManager contract to spend USDC from the Safe
  3. Clicks "Subscribe" — first month is free
  4. After 30 days, the backend auto-renews by calling payForSubscription() via Gelato Relay
  5. The advisor may apply a discount voucher (signed via EIP-712)

Step 6: Advisor Executes Strategies

  1. Advisor browses the Earn page to find yield opportunities
  2. Selects a pool/vault and builds a transaction (e.g., "Deposit 1,000 USDC into Aave on Base")
  3. The frontend encodes the calls via DeFi adapters and the DelegateBundler
  4. Advisor signs an EIP-712 message (not a blockchain transaction)
  5. The signed message is submitted to Gelato Relay (gasless)
  6. On-chain: DelegateBundler verifies signature → checks permissions → executes through protocol modules → Safe interacts with the DeFi protocol
  7. Backend workers detect the on-chain events and create position records in PostgreSQL

Step 7: Monitor & Manage

  • Portfolio dashboard shows all positions, P&L, and historical performance
  • Backend workers recalculate position valuations every 24 hours
  • User and advisor communicate via built-in CometChat messaging
  • Advisor can adjust positions, rebalance, or close strategies as needed

EOA Path: Self-Directed Trading

For users who want direct control without delegation.

Step 1: Sign Up & Connect Wallet

Same as the Safe path — connect wallet via Dynamic Labs.

Step 2: Trade Directly

  1. User browses the Earn page or goes to a specific protocol section
  2. Selects a pool/vault and builds a transaction
  3. Signs and submits the transaction directly from their wallet (walletClient.sendTransaction())
  4. User pays their own gas

Step 3: Portfolio View

  • Token balances and DeFi positions are fetched via Zerion API (not tracked by the backend)
  • P&L and portfolio charts come from Zerion
  • EOA positions do not appear in nmt_position table — they are display-only from Zerion

Revenue Model

NMT monetizes through monthly USDC subscription fees paid from each managed Safe:

Aspect Detail
Payment token USDC on Base chain
Billing cycle Monthly (30 days)
First month Free
Renewal Automated via backend worker + Gelato Relay
Pricing Set on-chain in the SubscriptionManager contract (read dynamically, not hardcoded)
Discounts Advisors can create EIP-712 signed discount vouchers for their clients
Fee collection Backend calls withdrawFees() after each renewal cycle to collect protocol revenue

Revenue breakdown per renewal:

Field Meaning
usdc_price Full undiscounted cost
usdc_discount Discount amount (if voucher applied)
usdc_payment Amount actually charged

Subscription expiry: If a subscription lapses, the frontend shows warning alerts but delegate operations are not blocked at the smart contract level. The subscription is a service agreement — the PermissionsManager and protocol modules do not check subscription status. The on-chain infrastructure continues to function regardless of payment status.

results matching ""

    No results matching ""