MCPcopy Create free account
hub / github.com/Sifchain/sifnode / ExtractDebt

Method ExtractDebt

x/clp/types/types.go:96–107  ·  view source on GitHub ↗
(X, Y sdk.Uint, toRowan bool)

Source from the content-addressed store, hash-verified

94}
95
96func (p *Pool) ExtractDebt(X, Y sdk.Uint, toRowan bool) (sdk.Uint, sdk.Uint) {
97
98 if toRowan {
99 Y = Y.Add(p.NativeLiabilities)
100 X = X.Add(p.ExternalLiabilities)
101 } else {
102 X = X.Add(p.NativeLiabilities)
103 Y = Y.Add(p.ExternalLiabilities)
104 }
105
106 return X, Y
107}
108
109func StringCompare(a, b string) bool {
110 return a == b

Callers 15

CLPCalcSwapMethod · 0.80
AddLiquidityMethod · 0.80
RemoveLiquidityUnitsMethod · 0.80
RemoveLiquidityMethod · 0.80
CalcSpotPriceNativeFunction · 0.80
CalcSpotPriceExternalFunction · 0.80
CalcRowanSpotPriceFunction · 0.80
CalculateAllAssetsForLPFunction · 0.80
SwapOneFunction · 0.80

Calls 1

AddMethod · 0.80