Hooks
Collateral and Borrowing
Hooks for managing collateral and borrowing on Compound III
This section contains hooks for managing collateral and borrowing on Compound III.
Summary of Collateral and Borrowing Hooks
- useSupply: Allows users to supply base tokens to the protocol
- useWithdraw: Allows users to withdraw base tokens from the protocol
- useCollateralBalance: Retrieves the collateral balance of an account for a specific asset
- useIsBorrowCollateralized: Checks if an account has enough collateral for borrowing
- useBaseBorrowMin: Retrieves the minimum borrow amount for the base asset
useSupply
The useSupply
hook allows users to supply base tokens to the Compound III protocol.
Usage
Return Value
useWithdraw
The useWithdraw
hook allows users to withdraw base tokens from the Compound III protocol.
Usage
Return Value
useCollateralBalance
The useCollateralBalance
hook retrieves the collateral balance of an account for a specific asset.
Usage
Return Value
useIsBorrowCollateralized
The useIsBorrowCollateralized
hook checks if an account has enough collateral for borrowing.
Usage
Return Value
useBaseBorrowMin
The useBaseBorrowMin
hook retrieves the minimum borrow amount for the base asset.