Tellerv2 loan repayment: full or partial payments
Tellerv2 loan repayment uses the borrowed ERC20 token to meet a scheduled minimum, reduce outstanding debt or settle remaining principal and accrued interest. A custom payment must satisfy the contract's minimum at execution. Full settlement ends that loan's debt, while partial repayment leaves an obligation under its existing schedule. Collateral handling also depends on the repayment method, so settling the balance and collecting collateral may happen together or through separate calls.
Bottom line: Payment cycles can require repayment before final maturity, so the next due date determines which payment obligation needs attention.
Payment size follows the market's schedule
Minimum, custom and full payments apply to an accepted loan with payment terms inherited from its market. Loans opened through lending offers use that same repayment framework. The payment cycle and payment type determine the principal portion due alongside accrued interest. A minimum payment therefore does not always reduce principal in the same way.
An instalment structure spreads principal repayment across the schedule. A bullet structure can require interest before the final cycle, with outstanding principal due in that final cycle. At that point, a minimum payment can become the full remaining balance.
Partial repayment does not itself replace the agreed loan duration.
The repayment calculation distinguishes remaining principal from the principal currently due. Choosing the minimum addresses the scheduled obligation; choosing a larger amount below the full payoff reduces more principal. The next due date identifies when the scheduled payment falls due. A payment made before final maturity can still be necessary to prevent an earlier missed instalment.
Can a custom payment be smaller than the calculated minimum?
A custom payment must cover the minimum that the contract calculates when the transaction executes, including any principal then due and accrued interest.
In code version 10, a custom
repayLoan
amount below that minimum causes a revert.
Interest accrues between payments, so an earlier displayed amount may differ from the execution-time requirement.
For a valid partial payment, the calculation allocates accrued interest before the remainder reduces principal. Future interest then uses the outstanding principal balance and elapsed time. The full-repayment method calculates the payoff itself; the version 10 custom methods transfer the specified amount without capping it at the payoff. A stale custom payoff can leave residual debt when it still meets the minimum. If the whole balance is due, the same shortfall causes a revert.
Core methods separate payment size from collateral collection
The
TellerV2
implementation with
CURRENT_CODE_VERSION = 10
exposes these repayment methods. Their collateral behavior gives a borrower another choice alongside the payment amount. Application interfaces may expose fewer methods than the contract.
| Contract method | Payment amount | Collateral collection |
|---|---|---|
repayLoanMinimum
|
Calculated due principal plus accrued interest | Invokes withdrawal if the payment settles the loan |
repayLoan
|
Specified amount at or above the minimum, without a payoff cap | Invokes withdrawal on full settlement |
repayLoanFull
|
All remaining principal plus accrued interest | Invokes withdrawal during settlement |
repayLoanWithoutCollateralWithdraw
|
Specified amount at or above the minimum, without a payoff cap | Leaves collection outside this call |
repayLoanFullWithoutCollateralWithdraw
|
All remaining principal plus accrued interest | Leaves collection for a separate call |
| Every payment still requires sufficient lending-token balance and allowance for the core contract. | ||
For an accepted collateral-backed loan, ordinary full repayment combines debt settlement with collateral withdrawal. If withdrawal reverts, the combined transaction reverts too. A failed transaction therefore does not establish a paid loan.
Tellerv2 loan repayment - Full or partial payments
- Payment size follows the market's schedule
- Can a custom payment be smaller than the calculated minimum?
- Core methods separate payment size from collateral collection
If only withdrawal failed, read the loan state before retrying. An accepted loan with a supported no-withdrawal method can reach
PAID
with collateral still escrowed. Later collection through
CollateralManager.withdraw
requires the protocol to be unpaused and the collateral transfers to succeed.
The lending token, allowance and confirmed payment
Repayment spends the loan's lending token on the network where that loan exists. A matching ticker on another network cannot fund the same call. The paying wallet needs enough of that specific ERC20 asset and sufficient allowance for the core contract. The collateral approval used when opening a loan authorizes a different operation.
An approval permits token movement; it does not record a loan payment.
In the Teller Pro API,
create_repay_intent
builds repayment transactions and any required token approval for a specified wallet, chain and
bidId
. Supplying
amount
requests that raw token amount; omitting it requests full repayment. Token decimals determine the raw units. The API constructs transactions for the wallet to sign, so an intent alone does not establish settlement.
The repayment transaction must succeed before the loan reflects a payment. The resulting principal balance and loan state distinguish partial repayment from full settlement. A repayment transaction can have a hash before confirmation. Its receipt shows success or failure; the confirmed loan record shows the resulting debt.
What changes when a payment becomes late?
A late payment exposes the loan to default under its recorded timing rules, so final maturity may not be the first deadline. Default depends on the next due date and the default duration recorded for that loan. Collateral-backed loans can then face lender claims or liquidation under the applicable delay rules. A falling collateral price alone does not create repayment default. In version 10, repayment remains possible while the loan's state is ACCEPTED, even after default. Lender closure or liquidation blocks these methods.
Rolling over creates a replacement borrowing obligation
A rollover uses replacement financing to repay the existing loan and begin a fresh term. That choice preserves a borrowing obligation. Available lending liquidity and the replacement loan's terms determine whether it can proceed. Requesting an extension has no effect on the old repayment schedule before the refinancing completes.
Within the Teller Pro flash-swap route, the preview itemizes principal owed, interest owed, origination fees, flash fees and any principal reduction. Its makeup amount identifies the borrower's contribution to the replacement transaction. These costs belong in a comparison with paying the existing loan directly. A lower replacement rate alone does not describe the full amount needed to refinance.
Without available replacement liquidity, the existing loan still requires payment under its own terms.
Tellerv2 loan repayment FAQ
What amount do I owe if fees reduced the tokens I received?
The loan's recorded principal determines the starting debt, even when origination fees reduce the amount delivered to the recipient. Repayment then reflects outstanding principal and accrued interest. Previously repaid principal reduces the remaining balance; the original net wallet receipt is not a substitute for the loan's debt calculation.
How does the payment cycle affect the interest calculation?
The V2Calculations library uses a 360-day interest year for monthly payment cycles and a 365-day year for cycles defined in seconds. The loan's recorded cycle type selects the convention. Interest uses outstanding principal and elapsed time from acceptance or the latest repayment, so payment dates affect the amount owed.
Can another account repay my Tellerv2 loan?
The version 10 core methods allow another account to repay an accepted loan using that account's lending-token balance and allowance. The payment applies to the identified loan. Borrower collateral withdrawal still sends the assets to the recorded borrower.
Will the repayment call sell my collateral to cover the debt?
Core repayment calls collect the loan's lending token rather than exchanging collateral for that token. When the assets differ, a collateral balance does not supply the required repayment balance. A rollover uses a separate financing mechanism, so its transaction and costs require a separate choice from direct repayment.
Is collateral released in proportion to a partial payment?
Partial repayment through the core contract does not automatically release a proportional share of collateral. Borrower withdrawal through CollateralManager requires the loan's paid state. Paying down principal can therefore leave the original collateral locked while debt remains, even though the outstanding borrowing balance has decreased.
Do repayment intents require an additional wallet-control proof?
A repayment intent accepts wallet proof optionally, unless the partner account requires it for every transaction intent. The wallet signs a control challenge for this proof, separately from authorizing approval and repayment transactions. The API key authenticates the integrating application and does not replace the wallet's transaction authorization.
Updated: