# Testnet Tutorial

Welcome to the Surf Public Testnet! Our protocol enables isolated lending pools with no maturity date, allowing borrowers to unlock the liquidity of their Cardano Native Tokens (CNTs) and suppliers to earn higher yields than traditional ADA staking. For example, users can leverage SNEK as collateral to borrow ADA. In this testnet, we feature a single ADA/SURF lending pool, where ADA is the borrowable asset and SURF is the collateral token. This tutorial guides you through key functionalities to explore in the test environment, including Supplying, Withdrawing, Borrowing, Adding Collateral, and Repaying loans.

### **Setting up Testnet Wallet**

Set up a new or load up an existing Pre-Production Testnet wallet. We recommend Eternl.

<figure><img src="/files/L9hgCBtVuuLF3877Ikpy" alt=""><figcaption><p>Make sure the environment is pointed at Pre-Production testnet</p></figcaption></figure>

Request some tADA from the faucet here: <https://docs.cardano.org/cardano-testnets/tools/faucet>

Then request some tSURF tokens in our Discord.

### **Connecting to the Surf Testnet dApp**

Connect your wallet in the Surf dApp here: [https://surflending.org/app](https://flowcardano.org/app)

<figure><img src="/files/D2YQdawLo6YCH0xPXpzh" alt=""><figcaption></figcaption></figure>

Click Grant Access so the dApp can read your wallet balances and allow you to interact with the dApp.

Note:  Surf will refer to tADA and tSURF as ADA and SURF

<figure><img src="/files/tUwddS722278GqXJsYqq" alt=""><figcaption></figcaption></figure>

Your Lending Summary and the Portfolio section will load up information pertaining to your wallet:<br>

<figure><img src="/files/3UzWkncUPrqhQ395p06n" alt=""><figcaption></figcaption></figure>

Supplied and Borrowed figures would initially be at 0.  Let's change that.&#x20;

### **Supplying tADA**

Scroll down to see the Markets section.

<figure><img src="/files/gyvK1bD7OfeDiYkhkaVZ" alt=""><figcaption></figcaption></figure>

Let's add some Supply to the ADA/SURF pool. Click on Supply.

Type the amount you'd like to supply, or use the 50% or Max buttons to fill in the amount for you. Then go ahead and click Supply ADA.

<figure><img src="/files/x6Pt8ocD34wydI9btbmn" alt=""><figcaption></figcaption></figure>

Your wallet should pop up, requesting you sign the transaction.&#x20;

<figure><img src="/files/Txv8vr69CFpJvVly72vu" alt=""><figcaption></figcaption></figure>

After a quick review we sign the transaction and get a notification in the top right that our Supply was successful.

The new Deposit order should then appear in the Portfolio tab under Orders section.  Ignore the Repay order, that is there for another test case. Orders can be cancelled by clicking on the Cancel button, if you change your mind before the application processes them. But we'll allow our Deposit order to go through.

<figure><img src="/files/8tPW53K1iKwjtSZychp1" alt=""><figcaption></figcaption></figure>

This order should get processed within a couple of minutes and the supplied amount should then reflect in the Supplied positions table as well as the Lending Summary.&#x20;

<figure><img src="/files/cclyYk0uDiI2YWqMvjSn" alt=""><figcaption><p>Dummy values for ADA/USDM and ADA/SNEK supplies are displayed to illustrate multiple supplies and are not reflected in the totals of Your Lending Summary.</p></figcaption></figure>

To add more to the supply, click Supply again, which would get processed the same way.&#x20;

### **Withdrawing Supply**

This time though, let's try to withdraw some ADA from our supplied position, by clicking on Withdraw.

<figure><img src="/files/tazDA18rYMdyylSM5iYX" alt=""><figcaption></figcaption></figure>

We get a Withdraw ADA popup, where we can type in the Amount, but this time we will click on the 50% button to get half, 500 ADA, back from our supplied position. If "Available Liquidity" allows it, clicking on Withdraw ADA and approving the transaction in our wallet completes the request.

Next we can check Transactions in our wallet to see when the transaction is accepted on the chain, which could take 20 seconds or more.

<figure><img src="/files/xQEr3lff9PP3zPtwRTUf" alt=""><figcaption></figcaption></figure>

In a short while, we will see that our ADA/FLOW supply position has been updated to 500 ADA.

<figure><img src="/files/wvL9UXMp8otsnJazGdLl" alt=""><figcaption></figcaption></figure>

### **Borrowing tADA**

Now, let's try the borrow function. Go back to the Markets tab and click on the available Borrow button from the ADA/FLOW pool, which will bring up the Borrow ADA popup.

<figure><img src="/files/6GqJnlJDHNRyxbd4NHJO" alt=""><figcaption></figcaption></figure>

Entering the Amount of ADA you'd like to borrow, brings up the FLOW Collateral amount field with some suggested value buttons, as well as a slider underneath. Our desired amount of ADA to borrow was too high, so we got the "Collateral balance is insufficient" warning.

<figure><img src="/files/N9S0KRW5uCvtxpLI8P6L" alt=""><figcaption><p>The Health Factor, LTV Ratio and Liquidation price dynamically change depending on the amount and collateral amount you enter</p></figcaption></figure>

Lowering the borrow amount now allows us to enter in the FLOW field or use the buttons for amount of FLOW collateral we wish to lock up for our loan. Let's click on the minimum 500 FLOW button and then click on Borrow ADA, which will bring up the wallet popup again to sign the transaction.

After reviewing and signing the transaction, we get a Borrow successful notification in the top right. After another 20 or so seconds, when our transaction gets accepted on chain, we can go to the Portfolio tab and check our Orders, where our Borrow transaction should show up.

<figure><img src="/files/HJ3mCaVkdfG0bhjGZd9u" alt=""><figcaption></figcaption></figure>

A minute or two later it will be processed and a new transaction with our borrowed funds should appear in our wallet.&#x20;

<figure><img src="/files/oMQS7MmEsyzZ3edV1NUN" alt=""><figcaption></figcaption></figure>

The Borrow transaction in the Orders section will be replaced with a new Borrow position in the Borrow Positions section:

<figure><img src="/files/2xpLqQD9pNyTsXNsscZo" alt=""><figcaption></figcaption></figure>

### **Adding Collateral**

Looks good, but our Loan health is a bit risky. Let's increase it a bit by clicking on Add Collateral button.

<figure><img src="/files/269FPIt9VpeAMDR6gFXP" alt=""><figcaption></figcaption></figure>

Here, let's enter a number that brings our Health Factor up to a healthy 2.0. After clicking on Add Collateral and signing the transaction, we get a "Collateral added successfully" notification. The borrow position should be updated as soon as the transaction goes through.

<figure><img src="/files/PUEtakkPzpZM91TJ4Rmu" alt=""><figcaption></figcaption></figure>

Our loan looks quite healthy now!&#x20;

### **Multiple Loans**

Let's get one more loan, to see what happens. Going through the same steps, here's how our Borrow Positions look now:

<figure><img src="/files/YFkWmT8ouVAow6UuDZFL" alt=""><figcaption></figcaption></figure>

The second loan is now reflected in the Borrowed total, which stands at 130 ADA. The second loan was taken out when ADA/FLOW Utilization %, and therefore the Borrow interest rate, was a bit higher than the first loan. The interest rate for individual loans is fixed at the time the loan is taken out.

### **Repaying a loan**

Now, let's repay the second loan by clicking on its Repay button. This opens up the wallet popup with the repayment transaction.

<figure><img src="/files/Yx44hptUfnLDwAw6opzH" alt=""><figcaption></figcaption></figure>

After a quick review, we sign it and get a "Repayment successful" notification in the top right.

After the transaction gets processed, there is a new Repay Order in the Orders section.&#x20;

<figure><img src="/files/CajIOFRbvcdM6q0iYuQT" alt=""><figcaption></figcaption></figure>

A couple of minutes later, the order gets processed and a new transaction containing our locked collateral appears in our wallet.&#x20;

<figure><img src="/files/GeYqHNGe6daTSi2Gh9jP" alt=""><figcaption></figcaption></figure>

Our Borrowed total gets updated in Your Lending Summary, only the active loan is shown in the Borrow Positions and the order is also processed from Orders section.

<figure><img src="/files/OofxskMKBZCa4TebzzPB" alt=""><figcaption></figcaption></figure>

### **That's it!**

Great job completing the Flow Public Testnet tutorial! You’ve explored the core functionalities of the ADA/FLOW lending pool, from supplying and borrowing ADA to managing collateral and repaying loans. Share your feedback on our Discord and stay tuned for more Flow updates!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.surflending.org/public-testnet-resources/editor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
