SyBTC hedge mm strategy
Backtest Period: [To be populated from data]
Pool: Uniswap V3 WBTC/WETH 0.05%
1. EXECUTIVE SUMMARY
SyBTC Strategy A is a concentrated liquidity market making strategy on Uniswap V3 that earns swap fees while maintaining delta-neutral exposure through Aave V3 hedging. The strategy deploys capital across 403 narrow price ranges and automatically rebalances when price exits the active range, compounding fees to maximize returns.
2. STRATEGY OVERVIEW
Concentrated liquidity market making on Uniswap V3 WBTC/WETH pool with delta-neutral hedge via Aave V3.
Profit Formula:
2.2 Architecture
2.3 Two-Leg Breakdown
MM Leg:
Deploys 2/3 of capital into Uniswap V3
403 pre-configured positions, each 10 ticks wide
Earns 0.05% swap fees when in range
Rebalances only when price exits range
Hedge Leg:
Deposits 1/3 of capital as WBTC collateral on Aave
Borrows WETH to match MM's WETH exposure
Rebalances only when LTV >= 60% (liquidation protection)
3. MATHEMATICAL FOUNDATION
3.1 Price Mechanics
Tick to Price Conversion:
Price Normalization (sqrtPriceX96):
3.2 Capital Allocation Constraint
Safety Bound Derivation:
For a strategy benchmarked to WBTC with LTV target l:
Note: The mathematical safety bound limits LP allocation to 33.3% for LTV=50%.
3.3 Liquidity Optimization
Goal: Maximize liquidity given single-token budget
Mathematical Formulation:
Solution Approach: The optimization is solved numerically using bounded scalar optimization over the token0 budget allocation.
Example:
3.4 Hedge Mechanics
LTV Calculation:
Leverage:
Target vs Emergency:
3.5 Equity Calculations
MM Leg Equity:
Hedge Leg Equity:
Net Equity:
3.6 Exposure Calculations
Token0 (WBTC) Exposure:
Token1 (WETH) Exposure:
Verification:
3.7 Fee Accrual
Fee Formula:
Step-by-Step Example:
4. REBALANCE LOGIC
4.1 Decision Framework
4.2 Trigger Conditions
Leg
Trigger
Condition
Action
tick < lower_tick OR tick >= upper_tick
abs(amount1_mm - debt) / amount1_mm > threshold
Key Design Decision:
MM and Hedge rebalance independently
Hedge only rebalance on upper LTV bound breach (not lower)
No rebalance on exposure drift alone
4.3 MM Leg Rebalance Flow
4.4 Hedge Leg Rebalance Flow
4.5 Transaction Costs
Cost Components:
Every swap (Uniswap pool)
Aave/Balancer (typically)
Cost Example (MM Rebalance):
Monthly Cost Estimate:
5. OPERATIONAL PARAMETERS
5.1 Position Architecture
~0.1% price coverage each
No gaps between positions
Total span: 4,030 ticks (~40%)
Position Distribution:
5.2 Capital Allocation Matrix
Phase
MM Leg %
Hedge Leg %
Total Deployed
5.3 Risk Parameters
Optimal capital efficiency
10-13% buffer before liquidation
5.4 Fee Handling
Accumulation:
Fees tracked per token: fee_token0_accum, fee_token1_accum
Updated on every swap while in range
Fees remain in pool until collected
Collection:
Collected during MM rebalance (when removing liquidity)
Added to available capital for new position
Effectively compounds into strategy
Fee Impact on Returns:
6. BACKTEST VALIDATION
6.1 Methodology
Data Source: production.uniswap_v3_swap Period: [Start Date] to [End Date] Swaps Analyzed: [N] Simulation Parameters:
Borrow APY: [X]% (from Aave historical)
No gas costs (Arbitrum negligible)
Summary Table:
6.3 Rebalance Analysis
Frequency Statistics:
Longest Streak w/o Rebalance
Cost Attribution:
Cost Type
Total (WBTC)
% of Fees
% of Equity
Month
Fees Earned
Borrow Cost
Trans. Cost
Net Return
Rebalances
Max LTV
6.5 Scenario Analysis
BEST CASE: [Date Range]
Market Conditions:
Low volatility (stable price)
Performance:
WORST CASE: [Date Range]
Market Conditions:
Choppy price action (whipsaw)
Performance:
TYPICAL CASE: Average Period
Market Conditions:
Occasional range crossings
Performance:
7. LIVE TRADING CONSIDERATIONS
7.1 System Architecture
7.2 Event Processing Flow
7.3 State Monitoring
Critical Metrics (Updated every swap):
Active position liquidity
WETH exposure (should be ~0)
Data Sources:
Uniswap V3 Pool (slot0 for tick/sqrtPrice)
NFPM (positions for liquidity)
Chainlink (WBTC/USD, ETH/USD prices)
Aave (aWBTC balance, debtToken balance)
7.4 Transaction Construction
Batch Operations: Multiple operations batched into single transaction via merkle verification:
MM Rebalance Only:
Decrease liquidity (remove from old range)
Increase liquidity (add to new range)
Hedge Rebalance Only:
Withdraw/supply collateral
7.5 Execution Considerations
Gas Management:
Arbitrum gas estimation: ~0.5-2 gwei
Transaction limit: 8M gas
Priority fee: 0 (Arbitrum uses base fee only)
Timing:
State fetch: ~100-200ms (multicall)
Submission: ~2-5s (relayer latency)
Failure Modes:
Slippage exceeded: Retry with higher tolerance
Gas spike: Skip non-critical rebalances
Relayer failure: Fallback to direct RPC
Stale price: Use last known good price
7.6 Operational Checklist
Daily:
[ ] Verify swap events processing
[ ] Check LTV is within bounds (< 55%)
[ ] Confirm active position in range
[ ] Review rebalance history
[ ] Check gas costs vs budget
Weekly:
[ ] Analyze fee accumulation rate
[ ] Review hedge effectiveness
[ ] Check oracle prices vs market
[ ] Verify circuit breakers
[ ] Update performance metrics
Monthly:
[ ] Full strategy health review
[ ] Compare live vs backtest
[ ] Parameter tuning assessment
8. RISK MANAGEMENT
8.1 Risk Matrix
Risk
Likelihood
Impact
Mitigation Strategy
60% LTV circuit breaker; 10-13% buffer
Multi-source validation; pause on >2% divergence
Rebalance rate limiter; >5/hour = cooldown
Drawdown pause; manual review required
Gas checks; skip non-critical rebalances
Audits; gradual rollout; insurance
8.2 Circuit Breakers (Detailed)
Breaker
Threshold
Immediate Action
Recovery
- Pause all rebalancing
- Allow ONLY deleverage
- Alert critical
Manual review + gradual restart
- Pause 60 minutes
- Hedge-only mode
- Alert warning
Auto resume after cooldown
- Full pause
- Investigation mode
- Log forensics
Manual investigation required
- Skip MM rebalances
- Allow hedge if LTV >= 60%
- Log skip events
Auto resume when < 5 gwei
- 30-minute cooldown
- Skip non-urgent
- Alert churn warning
Auto resume after cooldown
- Full stop all operations
- Alert all stakeholders
- Lock state
8.3 Emergency Procedures
Scenario: LTV approaching 60%
9. CONFIGURATION & DEPLOYMENT
9.1 Parameter Reference
Config
Current
Range
Description
Max slippage (basis points)
MM leg capital allocation
9.2 Tuning Guidelines
Conservative Settings:
Result: Lower returns, lower risk
Aggressive Settings:
Result: Higher returns, higher risk
9.3 Deployment Checklist
Pre-Deployment:
[ ] All 403 NFT positions minted
[ ] Aave markets activated
[ ] Merkle tree leafs generated
[ ] Emergency multisig configured
[ ] Monitoring dashboards ready
[ ] Discord webhooks tested
Initial Capital:
[ ] 10 WBTC deposited to vault
[ ] 2/3 allocated to MM leg
[ ] 1/3 allocated to Hedge leg
[ ] Zero WETH exposure confirmed
Post-Deployment:
[ ] Fees accruing correctly
[ ] Rebalance triggers working
[ ] Emergency pause tested
Smallest price increment in Uniswap V3 (0.01%)
Loan-to-Value ratio; debt divided by collateral
Abstract measure of position size in AMM
Price bounds where position earns fees
Adjusting position to maintain strategy parameters
Exposure to underlying asset price movement
Value lost vs holding due to price changes
Offsetting position to reduce risk
Uncollateralized loan repaid in same transaction
Difference between expected and executed price
Negligible token amounts below useful threshold
Excessive rebalancing due to volatility
10.3 Key File References
run_backtest(), compute_rebalance()
compute_rebalance(), tick_to_price()
on_swap_event(), execute_rebalance()
increase_position(), decrease_position()
PositionReader, constants
Updated documentation with ASCII diagrams, mathematical foundations, and live trading considerations
END OF DOCUMENT