Running a Liquidator for Port Finance
Port Finance is proud to bring money market lending and borrowing solutions to the Solana ecosystem! To ensure the integrity of the protocol, as well as the safety of our users’ funds, Port Finance measures the risk factor of each and every account. The risk factor is determined by the collateral to loan ratio. When the risk factor is exceeded, liquidators can make a liquidation call to repay the debt owed, and receive discounted collateral in return.
The liquidation bonus incentivizes more participants in securing the integrity of Port Finance, ensuring that loans are sufficiently collateralized! Currently, there is 12,000,000 USD locked in the protocol and ~3,000,000 USD that has been loaned out. There are ample opportunities for liquidators to help secure the protocol and earn profits. Liquidators can expect to earn between 2% — 10% for every bad debt they liquidate. Assume that liquidators are able to liquidate bad debt every week, you will be able to obtain at least 1.02 ^ 52 = 180% APY.
How can I participate in liquidations?
To participate in liquidation, one will need:
- A Solana account with some SOL deposited to cover transaction fees
- Some tokens that the protocol supports, including: USDC, USDT, SOL, SRM, MER and PAI
Once users have the deposits, they can use our open-source liquidator here.
They simply need to:
git clone email@example.com:port-finance/liquidator.git
Set up the .env file with their owned private key. Then run the following commands:
yarn installsource .envyarn liquidator
Port Finance Liquidations Explained
With each loan on Port Finance, users need to provide more collateral than what they have borrowed. There are two thresholds that users need to be aware of:
- Maximum borrow value: the maximum amount of loan that a user can take out is based on the collateral they put in
- Liquidation borrow value: the lowest borrow value (caused by collateral depreciation or loan appreciation) when liquidators are allowed to come in and liquidate users
Concretely, if a user borrows 1000 USD worth of loan, he/she needs to put in more than 1000 USD worth of collateral, exactly how much more the user needs to put in depends on the type of collateral. Generally, if the collateral is more volatile, users will need additional collateral. If the collateral is in stable coins, users will need less collateral
For instance, if a user wants to borrow 1000 USD worth of SOL with USDC. Using the current LTV ratio of USDC (85 %), users need to put in 1000 / 0.85 = 1176.5 USD worth of USDC. Say each SOL is worth 50 USD and the user borrows 20 SOL with his collateral. In the event whereby SOL increases in value and is now worth 55 USD, the original 20 SOL is worth 1100 USD which makes the original collateral of 1176.5 USD insufficient since the liquidation borrow value is 1176.5 * 0.90 (liquidation threshold of 90%) = 1059 USD < 1100 USD.
At this point, the liquidator can come in and liquidate this particular loan by repaying on behalf of the user, and in return get back the collateral with bonuses (2% for USDC as collateral). If the liquidator doesn’t come in and the price of SOL keeps increasing, the value of the collateral will not be enough to cover the loan which causes lenders not to be able to recover their original deposit of 20 SOL. Liquidation helps prevent the loss of the lender and is in itself a profitable endeavour due to the additional bonus.
Currently, the Port Finance team runs our own liquidator which monitors the state of all the loans that are currently open. If any loans surpass the overall liquidation threshold, the liquidator can liquidate these loans. However, running a liquidator is permissionless, everybody is welcome to run it and in turn, have a share in the profits.
About Port Finance
Port Finance is a decentralized Money Market protocol on Solana, aiming to provide a full suite of lending products including but not limited to: variable rate lending, fixed rate lending and interest rate swaps. Port Finance’s team brings engineering experience from tech companies like Google, Facebook, and Microsoft, and previous contributions to Solana and Serum. Learn more about us here.