curvefi / curve-contract

Vyper contracts used in Curve.fi exchange pools.
https://www.curve.fi/
Other
1.03k stars 384 forks source link

Forex based currency swap #142

Open minqin opened 3 years ago

minqin commented 3 years ago

Hi Curve Project,

This is Min, a developer working in the traditional Quant / high frequency trading industry.

We just launched a new asset backed stablecoin in Hong Kong ( https://onecash.asia/), including HKD, CNH and JPY. I'm wondering if it's possible to add currency liquidity pool on curve fi

In your design, the core formula is this: Sum (Xi * Wi ) = const.

If you use a forex rate from oracle as Wi, it will become a nice forex swap liquidity pool very naturally.

minqin commented 3 years ago

For example, if CNHC/USDC forex rate is 6.5,
Then: Weight (CNHC) = 6.5 / (6.5+1) Weight (USDC) = 1 / (6.5+1)

It will enforce 1 USDC has corresponding 6.5 CNHC in the pool, if not, there is arbitrage opportunity

MODERATOR10 commented 2 years ago

Hello @minqin please explain further and state how this can benefit us