Skip to content

Add design doc on using Hydro vault shares as solver collateral#14

Open
p-offtermatt wants to merge 2 commits into
iqlusioninc:mainfrom
p-offtermatt:ph/vault-shares-as-solver-bond
Open

Add design doc on using Hydro vault shares as solver collateral#14
p-offtermatt wants to merge 2 commits into
iqlusioninc:mainfrom
p-offtermatt:ph/vault-shares-as-solver-bond

Conversation

@p-offtermatt
Copy link
Copy Markdown

This PR adds a quick design doc on how Inflow vault shares can be used as solver collateral.

The primary challenge is in querying the value of the vault shares, potentially across chains, this gives an idea of it.
I am using a new query I am proposing for the Inflow contracts here, so this part is not in production on Inflow yet; it makes the implementation a bit more straightforward and we likely want this in Hydro anyways.

I saw there is a PR already for allowing bonds with different tokens, I didn't take that into account here but shouldn't be too hard to adjust to it.

A piece of future work is to Integrate vault shares into solving: Shares can be liquidated by withdrawing from the vaults if there is sufficient liquidity for instant withdrawal, which solvers might want to use to trade the shares, e.g. during a solver bond liquidation of vault shares.

zmanian added a commit that referenced this pull request Jan 5, 2026
Design doc for a trait-based system supporting multiple collateral types:
- Native tokens (ATOM) - 0% haircut
- LSM shares - 10% haircut, staking module queries
- Hydro vault shares - 20% haircut, ICQ for cross-chain

Key features:
- Hybrid valuation: on-chain for same-chain, cached ICQ for cross-chain
- Per-settlement 1.5x locking with solver-chosen asset class
- Liquidation via intent auction for non-native collateral
- Hard block on stale cross-chain data (1 hour max)

Unifies PR #14 (Hydro vaults) with LSM share support under single framework.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@zmanian
Copy link
Copy Markdown
Contributor

zmanian commented Jan 5, 2026

Hey Philip, this is great work - the valuation infrastructure for vault shares is exactly what we need.

I've now landed two complementary design docs that build on your approach:

  1. Solver Bond Redesign: Per-Settlement Locking with LSM Support - Covers the 1.5x per-settlement locking mechanism and LSM shares as collateral

  2. Collateral Valuation Trait: Unified Multi-Asset Bond System - Unifies Hydro vault shares and LSM shares under a single CollateralValuation trait

Unified Design

The key insight is that both Hydro vault shares and LSM shares use ratio-based valuation:

// Hydro: share_value = amount × (total_pool_value / total_shares_issued)
// LSM:   share_value = amount × (validator.tokens / validator.shares)

This lets us abstract both behind a common trait:

pub trait CollateralValuation {
    fn get_raw_value(&self, deps: Deps, env: &Env, amount: Uint128) -> Result<Uint128, ContractError>;
    fn haircut_bps(&self) -> u64;
    fn get_collateral_value(&self, ...) -> Result<Uint128, ContractError>;
    fn is_liquidatable(&self, deps: Deps) -> bool;
    fn asset_class(&self) -> AssetClass;
}

Design Decisions

Aspect Your Design Unified Design
Valuation ControlCenterPoolInfo query Same, plus staking module query for LSM
Haircut Configurable collateral_ratio_bps Fixed per asset class (simpler): Native 0%, LSM 10%, Hydro 20%
Cross-chain ICQ with caching Same approach, hard block on stale data (>1 hour)
Per-settlement locking Not covered 1.5x of fill value, solver chooses which asset
Liquidation Out of scope Via intent auction, always to ATOM

Liquidation Flow

This solves the "out of scope" piece from your PR:

Slash triggered → Collateral seized → Liquidation intent created →
Solvers bid to buy vault shares/LSM for ATOM →
User receives liquid ATOM when intent settles

Same mechanism works for both Hydro vault shares and LSM shares - no separate liquidation logic needed.

Suggested Next Steps

  1. Merge your PR as the foundation for Hydro vault support
  2. I'll add the CollateralValuation trait that wraps your AcceptedVaultShare registry
  3. Add LSM implementation using the same trait pattern
  4. Integrate per-settlement 1.5x locking from the bond redesign
  5. Implement liquidation intents for non-native collateral

Happy to sync on the trait interface if you want to iterate on the design. The combination gives us a comprehensive collateral system that supports yield-bearing assets from both the Hydro ecosystem and native Hub staking.

@p-offtermatt
Copy link
Copy Markdown
Author

Yep this is great! Feel free to merge when you think this is ready, the generalization to both types of tokens looks like what I expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants