Get E-Mode category

Get E-Mode category on Aave

Ethereum
Ethereum
Base
Base

Reads onchain state

Ready to run on Base

Finds the E-Mode category an Aave market assigns a collateral and borrow asset pair. Membership lives on the category side of the pool: each category carries a bitmap of the reserves it accepts as collateral and a bitmap of those it lets a position borrow. The categories are scanned on-chain for every one whose bitmaps hold both reserves, and the id with the highest collateral LTV, the category built for the pair, comes back, so the same program lands in the right category for whatever assets reach it. Reach for it when the collateral arrives from an earlier step, like a Pendle market's PT, and coil the id into set E-Mode and the E-Mode config read, so the category stops being a number anyone types.

Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.

More plugs on Base

Borrow on Base · 7 plugs

Earn yield on Base · 12 plugs

More on Aave · 25

On other protocols · 1