astroport-fi / astroport-core

Astroport DEX core contracts
https://astroport.fi/
GNU General Public License v3.0
153 stars 105 forks source link

fix(xyk): custom migration endpoint to recover LP tokens #394

Closed epanchee closed 10 months ago

epanchee commented 10 months ago

Add custom migration endpoint in XYK pair. It only meant to recover burned LP tokens preserving current percentage in share per holder but increasing LP number. From ridiculously small number like 1027 to 511634563115 (math.sqrt(1660693997890 unewt * 157626827403 untrn)). This migration enables LPing in pair while pair contract itself stays the major LP holder.

This implementation will never become official XYK code id in Astroport factory.