> For the complete documentation index, see [llms.txt](https://docs.jewelswap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jewelswap.io/sui/ember-loop.md).

# Ember Loop (jeLOOP)

Ember Loop is a JewelSwap Labs vault on Sui that earns Ember's eEARN stablecoin yield on borrowed money as well as your own. Deposit USDC, receive jeLOOP, and the vault manages the loan for you.

{% hint style="warning" %}
**Labs / beta.** Ember Loop is an early, **unaudited** vault. Only deposit amounts you can afford to lose. Yields shown in the app are estimates based on current rates, not promises.
{% endhint %}

## In one paragraph

**eEARN** is a yield-bearing USDC token from Ember: hold it and it slowly grows in value. Ember Loop takes your USDC, turns it into eEARN, and then borrows more USDC against that eEARN to buy even more eEARN. That process of repeatedly borrowing and reinvesting is called **looping**. You end up earning eEARN's yield on several times the money you put in, minus the interest paid on the borrowed part. In return for your deposit you get **jeLOOP**, a token representing your share of the vault. You never handle the loan yourself: the vault and its keeper manage it, and you exit by requesting a withdrawal, which turns your jeLOOP back into USDC.

## How it works

### Step by step

1. **You deposit USDC** and receive jeLOOP.
2. **The vault buys eEARN** with your USDC from Ember.
3. **The eEARN becomes collateral** on **Suilend**, a Sui lending market. This works like a mortgage: you put up an asset to borrow against it.
4. **The vault borrows USDC** against that collateral and uses it to buy more eEARN, which is added to the collateral.
5. **Steps 3 and 4 repeat** until the position reaches the target leverage. In practice the vault does this in one go with a flash loan rather than many separate rounds.

```
USDC ──► Ember (eEARN) ──► Suilend collateral ──► borrow USDC ──► more eEARN
  ▲                                                                   │
  └──────────────── looped up to the target leverage ◄───────────────┘
```

**Current** (EmberMarket) is a second, backup lender. The vault can hold collateral and debt on either lender, and the keeper can move debt between them.

### A worked example: $1,000 at 4.5x

"4.5x leverage" means the vault holds 4.5 dollars of eEARN for every 1 dollar of depositors' money.

|                                                        | Amount                    |
| ------------------------------------------------------ | ------------------------- |
| Your deposit (your equity)                             | **$1,000**                |
| eEARN held as collateral (4.5 × $1,000)                | **$4,500**                |
| USDC borrowed to buy the extra eEARN ($4,500 − $1,000) | **$3,500**                |
| Loan-to-value (LTV): borrowed ÷ collateral             | $3,500 ÷ $4,500 ≈ **78%** |

Your $1,000 is now earning eEARN yield on $4,500, and paying borrow interest on $3,500.

{% hint style="info" %}
Your deposit is pooled with everyone else's. The numbers above describe your *share* of one shared position, not a separate loan in your name.
{% endhint %}

## Where the yield comes from

Your return comes from the gap between what eEARN earns and what borrowing USDC costs, multiplied by leverage. In plain words:

> **Net yield ≈ (eEARN yield × leverage) − (borrow rate × (leverage − 1)) − fees**

**Illustrative example** (made-up round rates, not a forecast): eEARN earns 10% a year and borrowing USDC costs 8%.

| Leverage                | eEARN yield earned | Borrow interest paid | Before fees | After 10% performance fee |
| ----------------------- | ------------------ | -------------------- | ----------- | ------------------------- |
| 1x (just holding eEARN) | 10%                | 0%                   | 10.0%       | 9.0%                      |
| 2x                      | 20%                | 8%                   | 12.0%       | 10.8%                     |
| 3x                      | 30%                | 16%                  | 14.0%       | 12.6%                     |
| 4.5x                    | 45%                | 28%                  | 17.0%       | 15.3%                     |

**Leverage works in both directions.** If eEARN's yield fell to 6% while borrowing still cost 8%, the 4.5x position would earn 27% − 28% = **−1%** a year. The more leverage, the faster you lose when borrowing costs more than eEARN earns.

The app's APY cards use live rates: eEARN's recent yield and Suilend's on-chain USDC borrow rate. The **APY calculator** also lets you include entry and exit costs and how long you plan to hold.

{% hint style="info" %}
**No extra reward tokens today.** Suilend pays no reward tokens on eEARN collateral, so today's yield is the eEARN-versus-borrow spread above. The vault has a "harvest" function for lender rewards, but currently it would only be used with the backup lender, Current.
{% endhint %}

## jeLOOP: your share of the vault

jeLOOP is a normal Sui coin in your wallet. Its value equals your share of the vault's **net asset value (NAV)**, which the contract recalculates on every deposit and withdrawal:

```
NAV = idle USDC in the vault
    + eEARN collateral, valued at Ember's on-chain rate
    + USDC due back from Ember redemptions
    − USDC owed to the lenders
    − withdrawals already requested but not yet paid

jeLOOP price = NAV ÷ total jeLOOP supply
```

The number of jeLOOP you hold doesn't change, but **the price of each jeLOOP moves**:

* **It goes up** when eEARN earns more than the borrowed USDC costs.
* **It goes down** if eEARN loses value, or if borrowing becomes more expensive than eEARN's yield.

New deposits get jeLOOP at the current price. The price therefore isn't 1:1 with USDC: after the vault has earned, 1 USDC buys slightly less than 1 jeLOOP.

How the books stay accurate:

* **Suilend debt** is read directly from Suilend after every operation.
* **Current debt** isn't exposed on-chain, so the vault tracks every borrow and repay and accrues interest itself. The keeper may correct that figure only within tight on-chain bounds: at most 0.1% lower, and never more than 20% APR of growth since the last correction.

## Depositing

1. Open **Ember Loop** in the JewelSwap Sui app (sui.jewelswap.io) and connect a Sui wallet.
2. On the **Deposit** tab, enter a USDC amount. The app shows roughly how much jeLOOP you'll receive.
3. Press **Deposit** and approve in your wallet. The app waits for on-chain confirmation before showing success.

Your USDC first sits in the vault as idle cash. The keeper checks the vault every 10 minutes and levers idle deposits into the position (to about 77.5% LTV). Until then it still counts toward NAV at full value. Idle deposits are never used to pay other people's withdrawals.

{% hint style="info" %}
**Entry fee: 0.45%.** Live since 2026-10-11 (tx `4BomNeEFxTETorHTMNjNrCENd836ZaMDXek6vT25LP98`). The fee stays in the vault for existing holders. It stops **rate-step gaming**: Ember updates eEARN's rate in steps, so someone could deposit just before an update and request a withdrawal just after, taking about 0.45% (one step at 4.5x) from long-term holders. With a 0.45% entry fee plus the 1% withdrawal fee, that trade loses money. The app's deposit estimate includes the fee.
{% endhint %}

There is currently **no deposit limit (TVL cap)**. The admin can set one; deposits above it would be refused.

## Withdrawing

Every withdrawal is a **queued request**. There's no instant withdrawal: idle deposits are always levered, so the vault never pays exits out of other people's new money. Instead the keeper unwinds exactly the slice of the position your withdrawal needs.

| Step              | What happens                                                                                                                                                                                                                                                                                       | Time                                                         |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| **1. Request**    | On the **Withdraw** tab, enter how much jeLOOP to redeem and press **Request withdrawal**. Your jeLOOP is burned and you get a **WithdrawTicket**. The USDC amount is **fixed at that moment**: today's jeLOOP price minus the 1% withdrawal fee. Later price moves don't change what you're owed. | One transaction                                              |
| **2. Processing** | The keeper unwinds that slice of the position: a NAVI flash loan repays part of the Suilend debt, the freed eEARN is sold on Bluefin, and the USDC is set aside for tickets in request order (first in, first out). The leverage of the remaining position doesn't change.                         | Usually **10–30 minutes** (the keeper runs every 10 minutes) |
| **3. Claim**      | When your ticket shows **Ready to claim**, press **Claim** under *Your position* to receive the USDC. Claims keep working even if the vault is paused.                                                                                                                                             | One transaction                                              |

The ticket under *Your position* shows everything about your request:

* the USDC you'll receive and the jeLOOP burned
* the locked price (USDC per jeLOOP, after the exit fee)
* when you requested it
* how much USDC of earlier tickets is still ahead of you
* a progress bar of how much of your ticket is already funded
* links to the ticket object and the request transaction on SuiVision

**Who pays the unwind cost?** You do, through the 1% withdrawal fee. To pay you, the keeper sells about 4.5× your amount of eEARN on Bluefin, at roughly 0.2–0.4% of what it sells, so about 1–1.8% of what you withdraw. The fee stays in the vault and covers that, so holders who stay aren't charged for your exit. The amount on your ticket is fixed; the actual sale cost never changes it.

{% hint style="info" %}
Instant withdrawals are switched off on-chain, not just in the app. Since package v3 the instant `withdraw` function always aborts, and since v4 the vault is version-gated (migrated in tx `4jrdUL8TnuoM1Fnbot2egmu2EmEH93eBdFDAtCZwEdfo`), so older package versions can't touch the vault either.
{% endhint %}

## Leverage tiers (2x / 3x / 4.5x)

The three cards at the top of the page show the estimated net yield at **2x, 3x and 4.5x** with today's rates, and how each compares with the average Sui stablecoin yield. They help you see how leverage changes the return.

**Deposits all go into one vault**, which targets about **4.5x** (77.5% LTV). The contract enforces a maximum LTV of **78%** per lender, which is about 4.5x. Choosing a card changes the estimate you see. It doesn't change your position.

## Safety mechanisms

| Mechanism                 | What it does                                                                                                                                                                                                                                                                                                                        |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Keeper**                | Runs every 10 minutes in JewelSwap's backend. It funds the withdrawal queue, levers idle deposits to \~77.5% LTV, and brings LTV back to 77.5% if interest pushes it above 78.5% (to 60% in de-risk mode). It sends alerts when LTV reaches 80%, when de-risk or pause is on, when tickets wait over an hour, or when a step fails. |
| **On-chain LTV limits**   | The keeper can't lever a lender position above its max LTV (78% today; never above 81% under any settings). A reduce can't leave the position at a higher LTV than before.                                                                                                                                                          |
| **Bounded keeper**        | The keeper can **never send vault funds to an arbitrary address**. When it sells eEARN, the price must be within 1% of Ember's rate. Flash-loan fees are capped at 0.1%.                                                                                                                                                            |
| **Auto de-risk**          | If Ember's on-chain rate shows eEARN **losing value** (a markdown), the vault switches into de-risk mode by itself. No new leverage can be added until the admin reviews it. Reducing leverage and withdrawing keep working.                                                                                                        |
| **Hard parameter limits** | Since package v5, fee, cap and LTV-limit changes by the multisig apply **immediately** (there is no timelock). The contract still enforces hard ceilings: entry and withdrawal fees at most 1%, performance fee at most 20%, and a hard maximum LTV per lender. The TVL cap is currently unset (no cap).                            |
| **Guardian pause**        | A guardian key can pause the vault and switch on de-risk in an emergency. It can't unpause or move funds. While paused, deposits, withdrawal requests and lever-ups stop; reducing leverage and ticket claims keep working.                                                                                                         |
| **Multisig admin**        | Fee and parameter changes, unpausing, clearing de-risk and package upgrades all need **3 of 5** signers on JewelSwap's multisig.                                                                                                                                                                                                    |

**Why an eEARN markdown doesn't directly cause liquidation on Suilend:** Suilend values eEARN at $1 (via the USDC price feed), not at Ember's rate. A markdown hurts jeLOOP's price, but on its own it doesn't push the Suilend loan toward liquidation. The thing that pushes the loan toward liquidation is interest building up on the debt. Because Ember's rate is above $1 (around $1.05), Suilend's books show the loan at a somewhat higher LTV than 78%. That's another reason the keeper needs to keep an eye on the position.

## Fees

| Fee                    | Current                                                                                      | Contract maximum |
| ---------------------- | -------------------------------------------------------------------------------------------- | ---------------- |
| Performance fee        | **10%** of gains, charged only above the jeLOOP price high-water mark, by minting new jeLOOP | 20%              |
| Deposit (entry) fee    | **0.45%** (see [Depositing](#depositing))                                                    | 1%               |
| Withdrawal fee         | **1%** (every withdrawal is queued; covers the unwind)                                       | 1%               |
| Instant withdrawal fee | n/a: instant withdrawals are disabled                                                        | —                |

Entry and withdrawal fees stay in the vault for the remaining holders. The \~0.2% Bluefin cost of unwinding for a withdrawal is also borne by the vault.

The **high-water mark** means you only pay the performance fee on new profits. If the jeLOOP price drops and then recovers, no fee is charged on the recovery back to the previous peak.

## Risks

* **Unaudited, beta contract.** The code hasn't been externally audited. Bugs could cause loss of funds.
* **eEARN can lose value.** eEARN's yield comes from Ember's strategies and can fall or turn negative. At 4.5x, a 1% drop in eEARN's value takes roughly 4.5% off the jeLOOP price.
* **Borrow rates can rise.** If USDC borrowing costs more than eEARN earns, the vault loses money every day, and leverage multiplies the loss.
* **Liquidation.** If the debt grows too large relative to the collateral, the lender can liquidate part of the position at a penalty.
* **Lender and oracle risk.** The vault depends on Suilend, Current, Ember and the Pyth USDC price feed all working correctly.
* **Keeper dependence.** Levering new deposits, unwinding for withdrawals, funding the queue and rebalancing all depend on JewelSwap's keeper. Its power is limited on-chain, but if it stops, idle deposits stay unlevered, the position isn't rebalanced and withdrawal tickets wait.
* **Exit liquidity.** Withdrawals are paid by selling eEARN on Bluefin. A very large withdrawal may need several keeper rounds, and if a sale would cost more than 1% below Ember's rate the contract refuses it, so the ticket waits.
* **Key holders.** Admin and upgrade rights sit with a 3-of-5 multisig. The keeper and guardian are single keys on an operations wallet, and keeper/guardian keys issued by the admin can't be revoked.

## FAQ

**Is jeLOOP worth exactly 1 USDC?** No. jeLOOP is a share of the vault, so its price moves with the vault's NAV. Your **Value** under *Your position* shows what your jeLOOP is worth in USDC right now.

**Can I lose money?** Yes. If eEARN loses value, if borrowing costs more than eEARN earns, or in a liquidation, the jeLOOP price falls, and leverage makes those losses bigger. The contract is also unaudited.

**Do I need to manage the loan or watch my health factor?** No. The loan belongs to the vault, not to you. You hold jeLOOP; the keeper manages leverage within the on-chain limits described above.

**Why isn't there an instant withdrawal?** Idle deposits are always put to work, so the vault never pays one person's exit with another person's new money. Every withdrawal is a request that the keeper funds by unwinding exactly that slice of the position. Your amount is fixed when you request, so the wait doesn't change what you receive.

**How long does a withdrawal take?** Usually 10–30 minutes. The keeper runs every 10 minutes and funds tickets in the order they were created. Your ticket shows how much is ahead of you and how much of it is already funded. Then press **Claim**.

**What happens if the vault is paused?** Deposits, withdrawal requests and new leverage stop. Reducing leverage and claiming funded tickets still work.

**Who can change the fees?** Only the 3-of-5 multisig, and only within the contract's hard ceilings (fees at most 1% entry/withdrawal and 20% performance). Changes apply immediately; there is no timelock.

## Contract addresses (Sui mainnet)

| Object                                       | Address                                                                              |
| -------------------------------------------- | ------------------------------------------------------------------------------------ |
| Package (latest, v5: no timelock)            | `0x8699a1b99872cccd4d427170d2b2df4e548675489a690ab2b80a121e126306ff`                 |
| Package v4 (version gate; app calls go here) | `0x8768bf6e46c5b834611c678181f831d54d563433f14388cc6cc1eb038e73e81e`                 |
| Package v3 (queue-only exits)                | `0x8bd8bc850e62c5d0a66521d1d66a84aec34604d3d2cc9b8fd005a36c44927cef`                 |
| Package v2 (TVL cap not timelocked)          | `0x0d00561d0fd1d6fe03da38050f8d878e1d313611d7f62e694c0b9cc3bd2a3a0d`                 |
| Package (original id, used in type names)    | `0xe735b91dcdfb1a572ce9f0171790bdad4e711e30d682eb4387e1f5642d5ab984`                 |
| Vault                                        | `0x93d1b8bb8e4c1debd62db8845c69d12dff7cf519f834166b378cba517840ac8a`                 |
| jeLOOP coin type                             | `0xe735b91dcdfb1a572ce9f0171790bdad4e711e30d682eb4387e1f5642d5ab984::jeloop::JELOOP` |
| Suilend market (EMBER\_MARKET)               | `0x74d92cb095b618f344486f77bcce87fbffc0fe0b46584bb1828bb291a222dda8`                 |

| Role                | Can do                                                                                                                              | Held by                                                                                        |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| **Admin**           | Set parameters (immediately, within hard ceilings), pause/unpause, clear de-risk, issue keeper/guardian keys, set the fee recipient | JewelSwap 3-of-5 multisig `0x800b0a50a54d26b628d1e971f1dfb8fd8a280e164eff13884cae1f6965b05e70` |
| **Package upgrade** | Upgrade the Move package                                                                                                            | JewelSwap 3-of-5 multisig (same address)                                                       |
| **Keeper**          | Lever, reduce, fund the withdrawal queue, harvest, all within on-chain limits                                                       | JewelSwap operations wallet                                                                    |
| **Guardian**        | Emergency brake only: pause and switch on de-risk                                                                                   | JewelSwap operations wallet                                                                    |

Admin and upgrade rights moved to the multisig on 2026-10-10 (tx `BisB7A6efZvri5jFrRrwveTAtaAZm7rkynAiTrSzvAmN`). The vault is version-gated: it only accepts calls from the package version it was last migrated to (v4 since 2026-10-11), so older versions can't act on it.
