RiskExec Encompass Middleware

A middleware solution that reduced compliance verification time by 97% for financial institutions

.NET CoreReactOAuth 2.0RESTful APIEncompass SDKSerilogCaching

Project Impact

Time Reduction
Decrease in compliance verification time
0
%
Before
15-30 minutes
After
25 seconds
Defect Reduction
Decrease in compliance defects
0
%
Before
8.7% of loans
After
1.2% of loans
Staff Hours Saved
Reduction in monthly staff hours
0
%
Before
420 hours/month
After
65 hours/month
Annual Savings
In reduced labor costs and faster processing
$
0
M

Problem & Solution

Manual Compliance Verification

Financial institutions faced significant challenges in ensuring regulatory compliance, particularly with HMDA and fair lending requirements.

Time-Consuming Process

Manual compliance verification was taking 15-30 minutes per loan, creating bottlenecks in the loan origination process.

Error-Prone

8.7% of loans had compliance-related defects due to manual verification processes.

Middleware Integration

A .NET Core RESTful API that handles authentication, data transformation, and transaction management between systems.

Real-time Validation

Seamless validation of geocoding, edit checks, and rate spread calculations directly within the Encompass workflow.

Automated Workflow

Reduced compliance verification time to 25 seconds per loan, with automated error detection and resolution.

Technical Implementation

Our technical implementation leverages modern technologies and best practices to ensure reliability, security, and performance:

Caching Strategy

Distributed caching system for optimal performance and resilience during connectivity issues.

Key Features

Improved response times during peak periods
Resilience during connectivity issues
Reduced load on external systems

Implementation

public class MiddlewareCache : IMiddlewareCache
{
    private readonly IDistributedCache _cache;
    private readonly ILogger<MiddlewareCache> _logger;
    
    public async Task<CacheRecord?> GetAsync(string transactionId)
    {
        var key = GetKey(transactionId);
        var data = await _cache.GetStringAsync(key);
        return data is null ? null : Deserialize<CacheRecord>(data);
    }
}
Encompass
Cache Layer
RiskExec
97%
Cache Hit Rate
0.3s
Avg Response Time

Authentication & Security

OAuth 2.0 token validation with multi-layer security checks and encrypted data transmission.

Key Features

Multi-layer token validation
Encrypted data transmission
Comprehensive audit logging

Implementation

private async Task<ValidationResult> ValidateAsync(
    string transactionId, 
    string originId, 
    string partnerAccessToken)
{
    // Validate cache record exists
    // Validate Encompass origin and token
    // Validate transaction exists
    return new ValidationResult(/* result details */);
}
OAuth 2.0
Encryption
Audit Logging

API Endpoints

RESTful API endpoints with rate limiting and comprehensive error handling.

Key Features

Rate limiting protection
Detailed error responses
Comprehensive logging

Implementation

// API Endpoints
/api/transactions/{id}/status
/api/transactions/{id}/result
/api/webhook
/api/healthz
GET
/transactions/{id}/status
POST
/transactions/{id}/result
POST
/webhook
Rate Limit100 req/min

Key Challenges

Key challenges we encountered and overcame during the development of the RiskExec middleware:

Data Mapping Complexity

Challenge

Encompass and RiskExec used different data models, requiring complex transformation logic to ensure accurate data exchange.

Solution

Implemented a flexible mapping service with custom mappers for different loan types, ensuring accurate data translation while maintaining extensibility.

Data Mapping Flow
Real-time transformation
Encompass Format
loanNumber:string
borrower:object
firstName:string
RiskExec Format
id:number
applicant:object
name:string

UI Integration Constraints

Challenge

Encompass Smart Client had strict limitations on embedded applications, requiring careful UI design and performance optimization.

Solution

Created a lightweight React application that matched Encompass's visual style while providing rich functionality through asynchronous API calls and efficient state management.

Encompass Integration
Smart Client Plugin
Encompass Smart Client
Loan
Services
RiskExec
Memory Usage
45 MB
Load Time
0.8s

Authentication Security

Challenge

Needed to maintain secure authentication between multiple systems while handling sensitive financial data.

Solution

Implemented OAuth 2.0 token validation with multi-layer security checks, encrypted data transmission, and comprehensive audit logging.

Security Layers
OAuth 2.0 Flow
Token Validation
Data Encryption
AES-256
Audit Logging
Active

Performance at Scale

Challenge

Month-end closing periods created high transaction volumes that could potentially overwhelm the system.

Solution

Designed a distributed caching system, implemented rate limiting, and created asynchronous processing capabilities to handle peak loads efficiently.

System Performance
Month-end Peak
Cache Hit Rate97%
Avg Response Time300ms
Transaction Volume5K/hour

Conclusion

Transformative Impact

97% reduction in processing time with improved accuracy and efficiency.

Seamless Integration

Eliminated manual processes and accelerated loan closings while maintaining compliance.

Business Value

Modern tech stack and robust security delivering substantial ROI.

Future-Ready

Modular architecture ready to scale and adapt to future needs.