The future of undercollateralized loans on Ethereum | part 2
The guide to undercollateralized loans for retail traders on Ethereum: How to get a leveraged loan, manage risks, avoid automatic liquidation, and quantify profit & loss
This is part 2 of our two-part series on leveraged lending within the Ethereum layer-2 ecosystem. In part 1 we reviewed over-collateralized loans with Aave on Arbtrium Layer 2 with a special focus on:
Collateralization & borrow limits
How lending platforms enforce automatic liquidation & penalties
On-chain debt tokenization
Modeling risk & reward
If you’re new to lending and leverage in DeFi, I encourage you read part 1 first. In this analysis (part 2) we focus on the emerging undercollateralized lending ecosystem within Ethereum. This guide is organized into three sections:
How to get a leveraged loan with Sentiment
How leveraged lending protocols manage risk and liquidations
Closing thoughts on risk vs reward
I’m particularly interested in undercollateralized loans because of its nascent state within the Ethereum ecosystem: there are few players & no single platform dominates the undercollateralized retail lending market:
Under-collateralized lending platforms like Sentiment and Gearbox didn’t even exist until the 2nd half of 2022, and Gearbox + Notional still require a $100k USD minimum deposit, out of reach for the majority of retail investors. This only leaves one player: Sentiment. My prediction is that leveraged lending platforms will be an investment narrative in 2023 and beyond.
Currently, if retail investors wish to express their belief in ETH via leverage, the only option available was perpetual trading platforms like GMX. Derivative trading platforms are good tools to exploit short-term movement but present a challenge with respect to trading fees: floating borrowing rates are calculated per hour.
The associated borrowing cost, combined with the risk of a 100% loss of principal are how perpetual trading platforms like GMX accrue value to its tokenholders: traders lose more than they win.
Given the high borrowing costs with derivative trading, leveraged lending platforms could offer a compelling middle ground for those who want to buy and hold a leveraged position of ETH or stETH for an extended time frame.
Let’s dive in. To follow along you will need these tools:
🧰 Tools you will need
An undercollateralized lending platform like Sentiment
A block explorer like Arbiscan
Excel or google spreadsheets
Up to 1 ETH in this example
Familiarity with concepts like LTV, liquidation thresholds, health factor, and liquidation penalties as outlined in part 1.
1. How to get a leveraged loan with Sentiment
Sentiment is a permissionless undercollateralized lending platform. Borrowers can access up to 5x leverage on an asset. The terms "undercollateralized loans” and “leveraged loans” are used interchangeably & represent the same concept: borrowing more than the market value of your collateral.
Example 1 - I provide 1 ETH of collateral worth $1,500 USD to borrow $4,500 USDC - 3x leverage
Example 2 - I provide $5,000 USDC of collateral to borrow 10 ETH at $1,500/token - 3x leverage
Step 1: Define trade
Assume we are bullish on ETH in 2023 and we wish to express this belief by:
Deposit 1 ETH of collateral at a spot price of $1,649
Borrow 3 ETH of USDC for $4,947
Buy 3 ETH at a spot price of $1,649/token
This would produce:
4 ETH of assets
$4,947 USDC of liabilities
A Sentiment health factor of 1.33 calculated as:
health factor = [market value of assets/liabilities]
We might believe that ETH will experience a 40% increase in value over the next 12 months, at which point we could:
Sell 3 ETH at our predicted target of $2,308/token or $6,925
Pay off the $4,947 USDC loan plus interest
Excluding the cost of financing, we realize a pre-tax profit margin of 160% depicted below:
Step 2: Deposit 1 ETH as collateral
We can start by viewing our current Sentiment dashboard and confirm all outstanding assets and liabilities which will impact our health factor. As depicted below, I’ve cleared out all major positions for this walkthrough…
…we can then execute the first step of our trade to DEPOSIT 1 ETH.
When we review this transaction on arbiscan, take note that the 1 ETH is deposited into a proxy contract 0x575. Specifically, note how my wallet 0x8fc calls Sentiment’s contract 0x62c to DEPOSIT 1 ETH to 0x575:
0x575 is the wallet Sentiment “mints” for borrowing and lending. This is actually a proxy contract address separate from my personal 0x8fc. This is intentional. All of the assets borrowed on the Sentiment platform are managed via a proxy contract which means the user never has custody of the loaned assets in their personal wallet (0x8fc). The Sentiment delegated ownership model allows users to have complete control over the assets without having custody.
We can verify this by looking on the blockchain explorer at the proxy contract 0x575 and see:
1 ETH has been sent from 0x62c to 0x575
Recall that 0x62c is the contract my personal wallet 0x8fc called to deposit 1 ETH
The flow is as follows: 0x8fc → 0x62c → 0x575
…as depicted below:
Step 3: Borrow $4,947 USDC as debt
We can verify the 1 ETH has been deposited while also taking note of the proxy contract 0X57 in the account menu…
Prior to executing this loan, note our health factor is 100%, we have no liabilities. This is again calculated as:
health factor = [market value of assets / liabilities]
….and is based on the aggregate market value of all assets and all debts. This is called the “cross-margining of assets” and allows users to deposit multiple collateral types in order to amortize price exposure across multiple assets.
Now we can “borrow” our target 3x ETH leverage of $4,947 as depicted below:
…which essentially functions as a line of credit for us to buy stuff. Note the health factor is calculated at 33.56% which is our anticipated value:
health factor = [market value of assets / liabilities] = + ($1,655 + $4,498) / $4,498 = 1.33x
When we review the block explorer we can see that $4,947 less the .001 loan origination fee has been transferred to proxy contract 0x575, not my personal wallet 0x8fc. 0x8fc initiated the transaction and paid the gas fee, as depicted below:
The Sentiment proxy contract now contains the $4,493 USDC as well as the 1 ETH deposited as collateral:
We can reaffirm this in the Sentiment UI…
…and again take note of the health factor which is based on the sum of the market value of the assets divided by the liabilities as depicted below:
Step 4: Buy 3 ETH
Now that we are in possession of ~$4,900 USDC we can use Sentiment to do two things:
Trade the USDC for ETH on a white-listed DEX
Provide liquidity to a white-listed liquidity pool
Let’s walk through both starting with trading USDC for ETH. The Sentiment risk engine controls which dApps and tokens your Sentiment proxy contract can interact with, this means funds cannot be extracted or “borrowed” outside of the system. End users are constrained to the following DEX choices: Sushiswap, Uniswap, Balancer, or Curve. Each DEX has a different composition of tokens available for trade. For example, wstETH is available on balancer but not Uniswap.
The approved list of dApps and tokens aligns with the available liquidity pools we’ll explore next, but keep this in mind as you are not (yet) able to trade USDC for low-float tokens on unknown exchanges. In the aforementioned picture, we trade USDC for WETH on Uniswap.
When we review the block explorer we are again reaffirmed that ~$4,950 USDC has been traded for 3 WETH.
My wallet 0x8fc called 0x62c
0x62c transferred ~$4,950 USDC to 0xc31
0xc31 transferred 3ETH to 0x575 (my Sentiment proxy contract)
When we reconcile this transaction against the balance overview in our proxy wallet, the results are expected:
We now have a USDC token balance of $4,954
We now have a WETH balance of 3
ETH balance is still 1
When we review the results in our Sentiment dashboard, the account asset composition has changed but the overall account value and health score remain the same
Step 5: Provide liquidity
At this point our trade is complete. We can wait for ETH to increase to our predicted value, close the credit position, pay back the debt, and net profits outlined in step 1, but we can also keep going 😀.
Included in the Sentiment protocol is the ability to provide liquidity and stake across a pre-approved set of Curve and Balance pools depicted below:
Given that I’m bullish on ETH, I do not want to deposit my 3 ETH into a USDC pool as the pool composition is inclusive of USDC, and when we sell the pool’s token, the tokens we receive will be in portion to the pool’s ratio. So instead let’s deploy our WETH to the “wstETH-WETH liquidity pool” on Balancer:
When we review the transaction in the block explorer we confirm that ~2.98 B-stEth tokens were transferred to our Sentiment proxy contract 0x575…
…and we can see our proxy contract wallet is now in possession of the ~2.98 b-stETH tokens.
Step 6: Stake balancer pool tokens
Given that the WETH-wstETH liquidity pool is paying ~0.01% APY, we want to generate yield to cover as much of the floating variable borrow rate as possible, which we can do by staking our BPT-WETH-WSETH token….
..and for completeness we can review the transaction on the block explorer to confirm the balancer pool staked ETH token has been traded for a “Balancer B-stETH-Stable RewardGauge Deposit”, earning a variable yield of ~4.51%….
..which we are able to reconcile against our Sentiment dashboard:
1 ETH - our original collateral
2.98 BPT-WSTETH-WETH-Gauge tokens - our balancer pool staking token
$4,947 USDC - our borrow debt with a floating interest rate currently at 5.22%
2. How Sentiment manages risk
If you’ve been following along, you can surmise Sentiment manages risks by controlling the custody of assets. Sentiment is able to offer undercollateralized loans in part due to its protocol architecture. A borrower is never in custody of the borrowed asset. Funds are delegated to a proxy contract that Sentiment calls a “wallet”, which the borrower in turn interacts with:
Lenders deploy capital to Sentiment lending reserves on the premise of a higher yield than traditional lending platforms
Borrowers “mint” a Sentiment wallet
Capital from the lending reserve is accessed via the Sentiment wallet
Borrowers operate as a “delegated owner” of the Sentiment wallet only able to perform a subset of pre-approved transactions on a white-listed set of DEX
Once a Sentiment wallet is minted, borrowers deploy collateral to a margin account controlled by the wallet. The Sentiment risk engine is the entity that computes and verifies the risk of each account and is also responsible for maintaining solvency at the protocol layer with respect to each lender.
This design enables borrowers to create leveraged debt positions against their collateral while mitigating counterparty risk for the lenders. How? Again, the borrower never has custody of the loaned assets. This delegated ownership model allows the borrower to control how the assets are deployed without actually having custody, which allows the protocol to maintain the first right of ownership throughout the life of the position.
This “first right of ownership” concept is how the protocol manages the position risk & facilitates liquidations. The only situation where a borrower would withdraw any assets from the wallet is to withdraw profits, reduce the position or close out the entire position.
Moreover, the protocol enforces a subset of dApps (smart contracts) and deFi tokens (ERC-20) that the borrower is authorized to interact with:
Borrowers interact with the margin account via the sentiment wallet.
The margin account interacts with a “whitelisted” set of dApps and digital tokens.
Borrowers are unable to deviate from the white list.
3. What about lenders?
Although we’ve focused primarily on borrowers, lenders are the engine that makes this protocol possible. Lenders who provide liquidity to Sentiment expect to earn outsized yield relative to the traditional overcollateralized lending markets. As of this writing:
Lending ETH yields a 2.30% APR vs .59% APR on Aave
Lending USDC yields a 4.45% APR vs .53% APR on Aave
Lending UDT yields a 3.81% APR vs. 2.99% APR on Aave
Note each pool is constrained by a theoretical pool capacity and its yield is a byproduct of the pool’s utilization. Pool liquidity is the amount of available ETH/USDC/USDT in each pool.
125.53 ETH has been deposited into the ETH pool
There is 40.82 ETH available to borrow
This also means there is 40.82 ETH available to withdraw as a lender
If pool liquidity goes down, supply yield will go up as an incentive to attract more lenders
Just a few days ago the ETH pool had a supply APR of 69% as a result of high utilization + low pool liquidity
4. Closing thoughts on risk vs reward
I do enjoy exploring the emerging corners of DeFi, and undercollateralized lending on layer-2 platforms is going to be a narrative in 2023+, but rational minds prevailing, was all this work worth it?
Given the low transaction fees associated with layer 2, the aggregate fees of the 6 transactions were ~$5.81. Said another way, I paid $5.81 for a $4,950 line of credit. This is OK.
Variable lending costs associated with the $4,947 USDC are a point of concern. I am generally not a fan of floating interest rates and would be willing to pay more to lock in a fixed APR. We need to watch this.
The biggest risk is the downside loss before automatic liquidation. Sentiment will liquidate this position when the health factor reaches 1.20, as depicted below.
A 1.20 health factor is only a -10% swing in the wrong direction. ETH spot has moved > 10% in a single 24-hour window approximately 100 days over the past year. I have a ~1/3 chance of getting liquidated. Moreover, if I am liquidated, my portfolio will experience a 40% loss before loan origination & interest fees. I am bullish on under-collateralized lending platforms as a vector to unlock a more capital-efficient market but urge all retail traders to exercise caution when entering 2x-5x leveraged trades.
Leveraged trades have a very narrow liquidation window and a much higher risk of principal loss.
If you’ve made it this far, you now understand why!
To knowledge and wisdom,
January 20th, 2023
San Francisco, CA
Article cover generated by DALL-E: “An abstract oil paying of Benjamin Graham warning a bored ape on a yacht about the risks of too much leverage”