RiskExec Encompass Middleware
A middleware solution that reduced compliance verification time by 97% for financial institutions
Project Impact
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
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);
}
}
Authentication & Security
OAuth 2.0 token validation with multi-layer security checks and encrypted data transmission.
Key Features
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 */);
}
API Endpoints
RESTful API endpoints with rate limiting and comprehensive error handling.
Key Features
Implementation
// API Endpoints
/api/transactions/{id}/status
/api/transactions/{id}/result
/api/webhook
/api/healthz
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.
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.
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.
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.
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.