How to Repay Your TermMax Debt with FTs on Etherscan

Until our UI integrates this feature, here’s a detailed guide for advanced users who want to close their levered positions on TermMax manually and potentially improve returns.
This guide shows how TermMax users can manually close their leveraged positions (GTs) with FTs using Etherscan to minimize slippage and recover more of their collateral.
Why Repay with FTs
When you close a leveraged position through the TermMax UI, the system:
- Sells your entire collateral on the market.
- Calculates the debt you owe.
- Executes at current market prices — incurring slippage + potential MEV.
If market liquidity is thin, slippage can eat into your returns. By repaying manually with FTs (fixed-rate tokens), you could get a better outcome.
Quick refresher: What are FTs?
- When you borrow/loop on TermMax, you’re essentially selling FTs to lenders.
- Lenders hold this FT to redeem fixed interest after maturity.
- To close early, you can buy back FTs from the market and use them to repay/deregister your loan.
In other words, when you repay with FTs manually, you:
- Buy FTs at the current lending rate
- Use these FTs to directly cancel your debt
- Receive your full collateral back
- Sell the collateral yourself - can use limit/TWAP order on Matcha/Cowswap/Odos to avoid MEV attacks
💡 Pro Tip: Use this method when liquidity is thin between the debt asset and the collateral, or when current lending rates are significantly higher than your borrowing rate.
Steps to Repay Debt with FTs
Step 1: Find the addresses for GT and FT
The first step is to locate the addresses for GT and FT. To do that, head to TermMax and click “Specs” at the very right of a market row.
You can then open two Etherscan pages and enter the FT and GT in the search bar, respectively. Please keep the tabs open, as they’ll come in handy later.
Step 2: Find your GT’s ID
The next step is to get the GT’s ID that you want to close. There are two ways to do it.
Via Etherscan
This approach is better suited for those who only have one GT.
Head to your wallet address’s Etherscan page and check the “NFT Transfers” tab. Yes, each GT is an NFT.
You should be able to find the transaction that minted the GT, like the one below:
You can find the token ID by clicking on the item/NFT page.
Via Your Wallet UI
If you have numerous GTs, this approach is ideal for you. Head to TermMax’s dashboard and click “Close Position” underneath your existing position. Your wallet should prompt you to approve the usage of an NFT.
Step 3: Get debtAmt by calling loanInfo
Now with your loan ID in place, you can head back to your GT’s address and click “Contract” and then click “Read Contract as Proxy”.
You should be able to find loanInfo as one of the functions you can call.
Enter your loan ID in the parameter and click “Query.” You can now view the debtAmt
in the response.
In the example above, I need to repay 80332714 FT for my loan (ID 47) to retrieve the entire collateral.
The debtAmt
value you see (80332714) is displayed in uint256 format. To make sense of this number, you need to convert it to a human-readable format by accounting for decimals.
- Find the decimal places: FTs use the same number of decimal places as their underlying debt asset
- In this example: USDC has 6 decimal places
- Therefore: The FT also has 6 decimal places
- Apply the conversion: Divide the raw number by 10^(decimal places)
- Raw amount: 80332714
- Decimal places: 6
- Calculation: 80332714 ÷ 1000000 = 80.332714 FT
🧠 Verification Tip: You can double-check the decimal places by calling the decimals read function on the FT's Etherscan page. See below.
Step 4: Buy FT to reach that amount
Now, we will acquire the same number of debtAmt for that market on TermMax’s Lend page.
Step 5: Approve FT usage to GT
Once you’ve got that number of FT, switch your tab to FT’s Etherscan page, click “Contract” and then “Write Contract as Proxy”.
Enter GT’s address as the spender and the debt amount as the value. Those are in place because GT will use your FT to repay your debt.
Step 6: Repay
Then switch to your GT’s Etherscan page, click “Contract” and then “Write Contract as Proxy”.
You can find the repay
function in the list. Put your GT’s ID as the first parameter (id), debtAmt
in the repayAmt field, and false
for the byDebtToken.
Once the transaction is complete, you will receive the collateral asset back. In our case, it’s PT-sUSDe.
To reduce the slippage and attack vectors for MEV, you can sell the collateral with TWAP orders on Cowswap or with a limit order on the likes of Odos.
Example: How Much Better Can This Be?
In our test case:
- UI close: Returned 19.582235 USDC.
- Manual FT repayment: Returned 19.953206 USDC.
Difference: +1.89%.
For a $1M position, that’s $18,900 more in your pocket.
⚠️ Note: Results depend on rate differences and market conditions. We opened this loan at a ~7% borrowing rate and closed when lending was ~15%.
Coming Soon to the UI
We're working on adding this exact process to the TermMax UI, so you won't need to do any manual steps. When you want to close your positions, we will calculate every possible way, including using FTs, so that you can get the most profitable way.
For now, advanced users can follow this guide to potentially save on slippage and keep more from their positions.