Leveraged positions on decentralized lending platforms
We develop a mathematical framework to optimize leveraged staking (“loopy”) strategies in Decentralized Finance (DeFi), in which a staked asset is supplied as collateral, the underlying is borrowed and re-staked, and the loop can be repeated across multiple lending markets. Exploiting the fact that DeFi borrow rates are deterministic functions of pool utilization, we reduce the multi-market problem to a convex allocation over market exposures and obtain closed-form solutions under three interest-rate models: linear, kinked, and adaptive (Morpho’s AdaptiveCurveIRM). The framework incorporates market-specific leverage limits, utilization-dependent borrowing costs, and transaction fees. Backtests on the Ethereum and Base blockchains using the largest Morpho wstETH/WETH markets (from January 1 to April 1, 2025) show that rebalanced leveraged positions can reach up to 6.2% APY versus 3.1% for unleveraged staking, with strong dependence on position size and rebalancing frequency. Our results provide a mathematical basis for transparent, automated DeFi portfolio optimization.
💡 Research Summary
The paper presents a rigorous mathematical framework for optimizing “loop‑y” leveraged staking strategies in decentralized finance (DeFi). In a typical loop‑y strategy, a user deposits a staking asset (e.g., wstETH) as collateral, borrows the underlying token (e.g., WETH), re‑stakes the borrowed token, and repeats the process across one or more lending markets. While conceptually simple, the presence of market‑specific loan‑to‑value caps, utilization‑dependent borrowing rates, liquidity constraints, and transaction fees makes the allocation problem highly non‑trivial.
The authors start by formalizing a single market i. They denote collateral C_i, borrowed amount B_i, and exposure x_i = C_i – B_i > 0. Leverage is defined as ℓ_i = C_i / (C_i – B_i) ≥ 1, with an upper bound ℓ_max,i = 1/(1 – maxLTV_i). For safety, the practical implementation uses a lower internal cap (e.g., ℓ_max = 5 for wstETH/WETH, well below the theoretical maximum of ≈18).
A key insight is that any leveraged position can be decomposed into a maximally‑leveraged sub‑position (exposure x_1,i) and an unleveraged (pure staking) sub‑position (exposure x_0,i). The transformation
x_1,i = x_i (ℓ_i – 1) / (ℓ_max,i – 1) , x_0,i = x_i (ℓ_max,i – ℓ_i) / (ℓ_max,i – 1)
turns the original non‑convex problem in variables (x_i, ℓ_i) into a convex optimization over (x_0,i, x_1,i). The objective becomes the total cash flow:
Σ_i x_0,i s + Σ_i x_1,i ℓ_max,i s – Σ_i x_1,i (ℓ_max,i – 1) b_i( x_1,i (ℓ_max,i – 1) )
where s is the instantaneous staking yield (≈3 % p.a. for wstETH) and b_i(·) is the borrowing rate as a deterministic function of pool utilization. The authors consider three widely‑used interest‑rate models:
- Linear: b_i(u) = a_i u.
- Kinked: a piecewise‑linear function with a higher slope after a utilization kink u_k.
- AdaptiveCurveIRM (Morpho’s Adaptive Curve): a smooth, convex function that reacts to market conditions.
All three satisfy monotonicity and convexity, guaranteeing that –x b_i(x) is concave. Consequently, the whole problem is a separable concave maximization subject to linear constraints, amenable to standard convex‑optimization techniques.
Introducing a Lagrange multiplier λ for the budget constraint Σ_i (x_0,i + x_1,i) = ξ (total USD capital) yields the KKT condition
ℓ_max,i s – (ℓ_max,i – 1) b_i( x_i (ℓ_max,i – 1) ) + x_i (ℓ_max,i – 1) b_i′(·) = λ
for each market i, where x_i denotes the total exposure allocated to market i (i.e., x_i = x_1,i). Two regimes arise:
- λ = s – the unleveraged component x_0 > 0, meaning the budget is large enough to saturate all markets at their maximal leverage; the residual capital is placed in pure staking.
- λ > s – the unleveraged component vanishes (x_0 = 0); the budget is insufficient to fully saturate all markets, so all capital is allocated to leveraged positions.
For the linear model, λ can be solved analytically because b_i′ is constant. For the kinked model, the solution may lie at the kink; the KKT condition becomes a sub‑gradient inclusion, leading to a closed‑form expression that either sits on the kink or on one side of it. For AdaptiveCurveIRM, the authors propose using Brent’s method (or any reliable 1‑D root‑finder) to obtain λ* numerically, after which each x_i follows directly from the KKT equation.
The algorithm proceeds as follows:
- Set λ = s and compute candidate allocations x_i(λ) from the KKT equation.
- If Σ_i x_i(λ) ≤ ξ, accept the solution and set x_0 = ξ – Σ_i x_i(λ).
- Otherwise, increase λ (e.g., via Brent’s method) until the budget constraint is met; the resulting λ* yields the optimal leveraged allocations with x_0 = 0.
Because each market’s allocation is computed independently given λ, the overall complexity is O(n) for n markets.
Empirical validation: The authors back‑test the framework on real on‑chain data from the largest Morpho wstETH/WETH markets on Ethereum and Base, covering the period 1 Jan 2025 – 1 Apr 2025. Key parameters: maxLTV ≈ 0.945, internal leverage cap ℓ_max = 5, staking yield s ≈ 3 % p.a., and realistic gas fees. They evaluate several leverage multipliers (3×, 4×) and rebalancing frequencies (6 h, 12 h, 24 h). Results show that a properly rebalanced leveraged position can achieve up to 6.2 % APY, roughly double the unleveraged 3.1 % APY. Shorter rebalancing intervals capture utilization‑driven rate changes more accurately, improving the “carry” (s – b_i) and thus overall profit. Larger positions increase pool utilization, raising borrowing rates, but the convex optimization automatically adjusts λ to keep the marginal benefit non‑negative. Transaction costs erode profitability when gas prices spike, highlighting the importance of incorporating fees into the objective.
Contributions:
- Model transformation – By exploiting the deterministic nature of DeFi borrowing curves, the authors convert a non‑convex leverage allocation problem into a convex one.
- Closed‑form solutions – For linear and kinked rate models, analytical expressions for optimal exposures are derived; for AdaptiveCurveIRM a fast numerical scheme is provided.
- Algorithmic simplicity – The λ‑based allocation algorithm is linear in the number of markets and easily implementable in on‑chain or off‑chain bots.
- Real‑world validation – Backtests on major Ethereum and Base markets demonstrate that the framework yields materially higher yields while respecting leverage caps and liquidity constraints.
Limitations & future work: The analysis assumes deterministic rates and ignores stochastic price movements of the collateral relative to the borrowed asset, which can trigger liquidation. Extending the model to incorporate price risk (e.g., via Value‑at‑Risk constraints) and to handle multiple collateral/borrow assets simultaneously would broaden applicability. Moreover, when many agents employ similar leveraged strategies, market impact and game‑theoretic dynamics could alter utilization curves; a multi‑agent extension is suggested.
In summary, the paper delivers a mathematically sound, practically implementable solution for optimizing leveraged staking across multiple DeFi lending platforms, bridging the gap between academic convex‑optimization theory and the fast‑moving world of on‑chain finance.
Comments & Academic Discussion
Loading comments...
Leave a Comment