Liquidation
Understanding the Liquidation Process in the Cross-Chain Lending Protocol
Overview
Understanding these functions is essential for developers interacting with Pike protocol.
Hub Contract on Base
Spoke Contract on Base
Contract deploys
Base contract addresses for interaction are listed at Protocol Contracts. Also, you can find extended description with respective ABI files in JSON format at Contract Overview.
Liquidation flow description
When a borrower defaults or fails to meet their loan obligations, a liquidation bot can initiate the liquidation process via the relevant Spoke contract. This contract constructs and encodes a message payload, which is then sent to the Hub contract through the Gateway contract by means of the Wormhole relayer on that chain.
Upon receiving the liquidation request, the Hub contract validates it, carries out necessary checks, and calculates the reward for the liquidator. It also updates the global state to reflect the changes brought about by the liquidation.
The Hub contract then creates a confirmation message, encodes it, and sends it back to the Spoke contract. Upon receipt, the Spoke contract performs additional checks and transfers the liquidation reward to the wallet address that initiated the liquidation process.
Last updated