How it works
A standard Z Lend interaction follows the RelayAdapter pattern, the same way Z Trade does:- Supply. A user supplies an asset from a shielded balance into Z Lend. The adapter unshields the supplied amount, calls the lending market contract to record the supply position, and the market issues an interest-bearing position back into the ShieldedPool as a new note. The user’s supply earns yield as the market accrues interest.
- Borrow. A user with a supplied position can borrow against it. The borrow operation is similarly mediated by the RelayAdapter: the borrowed asset is unshielded into the user’s destination (typically reshielded back into a different note) and a debt position is recorded against the user’s collateral.
- Repay and withdraw. Reversing the operations: repayment closes a debt position; withdrawal frees up supplied collateral.
Revenue model
Z Lend earns revenue from the interest spread between borrowers and suppliers, the standard lending-market economics. A portion of the spread accrues to suppliers as yield; a portion is retained by the protocol. Liquidations (described below) also produce a small fee that goes to the liquidator and the protocol.Health factor and liquidation
A position’s health factor is the ratio of the collateral’s risk-adjusted value to the outstanding debt. The market maintains liquidation thresholds per asset; if a position’s health factor falls below 1.0, the position becomes eligible for liquidation. Liquidation is performed by external actors (liquidators) who repay a portion of the debt in exchange for a discount on the collateral. The privacy property is preserved through the same RelayAdapter mechanics. A liquidator does not learn the identity of the liquidated borrower; they see the liquidatable position as opaque collateral.Sample use case
An agent operating a treasury wants to earn yield on idle USDC without revealing the treasury’s positions to competitors. The agent:- Holds USDC inside the ShieldedPool.
- Supplies USDC to Z Lend via the RelayAdapter. The supply earns yield.
- Borrows against the position when liquidity is needed, again through the RelayAdapter, into a separate shielded position.
- Repays and withdraws as the treasury’s needs shift.