Back to Contract Explorer
SmartLoanLiquidationFacet
liquidationHandles loan liquidation when health ratio drops below 1.0. Liquidators repay debt and receive collateral at a 3.5% bonus. Both whitelisted and public liquidation paths are available.
Functions (2)
Usage Example
typescript
import { WrapperBuilder } from "@redstone-finance/evm-connector";
// Tokens to repay and amounts
const debtTokens = [
keccak256(encodePacked(["string"], ["USDC"])),
];
const repayAmounts = [1000n * 10n ** 6n]; // Repay 1000 USDC
// Wrap with RedStone price data
const wrappedContract = WrapperBuilder
.wrap(contract)
.usingDataService({
dataServiceId: "redstone-arbitrum-prod",
uniqueSignersCount: 3,
});
await wrappedContract.liquidateLoan(debtTokens, repayAmounts);
// You receive collateral + 3.5% bonus