RebasingDebtToken
Implementation of the interest bearing token for the ParaSpace protocol
constructor
balanceOf
Calculates the balance of the user: principal balance + debt interest accrued by the principal
Parameters
Name | Type | Description |
---|---|---|
user | address | The user whose balance is calculated |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The balance of the user |
scaledBalanceOf
Returns the scaled balance of the user. The scaled balance is the sum of all the updated stored balance divided by the reserve's liquidity index at the moment of the update
Parameters
Name | Type | Description |
---|---|---|
user | address | The user whose balance is calculated |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The scaled balance of the user |
getScaledUserBalanceAndSupply
Returns the scaled balance of the user and the scaled total supply.
Parameters
Name | Type | Description |
---|---|---|
user | address | The address of the user |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The scaled balance of the user |
[1] | uint256 | The scaled balance and the scaled total supply |
totalSupply
calculates the total supply of the specific aToken since the balance of every single user increases over time, the total supply does that too.
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | the current total supply |
scaledTotalSupply
Returns the scaled total supply of the variable debt token. Represents sum(debt/index)
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | the scaled total supply |
_scaledBalanceOf
_scaledTotalSupply
lastRebasingIndex
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | Current rebasing index in RAY |