Start typing to search this publication.
eth news
Open menu

Subscribe to eth news

Get new posts delivered straight to your inbox.

How Does SparkLend Work? Supply, Debt, and Liquidation

eth news
3 min read

SparkLend pools supplied assets and lends available liquidity against eligible collateral. The SparkLend money market records suppliers’ claims, borrowers’ interest-bearing debt, and the collateral backing each loan. Its smart contracts update those balances and a position’s health factor as interest accrues and asset prices change.

How SparkLend Pools Assets, Prices Collateral, and Tracks Debt

SparkLend uses an Aave V3-derived pooled design: suppliers deposit listed assets into reserves, and borrowers draw available assets from those reserves. Each asset has its own supply and borrowing activity. Supplying WETH, for instance, can give someone collateral to borrow USDS from its reserve without selling the WETH.

A supply creates a claim on the deposited asset. A borrow creates debt in the asset taken out, so someone who borrows USDS owes USDS plus accrued interest. The contracts account for both sides while the deposited assets provide liquidity for withdrawals and new loans.

Borrowing costs change as an asset’s reserve is used. Its interest-rate model responds to borrowing demand and available liquidity; interest added to borrowers’ debt supports the yield earned by suppliers. That means a borrower’s debt can grow while the amount of collateral they deposited stays the same. A supplier’s claim can grow through interest even when they make no further deposit.

Two different percentages govern a collateralized position. LTV, or loan-to-value, sets how much new debt the collateral can support. The liquidation threshold sets when existing debt leaves too little collateral coverage. The borrowing limit and the liquidation point therefore answer different questions: how much can be borrowed now, and when can a loan be liquidated?

Take an illustrative position with $10,000 of WETH collateral, a 60% LTV, an 80% liquidation threshold, and $4,000 of USDS debt. At those assumed values, the LTV permits up to $6,000 of borrowing, leaving $2,000 of initial borrowing capacity. The liquidation calculation instead counts $8,000 of collateral coverage: $10,000 multiplied by 80%.

Health factor is that threshold-adjusted collateral value divided by debt value. Here it is $8,000 divided by $4,000, or 2. It has no units. With several collateral assets, the calculation adds each asset’s oracle-valued amount multiplied by its own liquidation threshold, then divides the sum by total debt value.

Now suppose the same WETH amount falls to an oracle-valued $4,500 while debt remains $4,000 for simplicity. The deposit’s token amount has not changed, but its counted coverage is now $3,600. Health factor falls to 0.9. A factor below 1 makes the position eligible for liquidation. Debt can also push the factor down as borrowing interest accrues, even if the collateral price holds steady.

At that point, a liquidator can repay eligible debt in exchange for collateral plus a liquidation bonus. In the illustration, if the borrower repays $1,000 before liquidation occurs, debt falls to $3,000 while the WETH amount and its $4,500 value stay the same. Health factor rises to 1.2 because $3,600 now covers a smaller debt. The $3,000 debt still exceeds the illustrative 60% LTV borrowing limit of $2,700 at that price, showing why LTV and liquidation threshold must be read separately.

In practice, someone may supply an asset solely to earn variable lending interest, or use eligible collateral to borrow another asset while retaining their original holding. Repaying debt or adding eligible collateral raises health factor; borrowing more or withdrawing collateral lowers it. The useful measure is the position after each change, using current debt and oracle-valued collateral.

Supply claims record what a depositor can redeem, while withdrawals depend on reserve liquidity and the depositor’s remaining collateral coverage.

What Are SparkLend spTokens?

SparkLend spTokens represent supplied assets and their accrued lending interest. They record the supplier’s claim on the reserve. As interest accrues, the claim grows, so the redeemable balance can differ from the original deposit.

Why Can SparkLend Withdrawals Be Unavailable?

Withdrawals require enough available assets in the relevant reserve. A borrower also needs sufficient collateral to support outstanding debt after a withdrawal. If removing supplied collateral would leave too little coverage, repaying debt or adding other eligible collateral can make more of that supply withdrawable.

Before changing a position, calculate its health factor using current collateral values, liquidation thresholds, and debt. Then compare the proposed borrow or withdrawal with its LTV-based capacity. Those two checks show both what the position can do now and how much room it has before liquidation becomes possible.

Subscribe to eth news