Urgent.News

What's breaking now, across thousands of outlets.

Tech

Reading a lending protocol's whole loan book straight from Cardano's ledger

We wanted one number: how far does ADA have to fall before a real share of Indigo's loans gets liquidated? Indigo is a Cardano protocol where you lock ADA and mint synthetic assets (iUSD, iBTC, iETH…) against it. Each position is a CDP, a collateralized debt position. The protocol's own API was the obvious place to start. When we started (September 9) it listed only the v3 positions: 50 CDPs…

Indigo is a Cardano protocol where users lock ADA and receive synthetic assets like iUSD, iBTC, and iETH. A CDP, a collateralized debt position, is represented as a UTxO on the Indigo v2 CDP validator address. The protocol's API lists only 50 CDPs, but upon closer inspection, there are approximately 3,000 times more positions stored on the blockchain.

By querying the local cardano-db-sync Postgres database, we can access the entire loan book. The CDPs carry their state as an inline datum, which is already decoded to JSON in the datum table. Each CDP's data includes the owner's public key hash, the type of synthetic asset, the collateral in ADA, the debt amount, and the updated timestamp.

After decoding, we can verify the complete book by comparing the total minted debt against the total burned debt for each synthetic asset. If the decoded debt per asset matches the expected figure, then we can consider the book complete. We then filter out any positions that are liquidated (with only the minimum ADA and a low ratio), and calculate the total debt in USD for each synthetic asset.

Finally, we present the results, showing that as of October 6, 2026, 287 out of 311 decoded positions are included in the stress test, with a total debt of $1.89 million.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Fix It in the Model or Fix It in the Source?

Fix It in the Model or Fix It in the Source? The first compile error in a converted CA 2E program forces a decision most teams never make on purpose: which copy is the master now Getting a CA 2E-generated program to compile is mostly mechanical. Article 7 covers the four causes that account for almost all of the errors.

More from Tuesday 6 October →