AI-Driven Collateral Allocation Optimization in Fintech
mercado_libre · Finance · 2025 · source Agentic: no · promotional bias: low · source-backed · extracted with prompt 0.5.2 (schema v2)
Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.
Problem
Domain: Collateral allocation optimization
Mercado Pago needed to allocate millions of loans across billions in credit lines under complex contractual, market, and regulatory constraints.
Constraints:
- NP-complete scale
- daily few-hour runtime
- auditability
- contractual constraints
Architecture
Enigma is intentionally not an LLM agent. Mercado Pago’s production system uses mathematical optimization: loan data and configuration settings from Google Cloud Platform flow into an Enigma optimization model that combines linear programming, Google OR-Tools, and an in-house grouping heuristic. The model outputs refined loan selections, reports, and visualizations for the Collateral Management team, while AI agents are only described as future exploration for analytics, strategic-constraint proposals, and contract-to-constraint translation.
Diagram confidence: reconstructed (reconstructed from prose).
flowchart LR loan-data-and-configuration-inputs["loan data and configuration inputs"] enigma-optimization-model["Enigma optimization model"] google-or-tools["Google OR-Tools"] grouping-heuristic["grouping heuristic"] reports-and-visualization["reports and visualization"] collateral-management-team["Collateral Management team"] loan-data-and-configuration-inputs --> enigma-optimization-model enigma-optimization-model --> google-or-tools enigma-optimization-model --> grouping-heuristic enigma-optimization-model --> reports-and-visualization reports-and-visualization --> collateral-management-team
Components
| Component | Role | Interacts with |
|---|---|---|
loan data and configuration inputs |
Google Cloud Platform-sourced loan portfolio data and credit-line configuration settings. | Enigma optimization model |
Enigma optimization model |
Linear-programming model that selects loans for credit lines under contractual and strategic constraints. | loan data and configuration inputs, Google OR-Tools, grouping heuristic, reports and visualization |
Google OR-Tools |
Optimization library used to search possible allocation solutions through commercial/open-source solvers. | Enigma optimization model |
grouping heuristic |
In-house clustering technique that combines similar loans to reduce execution time while preserving accuracy. | Enigma optimization model |
reports and visualization |
Auditable output layer showing allocations, metrics, and decision support to the Collateral Management team. | Enigma optimization model, Collateral Management team |
Collateral Management team |
Business users who configure constraints, evaluate reports, and manage collateral allocation decisions. | reports and visualization |
Data flow
Loan data and credit-line configuration are gathered from Google Cloud Platform. Enigma feeds those inputs to an optimization model using OR-Tools and a grouping heuristic, evaluates loans against risk, amount, contractual, and strategic constraints, then outputs selected loans plus reporting/visualization for the Collateral Management team.
4 supporting quotes
Why this architecture
The problem is a constrained optimization problem over millions of loans and billions of dollars of credit lines, so linear programming and OR-Tools fit better than an agentic LLM. The grouping heuristic is the critical scalability adaptation: raw exact optimization over individual loans became computationally explosive, while clustering similar loans preserved execution time and usability.
4 supporting quotes
Models used: Google OR-Tools · linear programming · traditional optimization, not LLM
Scale
- Credit lines total billions of dollars and require backing from millions of loans.“These credit lines total billions of dollars and require backing from millions of loans within Mercado Pago’s portfolio.”article, stated
- The raw selection problem is NP-complete and grows exponentially with portfolio size.“From a computational complexity perspective, this problem is NP-Complete (short for nondeterministic polynomial time complete), meaning that, while a solution can be verified quickly, there is no known way to find a solution quickly.”article, stated
- The system is designed for scalability, simplicity, flexibility, transparency, and robustness.“Scalability: Guaranteed by an in-house grouping heuristic. * Simplicity: Minimizing input parameters for the end-user. * Flexibility: Allowing the end-user to easily add new constraints and credit lines.”article, stated
Alternatives considered (roads not taken)
Linear optimization over every individual loan without grouping
Rejected because: The portfolio size caused exponential execution-time growth, so the team clustered similar loans.
Current production AI-agent allocation manager
Rejected because: Agents are framed as future exploration, not the current production Enigma system.
Patterns
structured-output-contract (optimization)
Contractual and strategic requirements are translated into explicit linear constraints and reports.
cost-aware-routing (operations)
The optimizer chooses allocations to maximize amount and minimize funding cost.
Tradeoffs
Optimization exactness versus runtime.
Chose in-house grouping heuristic over evaluating every individual loan directly.
Rationale: Grouping reduces problem size enough for daily operation while preserving overall allocation quality.
Gotchas (what bit them)
Raw linear optimization over millions of loans did not scale.
Root cause: The NP-complete selection problem grew exponentially with portfolio size.
Resolution: Group similar loans into clusters before optimization to preserve runtime while maintaining performance.
Evaluation
The article describes scalability, robustness, transparency, and operational fit rather than LLM metrics.
Metrics: millions of loans · few-hour daily window · auditable reports
Outcomes
- Enigma automates and optimizes collateral allocation with transparent reporting.
Primarily classical optimization, not an LLM/agent implementation; marked non-agentic.