hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
239 stars 270 forks source link

Fee-charging Self-balancing Native Token Warp Route #3661

Open nambrot opened 2 months ago

nambrot commented 2 months ago

A popular use case on top of Hyperlane are ways for the user to easily receive native gas tokens on the destination chain like Merkly's Token Bridge or their Refuel feature.

Hyperlane Warp Routes kind of support that in that you can have a collection of HypNatives on every chain which basically take collateral on the origin chain, and then release the collateral in the same amount on the destination chain. That's the idea behind https://www.nautilusbridge.com/ or https://www.inevmbridge.com/. The issue is that somebody generally need to be managing the collateral when it gets imbalanced.

The goal of this ticket is to create a prototype of HypNative warp route that has a self-balancing mechanism via arbitraguers.

Crude Cross-chain DEX?

You could imagine a mechanism that is done on top of a HypNative with some kind of configured target collateral amount

  1. If the collateral in the contract is higher than the target, allow the contract to charge a spread of lets say 5bp to disincentivize the overcollaterallization (i.e. the transfer redeems less collateral on the destination chain than contributed on the origin chain)
  2. When the collateral is lower than the target, allow the contract to incentivize rebalancing by allowing the depositor to redeem 5bps more.

5bps is arbitrary, you could make these configurable values, or even scale depending on how imbalanced the collateral is in response to target. I'm not actually sure if this model makes sense, in some way it approximates a cross-chain CMM?

Rafa1L commented 4 weeks ago

cool

BIN3135 commented 3 weeks ago

omg

0xlynett commented 2 weeks ago

is this available to claim?