@@ -18,13 +18,14 @@ import { ICErc20 } from "./compound/CTokenInterfaces.sol";
18
18
19
19
import "./PoolLens.sol " ;
20
20
import "@pythnetwork/express-relay-sdk-solidity/IExpressRelay.sol " ;
21
+ import "@pythnetwork/express-relay-sdk-solidity/IExpressRelayFeeReceiver.sol " ;
21
22
22
23
/**
23
24
* @title IonicUniV3Liquidator
24
25
* @author Veliko Minkov <[email protected] > (https://github.com/vminkov)
25
26
* @notice IonicUniV3Liquidator liquidates unhealthy borrowers with flashloan support.
26
27
*/
27
- contract IonicUniV3Liquidator is OwnableUpgradeable , ILiquidator , IUniswapV3FlashCallback {
28
+ contract IonicUniV3Liquidator is OwnableUpgradeable , ILiquidator , IUniswapV3FlashCallback , IExpressRelayFeeReceiver {
28
29
using AddressUpgradeable for address payable ;
29
30
using SafeERC20Upgradeable for IERC20Upgradeable ;
30
31
@@ -178,6 +179,21 @@ contract IonicUniV3Liquidator is OwnableUpgradeable, ILiquidator, IUniswapV3Flas
178
179
require (payable (msg .sender ).isContract (), "Sender is not a contract. " );
179
180
}
180
181
182
+ /**
183
+ * @notice receiveAuctionProceedings function - receives native token from the express relay
184
+ * You can use permission key to distribute the received funds to users who got liquidated, LPs, etc...
185
+ */
186
+ function receiveAuctionProceedings (bytes calldata permissionKey ) external payable {}
187
+
188
+ function withdrawAll () external onlyOwner {
189
+ uint256 balance = address (this ).balance;
190
+ require (balance > 0 , "No Ether left to withdraw " );
191
+
192
+ // Transfer all Ether to the owner
193
+ (bool sent , ) = msg .sender .call { value: balance }("" );
194
+ require (sent, "Failed to send Ether " );
195
+ }
196
+
181
197
/**
182
198
* @dev Callback function for Uniswap flashloans.
183
199
*/
0 commit comments