Build an Adaptive Friction Engine with Didit & Redis Streams
Discover how to build a real-time adaptive friction engine using Didit's AI-native identity verification and Redis Streams. This powerful combination allows businesses to dynamically adjust identity verification steps.

Dynamic Friction AdjustmentImplement real-time, context-aware identity verification workflows that adapt based on user behavior, device intelligence, and risk signals, ensuring optimal balance between security and user experience.
Leveraging Redis Streams for Real-Time DataUtilize Redis Streams to capture and process identity verification events and user data instantly, enabling immediate risk assessment and workflow adjustments at scale.
Didit's Modular Identity PrimitivesIntegrate Didit's comprehensive suite of AI-native identity verification tools, such as ID Verification, Passive Liveness, and AML Screening, as composable building blocks within your adaptive friction engine.
Enhanced Security and ComplianceDidit's advanced verification capabilities, including NFC Verification for high-security scenarios and Age Estimation for age-gated services, ensure robust fraud prevention and regulatory adherence without sacrificing user flow.
In today's digital landscape, businesses face a constant challenge: how to onboard and verify users efficiently without compromising security. Too much friction leads to abandonment; too little invites fraud. The solution lies in an adaptive friction engine – a system that intelligently adjusts the level of verification based on real-time risk assessment. By combining Didit's AI-native identity platform with the real-time data processing power of Redis Streams, you can create a dynamic, secure, and user-friendly verification experience.
The Need for Adaptive Friction
Traditional identity verification often employs a one-size-fits-all approach. Every user goes through the same steps, regardless of their risk profile. This can be frustrating for legitimate users, leading to high drop-off rates, and still insufficient for sophisticated fraudsters. An adaptive friction engine, however, analyzes various signals in real-time to determine the appropriate level of verification. Is the user logging in from a new device? Is their IP address flagged as suspicious? Is the transaction value unusually high? Each of these factors can trigger a different verification flow.
Imagine a user attempting to sign up for a service. If their device intelligence, IP analysis, and email verification all suggest a low-risk profile, they might only need a quick Passive Liveness check. Conversely, if there are red flags, the system could escalate to a full ID Verification with NFC Verification and AML Screening. This dynamic approach not only improves conversion rates for legitimate users but also significantly enhances fraud detection and prevention.
Redis Streams: The Backbone of Real-Time Data Flow
To power an adaptive friction engine, you need a robust, real-time data streaming platform. This is where Redis Streams excel. Redis Streams provide a persistent, append-only data structure that acts as a log for events. Each entry in a stream is a message with a unique ID, allowing multiple consumers to process the same stream independently. This makes them ideal for capturing and disseminating verification events, user actions, and risk signals across your system.
Here's how Redis Streams can be integrated:
- Event Ingestion: Every action a user takes – from initiating a signup to submitting an ID document – can be published as an event to a Redis Stream.
- Real-Time Processing: Consumer groups can read these events to trigger immediate risk assessments. For example, a service could read a 'new user signup' event, query an IP analysis service, and publish the risk score back to another stream.
- Workflow Orchestration: Based on aggregated risk scores from various streams, your adaptive friction engine can decide the next verification step and publish it to a 'verification action' stream.
- Audit Trail: Redis Streams inherently provide an ordered, persistent log of all events, which is crucial for compliance and debugging.
Didit's Role in Dynamic Identity Verification
Didit provides the essential identity verification primitives that your adaptive friction engine will orchestrate. Our modular, AI-native platform offers a comprehensive suite of tools designed for global scale and precision:
- ID Verification (OCR, MRZ, barcodes): For robust document verification, extracting data from various ID types with high accuracy.
- Passive & Active Liveness: To prevent spoofing and deepfake attacks, ensuring the person interacting is real and present.
- 1:1 Face Match & Face Search: For biometric comparison, confirming the user matches their identity document.
- AML Screening & Monitoring: To check against watchlists, sanctions lists, and PEP lists for compliance.
- Proof of Address: To verify residential addresses, often required for financial services.
- Age Estimation: A privacy-preserving solution for age verification, crucial for age-restricted content or services like gambling and alcohol sales.
- Phone & Email Verification: Basic yet effective checks for account security.
- NFC Verification (ePassport/eID): For the highest level of security, reading data directly from embedded chips in ePassports and eIDs.
By integrating these Didit products, your adaptive friction engine gains the power to apply precise, context-aware verification. For instance, if a user attempts to access age-restricted content, an initial low-friction Age Estimation check might be sufficient. However, if the estimation is borderline or other risk factors are present, the system could then dynamically request a full ID Verification with a liveness check.
Building the Engine: An Architectural Overview
An adaptive friction engine typically involves several components:
- Event Producer: Your application front-end or backend services generate events (e.g., 'login_attempt', 'signup_start', 'document_upload') and publish them to a Redis Stream.
- Risk Assessment Service: This service consumes events from the stream, enriches them with data from various sources (IP analysis, device intelligence, behavioral analytics), and calculates a real-time risk score. It might also call Didit's Phone & Email Verification or check for existing verified identities. The calculated risk score is then published to another Redis Stream.
- Friction Orchestration Engine: This is the core of the adaptive system. It subscribes to the risk score stream. Based on predefined rules and the current risk score, it determines the next necessary verification step. For example, if the risk is low, it might approve immediately. If medium, it might trigger Didit's Passive Liveness. If high, it would initiate Didit's full ID Verification and potentially AML Screening. The chosen action is published to a 'verification_action' stream.
- Verification Service: This service consumes 'verification_action' events, makes API calls to Didit for the specified verification type (e.g., ID Verification, Age Estimation, NFC Verification), and then publishes the result back to another Redis Stream.
- Application Backend: Consumes the final verification result to complete the user journey (e.g., grant access, onboard user).
This architecture ensures that verification decisions are made in milliseconds, allowing for a seamless user experience while providing robust security.
How Didit Helps
Didit is uniquely positioned to empower businesses in building sophisticated adaptive friction engines. Our AI-native platform offers a modular architecture, allowing you to pick and choose the exact identity primitives you need. This flexibility means you can design highly granular verification workflows that dynamically respond to risk. Didit provides Free Core KYC, enabling you to get started without upfront investment. Our developer-first approach, with clean APIs and an instant sandbox, makes integration with systems like Redis Streams straightforward. By automating identity verification with AI, Didit reduces the need for manual review, speeding up onboarding and reducing operational costs. Whether you need precise Age Estimation for compliance, robust ID Verification for financial services, or high-security NFC Verification, Didit's comprehensive suite of products ensures you can orchestrate trust effectively and at scale, with no setup fees.
Ready to Get Started?
Ready to see Didit in action? Get a free demo today.
Start verifying identities for free with Didit's free tier.