BorrowBalance
Compound V2 Getter Plugin - BorrowBalance
Description
A user who borrows assets from the protocol is subject to accumulated interest based on the current borrow rate. Interest is accumulated every block and integrations may use this function to obtain the current value of a user’s borrow balance with interest.
Method
borrowBalanceCurrent(address)
Input Parameters
Name | Plugin Type | Description |
---|---|---|
to |
| cToken address |
Method Parameters
Name | Plugin Type | Description |
---|---|---|
account |
| The account which borrowed the assets. |
Returned Values
Name | Plugin Type | Description |
---|---|---|
borrowedAmount |
| The user’s current borrow balance (with interest) in units of the underlying asset. |
Example
Example with initParams
Example without initParams
Learn more
Learn more about Compound V2 borrow balance method here
Last updated