![Cover Image for What Happens When Large SOL Positions Are Liquidated?](/_next/image?url=%2Fblog%2Fliquidation-large-sol-positions-risk%2Fcover.png&w=3840&q=75)
What Happens When Large SOL Positions Are Liquidated?
Solana, known for its high-speed transactions and low fees, has quickly become a significant player in the decentralized finance (DeFi) ecosystem. The SOL token is central to Solana’s operations, facilitating transactions and smart contracts. However, the concentration of SOL in large holdings, often referred to as "whales," presents substantial risks, especially in scenarios of forced liquidations. This article delves into these risks, analyzing how large SOL position liquidations could impact the DeFi ecosystem on Solana.
Understanding SOL Holdings and Whales
Tracking the largest SOL holdings is critical for assessing the risk of liquidations. Using the Bitquery Solana API, we can identify and monitor these significant positions.
Tracking the Largest SOL Holdings
To identify and track large SOL positions, we track the top 5 balance updates for SOL, sorted by the amount of the largest users excluding protocols.
Whale Information and Analysis
Whales are entities holding a significant amount of Wrapped SOL. Their activities can greatly influence market dynamics and are usually high-frequency participants in Defi and Derivatives. Understanding the difference between individual traders and protocol-owned wallets is essential, as the latter are less likely to liquidate their holdings rapidly.
The query will subscribe you to real-time updates for balance changes on the Solana blockchain for the address entered, The PreBalance and PostBalance functions are used here to get the balance. You can find the query here
Largest Wallets(Accounts not Owners) List which are likely not protocol owned, of wrapped Sol.
This query identifies accounts with Wrapped SOL balances exceeding 10,000 SOL, helping us pinpoint potential whales.
Risks of Large SOL Position Liquidations
-
Liquidations occur when assets are sold to cover borrowed funds, often triggered by market volatility or margin calls. In DeFi, where borrowing and lending protocols are prevalent, large-scale liquidations can cause cascading market effects. For example, if a significant SOL holder is forced to liquidate, it can flood the market with SOL, driving down its price and triggering further liquidations.
-
Liquidations happen when collateral value drops below a threshold compared to the borrowed amount. For instance, if SOL used as collateral drops significantly in price, the collateral-to-debt ratio may fall below the maintenance margin, prompting automatic SOL sales to cover the debt and protect lenders.
Potential Scenarios of Liquidation
-
In DeFi, liquidations can result from rapid price declines or increased borrowing rates. Market volatility plays a crucial role, as sharp SOL price drops can quickly erode collateral value. For instance, in early July, a 10% SOL price drop in hours led to widespread liquidations.
-
Borrowing rate increases can also trigger liquidations. DeFi protocols often adjust rates based on supply and demand. If rates spike, borrowers may struggle to service their debt, leading to liquidations. For example, Solend might raise interest rates during high borrowing demand for SOL, increasing liquidation risks.
-
Technical factors like smart contract bugs or oracle failures can also cause liquidations. Incorrect price data from oracles can lead to unwarranted liquidations, exacerbating market instability.
Impact on Solana's DeFi Ecosystem
-
Liquidations can drain liquidity from DeFi protocols, leading to higher slippage and less favorable trading conditions. When liquidations occur en masse, liquidity pools can be quickly depleted, causing significant slippage. For example, major SOL liquidations on Serum can cause high slippage due to sudden order book imbalances.
-
This can trigger a ripple effect, impacting other protocols and broader market stability. For instance, Solend's massive liquidations could affect other protocols like Mango Markets or Oxygen, leading to a chain reaction of volatility and potential market crashes.
-
Liquidations can also undermine user confidence in DeFi protocols. If users fear their collateral is at high risk of liquidation, they may withdraw assets, reducing overall liquidity. For example, if many SOL holders withdraw from DeFi protocols out of fear, it could lead to a liquidity crunch, making it harder for borrowers to get funds and for lenders to earn interest.
Case Study: Zeta Markets
Zeta Markets is a prominent DeFi platform on Solana, offering derivatives trading. Understanding its role and the impact of liquidations within Zeta Markets provides a practical perspective on the broader risks. The landscape for DeFi derivatives has continued to expand and evolve significantly since the launch of Zeta’s v1 in 2021. In the first four months of 2024 alone, the total monthly volume averaged close to $250 billion. During the same period, Solana saw a surge in DeFi activity that brought its global DEX volume on equal footing with Ethereum.
Overview of Zeta Markets
Zeta successfully managed over $11 billion in trading volume and has supported over 100,000 active traders. Despite its good block times of 400ms and much lower gas fees compared to some of its competitors, a derivatives exchange built completely on the Solana L1 still faces several challenges such as latency, congestion and high barriers to liquidity provision. At the time of writing this, Zeta market perps have an open interest of around $8 Million. Open Interest represents the sum of all open positions (derivative contracts), long or short.
Historical data on Zeta Markets shows how liquidations can affect the platform. By analysing this data, we can identify potential risks and develop mitigation strategies. Let’s take a look at these using bitquery.
Track Order placed on Zeta in Realtime
To retrieve the latest orders placed on Zeta DEX, we will utilize the Solana instructions API/Websocket.
We will specifically look for the latest instructions from Zeta's program, identified by the program ID ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD, using this query. And then we can see in the response that the method with the largest count is an empty string which should be the method to place orders. We will filter for this method to get the orders placed on Zeta in realtime.
To extract the PnL (Profit and Loss) and other related values such as unpaid funding, margin requirement, buffer, balance, adjustment, and max loss we can look at the log messages using this query. We get the values in lamports which can be converted to SOL to get meaningful interpretations. (1 SOL = 1,000,000,000 Lamports)
Example:
Transaction Signature: 3uiP1Ft2WgCp3kqhoVXTBaR2P29cfgrVZso5TsSVVAeXvV2dDkcquP1nufg7fnSgqTjXgeAe68B6JKAJHagSHe5w
Instruction: PlaceMultiOrders
-
PnL: 3689997326 lamports = 3.689997326 SOL
-
Unpaid Funding: 33145 lamports = 0.000033145 SOL
-
Margin Requirement: 30536490255 lamports = 30.536490255 SOL
-
Buffer: 433314430010 lamports = 433.314430010 SOL
-
Balance: 460284993707 lamports = 460.284993707 SOL
-
Adjustment: 0 lamports = 0 SOL
-
Max Loss: 124037623 lamports = 0.124037623 SOL
-
Instruction: PlaceMultiOrders
-
PnL: 3689997326 lamports = 3.689997326 SOL
-
Unpaid Funding: 33145 lamports = 0.000033145 SOL
-
Margin Requirement: 30535664740 lamports = 30.535664740 SOL
-
Buffer: 433313896728 lamports = 433.313896728 SOL
-
Balance: 460284993707 lamports = 460.284993707 SOL
-
Adjustment: 0 lamports = 0 SOL
-
Max Loss: 125396420 lamports = 0.125396420 SOL
Track Liquidations happening on Zeta in Realtime
To track the latest Liquidations on Zeta DEX, we will utilize the Solana instructions API/Websocket.
We will specifically look for the latest instructions from Zeta's program, identified by the program ID ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD, using this query. And then we can see in the response liquidateV2 method which is called to initialize a liquidation. We will filter for this method to get the liquidations on Zeta in realtime.
You can run this query using this link. We look for particular log messages which indicate function calls to the contract. For eg. “Program log: Instruction: LiquidateV2"
Using the above query for the past 30, we can see that the largest account liquidated was GubTBrbgk9JwkwX1FkXvsrF1UC2AP7iTgg8SGtgH14QE. The account had a balance of 16 SOL after the liquidation event. (Pause the query to not run out of points)
Bitquery Address Explorer
The output of your Bitquery subscription query also provides a summary of the number of times specific methods have been called within Zeta's program on the Solana network which can be used to find the total number of liquidations for any given period.
Track Settling of Funds on Zeta in Realtime
To retrieve the latest settling of funds transactions on Zeta DEX, we will utilize the Solana instructions API/Websocket.
We will specifically look for the latest instructions from Zeta's program, identified by the program ID ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD, using this query. And then we can see in the response settleDEXFunds method which is called to initialize a settlement. We will filter for this method to track the settlements on Zeta in realtime.
You can run this query using this link.
Using the above query we can see that the total number of liquidations which occurred surpasses 10,000.
Mitigating Risks of Large Position Liquidations
Mitigation strategies are crucial to prevent forced liquidations and their adverse effects on both individual portfolios and the broader DeFi ecosystem.
Individual traders can set stop-loss orders to limit losses by automatically selling assets when they reach a certain price. Options — a trading derivative that allows traders to buy a fixed-price ‘insurance’ against price crashes can be an effective way to reduce portfolio risk if used properly.
Maintaining higher collateral levels than required can also reduce liquidation risks. On platforms like Solend, a 200% collateral ratio instead of the minimum 150% offers a buffer against market volatility. Regular market monitoring allows traders to adjust positions based on trends. Diversifying investments across various assets, including stablecoins, can further mitigate risk.
Protocols can implement safeguards to protect against large-scale liquidations. Automated mechanisms can initiate partial liquidations or margin calls to avoid full liquidation. Enhanced collateral management systems dynamically adjust requirements based on real-time market data. Reliable price oracles ensure accurate data, preventing liquidations due to incorrect prices. Stress tests and simulations help identify vulnerabilities and prepare protocols for extreme conditions.
User education and timely alerts are also essential. Educating users about risks and providing notifications when collateral ratios near critical levels can prompt them to add more collateral or reduce debt, preventing liquidations. By adopting these strategies, traders and protocols can effectively manage risks, enhancing DeFi ecosystem stability and confidence.
Conclusion
In summary, monitoring and managing large SOL positions is essential for maintaining the stability of Solana’s DeFi ecosystem. By leveraging tools like the Bitquery Solana API and implementing robust risk management strategies, both traders and protocols can mitigate the risks associated with large SOL position liquidations.
Written by Anish M
Subscribe to our newsletter
Subscribe and never miss any updates related to our APIs, new developments & latest news etc. Our newsletter is sent once a week on Monday.