Funding shortages are a persistent issue, particularly for small and medium-sized enterprises (SMEs), and the problem tends to worsen cyclically. The market for factoring and invoice discounting aims to address delays in payment for commercial invoices. These involves sellers present unpaid invoices to financial organizations, typically banks, who provide an advance payment. The implementations of the factoring services without intermediaries in blockchain of the state of the art are all based on the publication on-chain of all the invoices, use know your customer (KYC) mechanisms, and over-collateralize the invoices. This article proposes a new, decentralized approach to lending services that completely eliminates intermediaries and does not require strong KYC, yet it is reasonably resilient. The approach uses liquidity pools and associated heuristics to create a model of risk compensation. In this model, a formula measures the contributed collateral to an invoice and the risk of a late invoice or non-payment, using the Kelly criterion to calculate the optimal premium for funding said invoice in the liquidity pool. The algorithm’s performance is tested in many scenarios involving several invoice amounts, collaterals, payment delays, and non-payment rates. The study also examines premium distribution policies and hack scenarios involving bogus, non-payable invoices. The outcome is a decentralized market that uses the Kelly criterion and is reasonably resilient to a wide range of invoicing scenarios, including 5% non-payment rates and 10% bogus invoices, yet provides a sound profit to liquidity providers. The algorithm’s resilience is enhanced by several premium distribution policies over partially collateralized invoices from 50 to 70%, resulting in optimal premium withdrawal policies every 30 days, making it the first protocol for loanable funds that does not require over-collateralization to be profitable and resilient.