SmartVisionFactory

Technical Interview Questions

Question 1

Python Loop Analysis

result = 0
for x in [3,3,5,7]:
    if x > 3:
        result = result - x
    else:
        result = result + x

What is the result?

1 -6
-18 -11
Question 2

Third-Party Embeddable Plugin Design

You are tasked with designing a third-party embeddable plugin that can be injected into any website via a single HTML <script> tag.

A customer should be able to copy and paste this script tag into their website and provide one configuration parameter: the contract address of a token listed on the pump.fun platform.

Once embedded, the plugin must display real-time notifications on the website whenever a buy event occurs for the specified token.

Requirements

Backend

Implement a backend service that:

  • Establishes a gRPC connection to listen for blockchain events related to pump.fun tokens
  • Filters and processes buy events for a specific token contract address
  • Exposes a WebSocket endpoint that streams these buy events to connected clients in real time

Frontend

Implement a frontend plugin that:

  • Is delivered as a single JavaScript file
  • Is embeddable via an HTML <script> tag
  • Reads the token contract address from a configuration attribute
  • Connects to the backend WebSocket endpoint
  • Displays incoming buy events as non-intrusive notifications on the host website

Questions:

  1. Explain how you would approach researching this task before implementation
  2. Explain which technologies you would choose for:
    • The backend (language, frameworks, infrastructure)
    • The frontend (approach for building an embeddable plugin)
  3. Explain which problems could occur in the long run and which measurements you would take to solve those.