MarketStats component displays key statistics about a Compound III market, including total supply, total borrow, utilization rate, and reserve factor.
Usage
Props
Example
Displayed Information
The component displays the following market statistics:- Total Supply: The total value of all assets supplied to the protocol
- Total Borrow: The total value of all assets borrowed from the protocol
- Utilization Rate: The percentage of supplied assets that are currently borrowed
- Reserve Factor: The percentage of interest that goes to the protocol reserves
- Supply APY: The annual percentage yield for suppliers
- Borrow APY: The annual percentage yield for borrowers
- Market Address: The address of the Compound III market contract
- Base Asset: The symbol and address of the base asset
Charts and Visualizations
The component includes visual elements to help users understand the market:- Utilization Chart: A visual representation of the utilization rate
- Supply/Borrow Distribution: A breakdown of the supply and borrow amounts
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
Customization
You can customize the appearance of the component using theclassName prop:
Related Components
- InterestRateDisplay - For displaying interest rates
- UserPositionSummary - For displaying a user’s position
- AssetInfoCard - For displaying information about a specific asset