Protocol Overview

Lending & Borrowing

How deposits, borrows, interest accumulation, LTV, and the share system work on Project 0.

Lending

When you deposit assets into a Bank, you become a lender. Your deposit serves as liquidity that borrowers can draw from, and you earn interest over time. There are no fees to deposit or withdraw. Interest accrues passively through the share system (see below) with no interaction required beyond the initial deposit.

Borrowing

To borrow, you must have sufficient collateral deposited in your Account. The protocol's risk engine evaluates your Account health to determine how much you can borrow. Borrowers pay interest to lenders, and a small portion of interest also goes to the Bank's insurance fund and administrator fees.

Interest Accumulation

Interest accumulates when users borrow an asset. It updates whenever any user performs a transaction that affects a Bank's balances. Borrowers are assessed interest, while lenders earn it. A portion of interest paid by borrowers also goes to fees. Interest accumulates on your position entirely within the program: no interaction is necessary beyond depositing, borrowing, withdrawing, and repaying.

Example:

Sally deposits $20 in Token A
Sally borrows $10 in Token B

Sally's $10 debt accrues interest and grows to $11.
The $1 difference is not debited until Sally repays: she must repay $11 to close this debt.
Sally's net balance and borrowing power declines from (20 - 10) = $10 to (20 - 11) = $9.
If she cannot repay, she may not be able to withdraw all of her A.

Bob deposits $10 in Token B.
Thanks to Sally's interest, Bob's Token B is now worth $11.
Bob doesn't realize his $1 gain until he withdraws.
Bob's net balance and borrowing power increased from $10 to $11.
Bob can withdraw $11 at any time.

Interest accrues for all users of a Bank simultaneously. If anyone transacts with a Bank, the interest for every lender and borrower in that Bank compounds at that moment.

How Interest Compounds

Under the hood, Balances are tracked internally such that your deposit represents a proportional ownership of the pool. As borrowers pay interest, the conversion rate increases, so your position becomes redeemable for more tokens over time.

This is why interest compounds automatically with no interaction. The more frequently a Bank is used (any deposit, withdraw, borrow, or repay), the more often interest compounds for all users.

Because interest accumulates just before any transaction, the actual amount withdrawn or repaid can be slightly different from what's previewed. To withdraw or repay your full balance, use the special "withdraw all" or "repay all" flag, which closes the balance in full after interest accrual.

LTV and Weights

The Loan-to-Value ratio (LTV) determines how much you can borrow relative to your collateral. Some venues display "Weight" as the LTV, but these are related concepts, not identical.

When you deposit $100 of Token A, an Asset Weight is applied. This weight discounts your asset: a $100 deposit with a weight of 90% is only worth $90 for borrowing purposes. Likewise, a Liability Weight applies to assets you borrow: the $50 you borrowed with a liability weight of 110% is actually worth $55 in risk terms.

The effective LTV for any lending/borrowing pair is:

LTV = Asset Weight / Liability Weight

Each weight has two tiers:

TierUsed ForRelative Value
InitialBorrowing checksMore conservative (lower asset, higher liability)
MaintenanceLiquidation checksMore permissive (higher asset, lower liability)

The gap between Initial and Maintenance weights creates a health buffer (also called the "liquidation buffer") that protects borrowers from immediate liquidation after borrowing.

The LTV displayed on app.0.xyz uses the Initial asset weight. The health shown on the portfolio page uses the Maintenance weight.

Comparing LTVs Across Venues

Most venues (including P0) publish only the Asset Weight on the user-facing front end. The Liability Weight, while publicly available, is often less visible. This means a platform showing a higher Asset Weight may actually offer a lower effective LTV if its Liability Weight is also higher.

Example:

Venue K: Asset Weight 90%, Liability Weight 120%
Venue P: Asset Weight 85%, Liability Weight 105%

Venue K LTV: 0.90 / 1.20 = 0.75 (75%)
Venue P LTV: 0.85 / 1.05 = 0.81 (81%)

Despite showing a lower Asset Weight, Venue P offers better effective LTV because its Liability Weight is more favorable.

Worked Example: Health and Liquidation

Token A: Asset Weight Initial = 90%, Maintenance = 95%
Token B: Liability Weight Initial = 110%, Maintenance = 105%

Susie deposits $100 of Token A.
Susie's deposit is worth: 100 * 0.90 = $90 for borrowing purposes.

Susie borrows as much B as possible:
Max borrow of B = 90 / 1.10 = $81.82

For Maintenance purposes:
Health = 100 * 0.95 - 81.82 * 1.05 = $9.09 remaining liquidation buffer.

Now Token A drops in value by 5%:

Susie's deposit in A is now worth $95.
Health = 95 * 0.95 - 81.82 * 1.05 = $4.34 remaining liquidation buffer.

Token A drops 10% from original:

Susie's deposit in A is now worth $90.
Health = 90 * 0.95 - 81.82 * 1.05 = -$0.41. Susie can be liquidated!

At any point, Susie could deposit more collateral or repay some debt to avoid liquidation and the premium it carries.

On this page