Repay¶
About this page
Protocol: JustLend DAO (Compound V2 fork on TRON) · Network: TRON Mainnet · Scope: user-facing repay flow — repayBorrow and repayBorrowBehalf, full-balance shortcut via uint256(-1), jTRX payable variant. · Units: repay amounts use the underlying token's own decimals. · Related contracts: SBM repayBorrow / repayBorrowBehalf.
Repaying borrowed tokens is a critical aspect of managing borrow positions on the JustLend DAO Protocol. With flexible repayment options and user-friendly tools, JustLend DAO makes it easy for borrowers to maintain healthy collateralisation ratios and prevent liquidation risks.
Borrowers can repay their loans using the same tokens they borrowed or through jTokens (collateral tokens) of the same underlying asset. Here are some benefits of repayment:
- By reducing the outstanding borrow amount, repayment strengthens the collateralisation ratio, ensuring the position remains adequately collateralised;
- A higher collateralisation ratio minimizes the risk of liquidation by maintaining a safe margin between the collateral value and the borrowed amount;
- Repayment allows borrowers to safely withdraw a portion of their collateral, offering greater flexibility in managing their assets.
How Do I Repay Assets¶
- Connect your Web3 wallet on TronLink or other supported wallet app to the JustLend DAO (https://justlend.org).
- Navigate to the "SBM" and choose the borrowed asset you want to withdraw, click 「Repay」.
- Specify the amount you want to repay and confirm the transaction.
Try it¶
Open the JustLend dApp on the Repay action: https://app.justlend.org/homeNew?lang=en-US → pick the borrowed asset → click 「Repay」.
Developer reference¶
- Contract function:
repayBorrow(amount)— passuint256(-1)(i.e.2^256 - 1) to repay the full outstanding balance. - Repay on behalf of another account:
repayBorrowBehalf(borrower, amount). - Required prerequisite for TRC20 markets:
approve()on the underlying for the jToken delegator. - For jTRX, the call is
payable— pass the TRX amount viamsg.value. - Live runnable example: Repay USDT — TronWeb.