Emode
How Efficiency Mode (Emode) enhances borrowing power for correlated asset pairs on Project 0.
Efficiency Mode (Emode) allows users to enjoy higher borrowing power when working with correlated asset pairs. For example, when using an LST as collateral to borrow SOL, Emode provides a much higher LTV than borrowing an unrelated asset like USDC.
How Emode Works
Each Bank on P0 can be configured with Emode entries that specify preferential asset weights for specific borrowing pairings. When a user's lending and borrowing positions match an Emode configuration, the enhanced weights are automatically applied.
Key Differences vs Aave
- Opt-in by default. P0 does not require users to enable Emode. Users automatically get the most preferential Emode setting that applies to their account.
- Opt-out by borrowing something else. Aave requires you to disable Emode before borrowing a non-preferential asset. On P0, you can enter or exit Emode simply by changing which assets you are borrowing. All assets remain available to borrow, but borrowing a non-preferential asset can significantly reduce account health (and repaying one can significantly increase it).
Worst-Case Across Liabilities
Users who borrow multiple assets at the same time get the least favorable treatment across all borrowed assets, regardless of the amount of each asset borrowed. For example, if borrowing an LST and USDC against SOL, the user would normally get an Emode benefit for LST/SOL, but since they are also borrowing USDC, they get only standard rates on the SOL they are lending.
A user currently lending SOL and borrowing LST who wants to also borrow USDT must have enough account health to support both the LST and USDT borrow without any Emode advantage.
Emode Tags and Configuration
Emode Tag
An arbitrary number (1 to 65,535) assigned to each Bank by the admin. Multiple Banks can share the same tag. By convention, tags use the asset name in l337sp34k: SOL is 501, LST is 157, etc. If the name does not fit into range, use your imagination.
Emode Config
A Bank's collection of Emode Entries.
Emode Entry
A tag to treat as a preferential asset, along with the initial and maintenance asset weights to use when lending that asset.
The Key Nuance: Configure the BORROWING Bank
One of the biggest subtleties: Emode is always configured on the BORROWING bank, not the LENDING bank. For example, if you want users to borrow more SOL against some LST, you configure the SOL Bank. If you want users to borrow more WIF against BONK, you configure the WIF Bank.
Emode can never reduce a Bank's weights. The Bank's configured weight is always the minimum; attempts to configure an Emode entry below the Bank's weights will simply do nothing.
Configuration Matrix Example
Consider this set of pairings (LENDING is what users deposit, BORROWING is what they borrow against it):
LENDING | NORMAL RATE | BORROWING | EMODE RATE
SOL .8 LST_A .9
SOL .8 LST_B .9
SOL .8 LST_C .85
SOL .8 LST_D .85
LST_A .6 SOL .8
LST_B .6 SOL .8
LST_C .6 SOL .8
LST_D .6 SOL .8
USDC .9 USDT .95
USDT .9 USDC .95From the above, we have four unique pairings and need at least four tags: SOL, LST_AB, LST_CD, STABLE. We also have four unique rates: LEND_SOL_BORROW_LST_AB (.9), LEND_SOL_BORROW_LST_CD (.85), LEND_LST_BORROW_SOL (.8), LEND_STABLE_BORROW_STABLE (.95).
The resulting Emode configuration:
bank: SOL_BANK
tag: SOL
entries: [LST_AB -> LEND_LST_BORROW_SOL, LST_CD -> LEND_LST_BORROW_SOL]
bank: LST_A_BANK, tag: LST_AB, entries: [SOL -> LEND_SOL_BORROW_LST_AB]
bank: LST_B_BANK, tag: LST_AB, entries: [SOL -> LEND_SOL_BORROW_LST_AB]
bank: LST_C_BANK, tag: LST_CD, entries: [SOL -> LEND_SOL_BORROW_LST_CD]
bank: LST_D_BANK, tag: LST_CD, entries: [SOL -> LEND_SOL_BORROW_LST_CD]
bank: USDC_BANK, tag: STABLE, entries: [STABLE -> LEND_STABLE_BORROW_STABLE]
bank: USDT_BANK, tag: STABLE, entries: [STABLE -> LEND_STABLE_BORROW_STABLE]Note: A Bank can have an Emode entry for its own tag, but you can never borrow from a Bank you are already lending into.
Worked Examples
User lending SOL and borrowing LST_A
- Look at SOL_BANK to see what tag it has: SOL
- Look at LST_A_BANK to read the rate for tag SOL: LEND_SOL_BORROW_LST_AB (.9)
Result: .9
User lending SOL and borrowing LST_A and LST_C
- Look at SOL_BANK to see what tag it has: SOL
- Look at LST_A_BANK to read the rate for tag SOL: LEND_SOL_BORROW_LST_AB (.9)
- Look at LST_C_BANK to read the rate for tag SOL: LEND_SOL_BORROW_LST_CD (.85)
- Take the smallest of the two rates: min(.9, .85) = .85
Result: .85
User lending SOL and borrowing LST_A and USDT
- Look at SOL_BANK to see what tag it has: SOL
- Look at LST_A_BANK to read the rate for tag SOL: LEND_SOL_BORROW_LST_AB (.9)
- Look at USDT_BANK to read the rate for tag SOL: it does not have one.
- Since one of the borrowing assets does not have an entry, fall back to SOL Bank's NORMAL RATE (.8).
Result: .8
User lending SOL and LST_A and borrowing LST_C
- Look at SOL_BANK to see what tag it has: SOL
- Look at LST_A_BANK to see what tag it has: LST_AB
- Look at LST_C_BANK to read the rate for tag SOL: LEND_SOL_BORROW_LST_CD (.85)
- Look at LST_C_BANK to read the rate for tag LST_AB: it does not have one.
- SOL is treated at LEND_SOL_BORROW_LST_CD (.85) while LST_A is treated at the NORMAL RATE (.6)
Result: .85 for SOL and .6 for LST_A
Using Multiple Accounts
Because Emode benefits depend on the combination of all positions in an Account, users with diverse strategies may benefit from separate Accounts:
- Account 1: Lend SOL, borrow LST (Emode active, high LTV)
- Account 2: Lend USDC, borrow USDT (Emode active, high LTV)
- Account 3: Lend SOL, borrow USDC (no Emode, standard weights)
This prevents a non-preferential borrow in one strategy from degrading the Emode benefits in another.
Emode for Isolated Assets (Not Yet Implemented)
Isolated assets normally have an asset weight of zero. Once implemented, Emode will be able to grant an Isolated asset a non-zero weight in specific preferential pairings. This would be useful for highly correlated but otherwise risky assets. For example, a prediction market's YES/NO tokens could receive Emode benefits against each other for position hedging while remaining worthless as general collateral.
Emode Cloning
When listing a new asset that should inherit another asset's Emode settings (e.g. a new LST that should copy existing LST/SOL settings), the Emode admin or Group admin can use the emode_clone instruction to copy Emode settings from one Bank to another.
The configBankEmode instruction is large: only two can fit in one transaction. When updating more than two Banks, use a Jito bundle of several transactions.
For developer-level Emode configuration details and TypeScript examples, see the guides on GitHub.