Liquidator Contract
Last updated
Last updated
The LiquidatorContract.sol
smart contract facilitates liquidations by interacting with the Bonzo lending pool and performing token swaps via SaucerSwap.
You can find the contract code .
Key Functions:
liquidate()
: Initiates the flash loan and triggers the liquidation.
executeOperation()
: Called after receiving the flash-loaned amount; performs the liquidation and token swap.
_associateToken()
: Associates Hedera tokens with the contract (required on Hedera).
Compile the contract using Hardhat:
Deploy the contract to the Hedera testnet:
Ensure your hardhat.config.ts
is set up for the Hedera testnet.
In deploy.ts
, replace LendingPoolAddressesProvider_address
and SaucerswapRouter_address
with the actual contract addresses.