0.2.1 • Published 11 months ago

@helios-lang/minswap v0.2.1

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
11 months ago

minswap

WASM-free library for querying Minswap DEX token prices

Minswap prices are based on the ratio of liquidity pool reserves. These reserves are tracked in the datum of a Pool UTxO.

V2 Mainnet

For V2 pools, these pool UTxOs are located at the validator with hash: ea07b733d932129c378af627436e7cbc2ef0bf96e0036bb51b3bde6b

Each Pool UTxO contains the following a token with the following assetclass: f5808c2c990d86da54bfc97d89cee6efa20cd8461616359478d96b4c.4d5350 (tokenname MSP i.e. MinSwapPool)

Pool datum structure

PoolData = ConstrData(0, [
    stakingCredential: ConstrData(0, [
        poolBatchingStakeCredential: LucidCredentialData
    ]) // 0
    assetA: AssetData // 1
    assetB: AssetData // 2
    totalLiquidity: IntData // 3
    reserveA: IntData // 4
    reserveB: IntData // 5
    baseFeeA: IntData // 6
    baseFeeB: IntData // 7
    feeSharing: OptionData<IntData> // 8
    allowDynamicFee: BoolData // 9
])

AssetData = ConstrData(0, [ByteArrayData, ByteArrayData])
OptionData<T> = ConstrData(0, [T]) | ConstrData(1, [])
BoolData = ConstrData(0, []) | ConstrData(1, []) // 0 is false, 1 is true
0.2.1

11 months ago

0.2.0

12 months ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago