Documentation Index
Fetch the complete documentation index at: https://mintlify.com/collinsville22/Sable/llms.txt
Use this file to discover all available pages before exploring further.
Sable Apex
The Apex vault is Sable’s most advanced strategy, combining three yield pillars to maximize diversified BTC returns.Risk Level: 5 (High)
Strategy: 40% Vesu leverage loop + 35% Ekubo WBTC/ETH LP + 25% Endur xWBTC staking
Strategy: 40% Vesu leverage loop + 35% Ekubo WBTC/ETH LP + 25% Endur xWBTC staking
Strategy Overview
Yield Sources
| Pillar | Allocation | Yield Type | APY (Example) |
|---|---|---|---|
| Vesu Leverage | 40% | Lending APY (3x amplified) + BTCFi STRK | 12-18% |
| Ekubo LP | 35% | Swap fees + IL | 8-15% |
| Endur Staking | 25% | Validator rewards + xWBTC appreciation | 5-10% |
| Blended APY | 100% | Weighted average | 9-15% |
Impermanent Loss (IL): Ekubo LP position gains when ETH outperforms BTC, loses when BTC outperforms ETH. This creates natural hedging.
Risk Profile
- High complexity: Three simultaneous strategies increase smart contract risk surface
- Moderate leverage: 40% of deposit uses 3x loop (overall portfolio leverage ~1.3x)
- IL exposure: Ekubo LP loses value if BTC/ETH ratio diverges significantly
- Multi-protocol risk: Depends on Vesu, Ekubo, Endur, and AVNU all working correctly
- Liquidity risk: Ekubo LP withdrawal depends on pool liquidity
Contract Architecture
File:apex.cairo (~1000 LOC)Deployed:
0x071eb7fc3a912c0ee85b1dc795e29fd77ff4203a33384a1171dd4fcb7c7b3df9
Core Components
- Three-Pillar Split
- Ekubo LP Integration
- Total Assets Valuation
Apex auto-splits every deposit into three strategies:From
apex.cairo:1000Key Functions
User Functions
Deposit WBTC and receive yvBTC-APEX sharesParameters:
assets(u256): Amount of WBTC to deposit (8 decimals)receiver(ContractAddress): Address to receive vault shares
Auto-splits deposit:
- 25% → Endur xWBTC staking (instant)
- 35% → Ekubo WBTC/ETH LP (swap half to ETH first)
- 40% → Vesu 3x leverage loop (deposit → borrow → swap → repeat)
Burn shares and withdraw WBTCParameters:
assets(u256): Amount of WBTC to withdrawreceiver(ContractAddress): Address to receive WBTCowner(ContractAddress): Share owner
Curator Functions (Pillar 1: Vesu Leverage)
Execute one Vesu leverage loop (deposit WBTC → borrow USDC → swap → re-deposit)Parameters:Implementation at
collateral_amount(u256): WBTC to depositborrow_amount(u256): USDC to borrowmin_swap_out(u256): Minimum WBTC from USDC swaproutes(Array<Route>): AVNU swap routes
apex.cairo:379Reduce Vesu leverage (repay USDC debt + withdraw WBTC collateral)Parameters:Implementation at
repay_amount(u256): USDC to repaywithdraw_collateral(u256): WBTC to withdraw
apex.cairo:449Atomically close all Vesu leveraged positions via flash loanParameters:Implementation at
wbtc_to_sell(u256): WBTC to swap for USDC flash loan repaymentmin_usdc_out(u256): Minimum USDC from swaproutes(Array<Route>): AVNU swap routes
apex.cairo:668Curator Functions (Pillar 2: Ekubo LP)
Deploy WBTC to Ekubo WBTC/ETH concentrated liquidity LPParameters:Implementation at
wbtc_amount(u256): WBTC to deployeth_min_out(u256): Minimum ETH from half WBTC swaproutes(Array<Route>): AVNU WBTC→ETH swap routespool_key(PoolKey): Ekubo pool identifier (token0, token1, fee, tick_spacing, extension)bounds(Bounds): LP tick range (lower, upper)min_liquidity(u128): Minimum liquidity to mint (slippage protection)
apex.cairo:501Ekubo Pattern: Transfers tokens to Positions contract, then calls
mint_and_deposit or deposit. Positions reads balanceOf(positions_address) internally.Withdraw liquidity from Ekubo LP positionParameters:Implementation at
liquidity(u128): Liquidity units to withdrawpool_key(PoolKey): Same as used indeploy_to_ekubobounds(Bounds): Same tick rangemin_token0(u128): Minimum WBTC output (slippage protection)min_token1(u128): Minimum ETH output
apex.cairo:563Returns WBTC + ETH to vault. Curator must swap ETH → WBTC separately if needed.Curator Functions (Pillar 3: Endur Staking)
Stake idle WBTC into Endur vaultParameters:Implementation at
amount(u256): WBTC to stake
apex.cairo:600Swap all idle xWBTC → WBTC via AVNU (bypasses 7-day Endur queue)Parameters:Implementation at
min_amount_out(u256): Minimum WBTC from xWBTC swaproutes(Array<Route>): AVNU xWBTC→WBTC swap routes
apex.cairo:691Integration with External Protocols
Vesu PRIME Pool (Pillar 1)
Pool ID:0x0451fe483d5921a2919ddd81d0de6696669bccdacd859f72a4fba7656b97c3b5
Apex uses Vesu PRIME for leverage loops (same as Turbo vault):
- Collateral: WBTC
- Debt: USDC
- Strategy: 3x loop (deposit → borrow → swap → repeat)
Ekubo WBTC/ETH Pool (Pillar 2)
Pool Key:- Core:
0x00000005dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b - Positions (NFT):
ekubo_positions(constructor parameter)
get_token_info:
apex.cairo:936
Endur xWBTC Vault (Pillar 3)
Address:endur_vault (constructor parameter)
Apex stakes WBTC via Endur’s ERC-4626 vault:
AVNU Swap Routes
Apex uses AVNU for all swaps:- USDC → WBTC (Vesu leverage loop)
- WBTC → ETH (Ekubo LP deploy)
- ETH → WBTC (Ekubo LP unwind)
- xWBTC → WBTC (Endur unwind)
- WBTC → USDC (Flash loan repayment)
Example Usage
Depositing WBTC
Checking Three-Pillar Allocation
Reading Ekubo LP Live Value
Security Considerations
Risks
Risk Mitigation
- Diversification: Three uncorrelated yield sources reduce single-point-of-failure risk
- Conservative Vesu allocation: Only 40% uses leverage (not 100%)
- Narrow Ekubo range: Concentrated liquidity maximizes fees, limits IL exposure
- xWBTC swap escape: AVNU bypass for Endur’s 7-day withdrawal queue
- Pause mechanism: Owner can halt deposits if any pillar fails
- Live valuation:
total_assetsreads on-chain state from all three protocols