InterestRateDisplay
component shows the current supply and borrow interest rates along with the utilization rate for the Compound III protocol.
Usage
Props
Prop | Type | Description |
---|---|---|
client | CometClient | null | The CometClient instance to use for fetching data |
className | string | Optional CSS class name to apply to the component |
onRefresh | () => void | Optional callback function to call when the refresh button is clicked |
Example
Displayed Information
The component displays the following information:- Supply APY (Annual Percentage Yield)
- Borrow APY (Annual Percentage Yield)
- Utilization rate
Loading and Error States
The component handles loading and error states automatically:- While data is being fetched, a loading indicator is displayed
- If an error occurs during data fetching, an error message is displayed
Related Components
- MarketStats - Displays more detailed market statistics