Curve fi repayments reduce debt, while lender withdrawals depend on available liquidity
Curve fi borrowers confirm repayment by checking remaining debt and returned collateral in the same market. Lenders reconcile withdrawn tokens against the shares that their vault burns. A successful transaction can leave a partial position, and available liquidity can limit an otherwise valid withdrawal request.
A repayment can leave an active loan, while a lender’s remaining shares can exceed the assets available for immediate withdrawal.
Remaining debt determines whether repayment closed the loan
Zero remaining debt distinguishes full repayment from a reduction in an outstanding loan. Paying part of the balance leaves the rest subject to the market’s borrowing terms. The amount that left the wallet therefore doesn’t, by itself, establish that the position has closed.
Interest forms part of the repayment obligation. An earlier debt display describes an earlier state, so reconciliation should use the settled balance. Where interest continues to accrue, a later reading can differ from the balance immediately after a partial repayment.
Collateral and debt are separate quantities. Reducing one doesn’t establish how much of the other reached the wallet.
The market version also matters. Llamalend v1 markets are being phased out, while v2 has different repayment controls. An existing position remains associated with its deployed contracts. Its management options must match that version, particularly when collateral has entered soft liquidation. A feature available to a v2 position shouldn’t be assumed available to a legacy loan.
The loan record confirms what the repayment changed
A settled repayment should correspond to the intended borrower and market. In v2, the controller exposes remaining debt, whether a loan exists, and the position’s asset balances. The repayment event identifies the operation; those state readings establish what remains afterward. Full closure requires no remaining loan, alongside reconciliation of any returned assets. A repayment entry in transaction history alone doesn’t distinguish partial repayment from closure. Keep the transaction record and the subsequent position reading together when investigating a mismatch.
Soft liquidation changes the assets available for repayment
During soft liquidation, LLAMMA gradually exchanges collateral for the borrowed asset across the position’s price bands. The position can therefore contain both assets. Its original collateral deposit no longer describes everything available when repayment occurs.
In v2, borrowed tokens already held within the position can contribute to repayment. That means the reduction in debt can differ from the amount supplied directly from the wallet. Reconciliation needs to account for the position’s assets as well as the wallet transfer. Treating the wallet debit as the whole repayment can make a correctly settled transaction appear inconsistent.
A price recovery can reverse the direction of LLAMMA’s exchanges. It doesn’t undo losses from earlier conversions.
V2 also supports a repayment option that shrinks the converted portion of a soft-liquidated position. The associated calculation determines any additional borrowed tokens required and accounts for market constraints. This path can reset the remaining position outside soft liquidation when its conditions permit. It doesn’t restore collateral already lost through conversions, and it isn’t equivalent to closing every remaining obligation. The resulting debt and position state still determine what remains open.
Collateral removal depends on the loan that remains
Removing collateral from an active loan reduces the backing for its remaining debt. The controller rejects removal when the resulting position fails its health requirements. A successful partial repayment therefore doesn’t authorize an arbitrary collateral withdrawal, even when the debt balance has fallen substantially.
V2 provides separate previews for repayment and collateral removal. Each evaluates the proposed operation against the relevant position state. A repayment preview doesn’t establish that a later removal will pass, especially after prices or interest change. Before committing to removal, its own amount and resulting health need evaluation. Afterward, the remaining collateral and debt describe the exposure that continues.
Vault withdrawal amounts use distinct units and rounding rules
Lending vaults account for ownership in shares and withdrawals in the underlying borrowed asset. Their ERC-4626 interface supports both an asset amount through
withdraw
and a share amount through
redeem. These quantities aren’t interchangeable. The following v2 vault rules explain how an exit request translates into assets received and shares removed.
| Withdrawal parameter | Value or rule | Effect on the exit |
|---|---|---|
| Withdraw amount unit | Underlying asset units | The vault calculates the shares required. |
| Redeem amount unit | Vault share units | The vault calculates the assets returned. |
| Withdrawal preview rounding | Shares round up | The estimate covers the requested asset amount. |
| Redemption preview rounding | Assets round down | Rounding uses the token’s smallest units, not whole tokens. |
| Maximum withdrawal | The smaller of the owner’s share value and available liquidity | A share balance can exceed immediate withdrawal capacity. |
A conversion preview estimates the exchange between shares and assets. It doesn’t reserve liquidity or replace the maximum-withdrawal check. V2 withdrawals and redemptions also reject an amount that would leave total vault assets below the contract’s minimum, unless it empties the vault. For reconciliation, the withdrawal event records both quantities and the receiving address. A difference between a share count and a token amount isn’t itself evidence of missing funds.
Available liquidity and bad debt create different exit limits
Lender withdrawals are limited by the assets available for withdrawal in the selected lending market. Tokens already borrowed aren’t immediately available for redemption. Repayments and new supply can increase liquidity, while borrowing and other withdrawals can reduce it before another transaction executes.
Repeatedly submitting the same oversized withdrawal doesn’t create additional liquidity.
Bad debt introduces a separate problem: recoverable market assets fall short of lender claims. That shortfall can cause persistent withdrawal restrictions and losses, even while an account balance remains visible. Waiting for ordinary repayments isn’t a complete explanation of recovery in an impaired market. Later collateral values, liquidation outcomes, and borrower actions can affect the amount ultimately recoverable.
A partial withdrawal leaves the unredeemed shares exposed to the market. The next decision depends on whether liquidity is merely occupied or the market has suffered a solvency shortfall. Any further withdrawal requires a fresh capacity reading; an earlier successful exit doesn’t establish that the remaining balance is immediately redeemable.
Returned assets determine the next available action
A closed loan, a reduced loan, and a partially redeemed vault leave different balances available for further use. Tokens still backing an active loan and assets represented by remaining vault shares aren’t the same as tokens received in the destination wallet.
Where eligible lending shares were staked, unstaking returns shares rather than completing the underlying asset withdrawal. Likewise, receiving a collateral token that represents another position leaves that separate position intact. Recovery of the token and conversion into its underlying assets are distinct operations with their own conditions.
Before using the returned tokens, confirm the amount received and identify any debt or shares that remain. If records disagree, resolve the receiving address, token quantity, or outstanding position first. That determines whether the next action is another withdrawal, further repayment, or use of the recovered balance.
Quick answers about Curve fi
Can another wallet repay my Llamalend v2 loan?
Another caller must have authorization to manage the borrower’s v2 position. The repayment function identifies the borrower separately from the caller and checks that permission. Holding enough repayment tokens doesn’t, by itself, grant authority over the loan. This position authorization is also distinct from the token allowance that permits a contract to transfer repayment assets.
What happens to repayment access when a Curve lending market is deprecated?
Deprecation doesn’t erase the market’s contracts or automatically cancel existing loans. Existing borrowers may still be able to repay, close positions, or recover available collateral, depending on the market’s operating state. Restrictions on new deposits or borrowing don’t establish the status of those exit operations. Bad debt can separately constrain lender withdrawals in the same market.
How can a full repayment succeed when its health preview rejects the amount?
The v2 repayment health preview is designed for partial repayment and can reject an amount that would fully close the loan. A closed loan has no continuing health to preview through that calculation. This preview limitation doesn’t establish that the repayment transaction will fail, although the transaction must still satisfy funding, authorization, and execution requirements.
Is the wallet that submits a vault withdrawal always the recipient?
The v2 vault supports a separate receiving address for withdrawals and redemptions. The caller is the default recipient when no alternative is supplied, but an explicit receiver can differ from both the caller and the share owner. The withdrawal record identifies that receiver, which explains why successful execution needn’t increase the submitting wallet’s token balance.