Skip to content

[Closed in favour of !2620] POLCycle synth utilization rather than synth liability

My impression is that synth utilisation is SynthSupply / BalanceAsset while synth liability is SynthUnits / PoolUnits,
with synth liability being equal to (0.5 * SynthSupply) / BalanceAsset , always being half of synth utilisation.

The MaxSynthPerAssetDepth Mimir value is synth utilisation above which synth minting is not permitted, SynthSupply / BalanceAsset ,
my impression being that POLSynthUtilization (the target synth utilisation) is in the same terms.

Note the 'Synth Utilisation' and 'Synth Liability' tables here
( https://dashboards.ninerealms.com/#thorchain-30d )
and how they have an exact 2-to-1 ratio.

In essence, this MR is to propose that POLCycle's
utilization := common.GetUncappedShare(pool.SynthUnits, pool.GetPoolUnits(), cosmos.NewUint(10_000))
be changed to
utilization := common.GetUncappedShare(synthSupply, pool.BalanceAsset, cosmos.NewUint(10_000)) .

Also note that despite the use of GetUncappedShare, due to
https://gitlab.com/thorchain/thornode/-/blob/v1.97.0/x/thorchain/types/type_pool.go#L72-74

func (m *Pool) GetPoolUnits() cosmos.Uint {
    return m.LPUnits.Add(m.SynthUnits)
}

SynthUnits cannot exceed PoolUnits, and so the current code cannot recognise a synth utilisation above 10000 basis points
(a situation in which a pool's synth supply exceeds its asset balance).

Merge request reports

Loading