# get current debt

## Overview

<figure><img src="https://1829638638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0k7YXwFGMFZcsyqkM4q1%2Fuploads%2FqTGBPdLfAjlG766dn75y%2Fimage.png?alt=media&#x26;token=8e5feaab-a128-48f8-bb29-5f7323ea032c" alt=""><figcaption></figcaption></figure>

* [x] <mark style="color:orange;">cache + updateState</mark>
* [ ] get current debt&#x20;
* [ ] validateRepay
* [ ] get paybackAmount
* [ ] burn debt tokens
* [ ] <mark style="color:orange;">updateInterestRates</mark>
* [ ] setBorrowing
* [ ] updateIsolatedDebtIfIsolated
* [ ] handle repayment

## get current debt

<figure><img src="https://1829638638-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0k7YXwFGMFZcsyqkM4q1%2Fuploads%2FEgfp90uhK6uCrDAkv8ra%2Fimage.png?alt=media&#x26;token=256485e4-847b-4fd0-ae79-7b2e50d60d87" alt=""><figcaption></figcaption></figure>

* queries both the stable debt and variable debt token balance for the target user
* For a specific asset user can only borrow in either stable or variable mode; cannot have concurrent debt in both modes simultaneously
* Therefore, one of the values returned will be `0`

{% hint style="info" %}
`balanceOf` returns the debt balance accounting for interest up till the current block.timestamp
{% endhint %}
