Reading DeFi Liquidation Events Correctly
Interpret liquidation events with borrower, liquidator, collateral and debt context, and separate protocol execution from estimated eligibility.

Overview
When translating these concepts into an integration, keep the scope described by the wallet history api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.
A liquidation can involve debt repayment, collateral seizure and several asset movements. An event label is the start of interpretation, not a complete economic report.
Identify the parties and quantities
Record the protocol version, reserve assets, borrower and executing account. Distinguish repaid debt from collateral transferred and any fees. Units differ across assets, so a raw quantity comparison is meaningless without scaling and valuation. The liquidator’s transaction sender may also differ from the final recipient under a composed execution.
Worked example: two assets change
A liquidation repays fifty debt units and transfers collateral denominated in another token. Recording both quantities as fifty because they share one event corrupts the position. Decode each field using the relevant asset identity and retain the event so the position update can be reproduced.
Reconcile position effects
Compare pre- and post-operation state where needed, including accrued debt and any remaining collateral. Test partial liquidation, multiple events in one transaction and failed attempts. A health-factor alert is not an executed liquidation. Keep the estimated risk state and the accepted execution record separately linked.
A practical acceptance test
Create a partial liquidation with debt and collateral in assets using different decimal scales. Verify each quantity independently and retain remaining position state. A prior low-health-factor observation should link as context, not as proof of execution. Repeating the event delivery must not repay the same debt twice in the derived position model.
Questions about the topic
Frequently asked questions
Does liquidation always close the entire position?
No. Protocol rules can permit partial liquidation.
Can debt and collateral raw amounts be compared directly?
No. They belong to different units and valuation contexts.
Standards & technical documentation