charli3_dendrite 1.6.16.dev0__tar.gz → 1.6.17.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/PKG-INFO +1 -1
  2. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/pyproject.toml +2 -2
  3. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/sundae_v4.py +132 -221
  4. charli3_dendrite-1.6.17.dev0/src/charli3_dendrite/dexs/amm/sundae_v4_banded_cl_math.py +812 -0
  5. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/sundae_v4_deployments.json +23 -8
  6. charli3_dendrite-1.6.16.dev0/src/charli3_dendrite/dexs/amm/sundae_v4_banded_cl_math.py +0 -874
  7. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/LICENSE +0 -0
  8. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/README.md +0 -0
  9. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/__init__.py +0 -0
  10. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/backend/__init__.py +0 -0
  11. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/backend/backend_base.py +0 -0
  12. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/backend/blockfrost/__init__.py +0 -0
  13. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/backend/blockfrost/models.py +0 -0
  14. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/backend/dbsync/__init__.py +0 -0
  15. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/backend/dbsync/models.py +0 -0
  16. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/backend/ogmios_kupo/__init__.py +0 -0
  17. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/backend/ogmios_kupo/models.py +0 -0
  18. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/backend/utils.py +0 -0
  19. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dataclasses/__init__.py +0 -0
  20. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dataclasses/datums.py +0 -0
  21. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dataclasses/models.py +0 -0
  22. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/__init__.py +0 -0
  23. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/__init__.py +0 -0
  24. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/amm_base.py +0 -0
  25. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/amm_types.py +0 -0
  26. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/cswap.py +0 -0
  27. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/dano.py +0 -0
  28. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/minswap.py +0 -0
  29. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/muesli.py +0 -0
  30. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/multi_asset.py +0 -0
  31. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/spectrum.py +0 -0
  32. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/splash.py +0 -0
  33. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/sundae.py +0 -0
  34. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/sundae_v4_stableswap_math.py +0 -0
  35. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/vyfi.py +0 -0
  36. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/amm/wingriders.py +0 -0
  37. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/core/__init__.py +0 -0
  38. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/core/base.py +0 -0
  39. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/core/errors.py +0 -0
  40. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/ob/__init__.py +0 -0
  41. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/ob/axo.py +0 -0
  42. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/ob/cardanoswaps.py +0 -0
  43. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/ob/cardanoswaps_two_way.py +0 -0
  44. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/ob/chadswap.py +0 -0
  45. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/ob/djed.py +0 -0
  46. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/ob/geniusyield.py +0 -0
  47. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/ob/ob_base.py +0 -0
  48. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/dexs/ob/saturnswap.py +0 -0
  49. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/__init__.py +0 -0
  50. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/base.py +0 -0
  51. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/builtins.py +0 -0
  52. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/__init__.py +0 -0
  53. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/constants.py +0 -0
  54. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/datums.py +0 -0
  55. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/loader.py +0 -0
  56. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/market.py +0 -0
  57. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/math.py +0 -0
  58. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/__init__.py +0 -0
  59. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/aggregator.py +0 -0
  60. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/aggregator_datums.py +0 -0
  61. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/deployments.py +0 -0
  62. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/forward.py +0 -0
  63. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/leaves.py +0 -0
  64. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/locator.py +0 -0
  65. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/lp_pricing.py +0 -0
  66. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/recipes.json +0 -0
  67. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/redeemer.py +0 -0
  68. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/reproduce.py +0 -0
  69. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/oracles/structured_datums.py +0 -0
  70. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/state.py +0 -0
  71. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/__init__.py +0 -0
  72. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/_common.py +0 -0
  73. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/build.py +0 -0
  74. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/builder.py +0 -0
  75. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/context.py +0 -0
  76. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/create_loan.py +0 -0
  77. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/datum_synth.py +0 -0
  78. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/increase_loan.py +0 -0
  79. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/loan_ids.py +0 -0
  80. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/modify_collateral.py +0 -0
  81. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/oracle_redeemer.py +0 -0
  82. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/oracle_synth.py +0 -0
  83. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/redeemers.py +0 -0
  84. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/repay.py +0 -0
  85. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/topup_withdraw.py +0 -0
  86. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/danogo/transactions/verify.py +0 -0
  87. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fetch.py +0 -0
  88. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/__init__.py +0 -0
  89. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/constants.py +0 -0
  90. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/datums.py +0 -0
  91. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/loader.py +0 -0
  92. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/market.py +0 -0
  93. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/math.py +0 -0
  94. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/oracles/__init__.py +0 -0
  95. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/oracles/feeds.py +0 -0
  96. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/oracles/fluid_api.py +0 -0
  97. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/oracles/witness.py +0 -0
  98. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/state.py +0 -0
  99. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/__init__.py +0 -0
  100. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/_common.py +0 -0
  101. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/borrow.py +0 -0
  102. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/borrow_terms.py +0 -0
  103. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/builder.py +0 -0
  104. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/change_collateral.py +0 -0
  105. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/context.py +0 -0
  106. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/datum_synth.py +0 -0
  107. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/lend.py +0 -0
  108. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/pool.py +0 -0
  109. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/recast.py +0 -0
  110. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/redeemers.py +0 -0
  111. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/repay.py +0 -0
  112. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/request.py +0 -0
  113. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/resolve.py +0 -0
  114. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens/transactions/utxos.py +0 -0
  115. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/__init__.py +0 -0
  116. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/constants.py +0 -0
  117. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/datums.py +0 -0
  118. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/indexing.py +0 -0
  119. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/loader.py +0 -0
  120. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/market.py +0 -0
  121. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/rates.py +0 -0
  122. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/state.py +0 -0
  123. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/__init__.py +0 -0
  124. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/borrow.py +0 -0
  125. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/builder.py +0 -0
  126. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/change_collateral.py +0 -0
  127. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/claim.py +0 -0
  128. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/common.py +0 -0
  129. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/lender_bond.py +0 -0
  130. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/loan_action.py +0 -0
  131. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/loan_terms.py +0 -0
  132. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/oracle.py +0 -0
  133. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/pool_action.py +0 -0
  134. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/pool_cancel.py +0 -0
  135. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/pool_create.py +0 -0
  136. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/pool_edit.py +0 -0
  137. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/pool_terms.py +0 -0
  138. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/recast.py +0 -0
  139. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/redeemers.py +0 -0
  140. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/repay.py +0 -0
  141. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/fluidtokens_v4/transactions/resolve.py +0 -0
  142. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/__init__.py +0 -0
  143. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/datums.py +0 -0
  144. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/deployment.py +0 -0
  145. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/indexing.py +0 -0
  146. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/lifecycle.py +0 -0
  147. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/loader.py +0 -0
  148. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/market.py +0 -0
  149. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/math.py +0 -0
  150. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/oracles.py +0 -0
  151. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/rates.py +0 -0
  152. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/registry_v6.json +0 -0
  153. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/__init__.py +0 -0
  154. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/_flow.py +0 -0
  155. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/borrow.py +0 -0
  156. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/borrow_more.py +0 -0
  157. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/builder.py +0 -0
  158. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/capture.py +0 -0
  159. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/collateral.py +0 -0
  160. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/combos.py +0 -0
  161. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/errors.py +0 -0
  162. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/legs.py +0 -0
  163. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/repay.py +0 -0
  164. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/resolve.py +0 -0
  165. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/supply.py +0 -0
  166. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/liqwid/transactions/terms.py +0 -0
  167. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/markets.py +0 -0
  168. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/math.py +0 -0
  169. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/normalized.py +0 -0
  170. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/oracles/__init__.py +0 -0
  171. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/oracles/charli3.py +0 -0
  172. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/oracles/dex_pooled.py +0 -0
  173. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/oracles/fluid.py +0 -0
  174. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/oracles/models.py +0 -0
  175. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/oracles/orcfax.py +0 -0
  176. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/oracles/qtoken.py +0 -0
  177. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/plutus.py +0 -0
  178. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/rates.py +0 -0
  179. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/registry.py +0 -0
  180. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/transactions/__init__.py +0 -0
  181. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/transactions/base.py +0 -0
  182. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/transactions/common.py +0 -0
  183. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/transactions/errors.py +0 -0
  184. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/transactions/infra.py +0 -0
  185. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/transactions/resolve.py +0 -0
  186. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/transactions/snapshot.py +0 -0
  187. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/transactions/utxos.py +0 -0
  188. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/transactions/validity.py +0 -0
  189. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/lending/units.py +0 -0
  190. {charli3_dendrite-1.6.16.dev0 → charli3_dendrite-1.6.17.dev0}/src/charli3_dendrite/utility.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: charli3_dendrite
3
- Version: 1.6.16.dev0
3
+ Version: 1.6.17.dev0
4
4
  Summary:
5
5
  License-File: LICENSE
6
6
  Author: Elder Millenial
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "charli3_dendrite"
3
- version = "1.6.16-dev0"
3
+ version = "1.6.17-dev0"
4
4
  description = ""
5
5
  authors = ["Elder Millenial <eldermillenial@protonmail.com>"]
6
6
  readme = "README.md"
@@ -50,7 +50,7 @@ module = ["pycardano", "pycardano.*", "dotenv", "nox", "uplc", "uplc.*"]
50
50
  ignore_missing_imports = true
51
51
 
52
52
  [tool.bumpversion]
53
- current_version = "1.6.16-dev0"
53
+ current_version = "1.6.17-dev0"
54
54
  parse = """(?x)
55
55
  (?P<major>\\d+)\\.
56
56
  (?P<minor>\\d+)\\.
@@ -53,7 +53,7 @@ The deployed order packages are ``basic`` (:data:`BasicConstraint`, four kinds)
53
53
  and ``strategy``, each paired with the fee constraint. The deployed invariant
54
54
  modules are constant-sum and stableswap on every network, and banded
55
55
  concentrated liquidity (:class:`BandedCLConfig`, the ``banded_cl`` kind) on
56
- preview and preprod.
56
+ mainnet.
57
57
 
58
58
  Two derivations the contracts pin are reproduced here: a pool's ``identifier``
59
59
  is the first 28 bytes of the blake2b-256 of the serialised seed output reference
@@ -336,6 +336,13 @@ class PoolState(PlutusData):
336
336
  preminted_lp: int
337
337
 
338
338
 
339
+ def _opaque_data(value: object) -> RawPlutusData:
340
+ """``value`` as :class:`~pycardano.RawPlutusData`, a bare list included."""
341
+ if isinstance(value, list):
342
+ return RawPlutusData(IndefiniteList(value))
343
+ return RawPlutusData.from_primitive(value) # type: ignore[arg-type]
344
+
345
+
339
346
  @dataclass
340
347
  class TranscriptEntry(PlutusData):
341
348
  """One scoop step (constructor 0).
@@ -352,7 +359,9 @@ class TranscriptEntry(PlutusData):
352
359
  state_after: PoolState
353
360
  fee_budget: int
354
361
  operation_tag: int
355
- operation_data: RawPlutusData
362
+ operation_data: RawPlutusData = dataclasses.field(
363
+ metadata={"object_hook": _opaque_data},
364
+ )
356
365
 
357
366
 
358
367
  @dataclass
@@ -1107,21 +1116,6 @@ class ConstantSumConfig(PlutusData):
1107
1116
  balance_fee: Rational
1108
1117
 
1109
1118
 
1110
- @dataclass
1111
- class ConcentratedLiquidityConfig(PlutusData):
1112
- """Concentrated-liquidity module config (constructor 0): one band.
1113
-
1114
- ``sqrt_price_a`` / ``sqrt_price_b`` are the band bounds (kept as exact integer
1115
- rationals; the on-chain math is pure integer cross-products). ``fee`` is the
1116
- swap fee.
1117
- """
1118
-
1119
- CONSTR_ID = 0
1120
- sqrt_price_a: Rational
1121
- sqrt_price_b: Rational
1122
- fee: Rational
1123
-
1124
-
1125
1119
  @dataclass
1126
1120
  class BandSpec(PlutusData):
1127
1121
  """One band of a banded concentrated-liquidity ladder (constructor 0).
@@ -1147,15 +1141,11 @@ class BandSpec(PlutusData):
1147
1141
  class BandedCLConfig(PlutusData):
1148
1142
  """Banded concentrated-liquidity module config (constructor 0): the ladder.
1149
1143
 
1150
- ``bands`` are in ascending price order and share edges, so the ladder stores
1151
- ``N + 1`` edges (each band's ``start`` plus ``closing``) and no edge twice.
1152
- ``index`` is the ladder index: one ``(Int, Int)`` entry per band, the
1153
- cumulative saturation coefficients for the bands above and below it in
1154
- fixed point at ``2**64``, rounded up per coefficient. It is a pure function
1155
- of the bands (``banded_cl_ladder(...).index``) that Create pins and a spend
1156
- reads instead of walking the ladder; it is modelled as an
1157
- :class:`~pycardano.IndefiniteList` of 2-element lists because an Aiken
1158
- 2-tuple is a bare array. ``weight_total`` is exactly the weights' sum.
1144
+ ``bands`` are in ascending price order; the last band closes at ``closing``.
1145
+ ``index`` has one ``(Int, Int)`` entry per band, the cumulative saturation
1146
+ coefficients in fixed point at ``2**64``, derived from the bands
1147
+ (``banded_cl_ladder(...).index``). ``weight_total`` is the weights' sum and
1148
+ ``ext`` a reserved field, ``Void``.
1159
1149
  """
1160
1150
 
1161
1151
  CONSTR_ID = 0
@@ -1163,13 +1153,10 @@ class BandedCLConfig(PlutusData):
1163
1153
  index: IndefiniteList
1164
1154
  closing: Rational
1165
1155
  weight_total: int
1156
+ ext: RawPlutusData
1166
1157
 
1167
1158
  def __post_init__(self) -> None:
1168
- """Type the decoded band and index entries; keep both lists indefinite.
1169
-
1170
- An Aiken ``List`` serialises indefinite, and the config is hashed
1171
- off-datum, so both lists must stay indefinite to reproduce the commitment.
1172
- """
1159
+ """Type the decoded band and index entries; keep both lists indefinite."""
1173
1160
  super().__post_init__()
1174
1161
  self.bands = IndefiniteList(
1175
1162
  [
@@ -1373,14 +1360,13 @@ StableSwapRedeemer = Union[StableSwapCreate, StableSwapOperate, StableSwapDestro
1373
1360
  class BandedCLEntry(PlutusData):
1374
1361
  """One pool the banded CL module operates on (constructor 0).
1375
1362
 
1376
- ``config`` is the full ladder the pool input commits to; ``counter`` and
1377
- ``active_band`` are the witness pair for the pool INPUT's reserves, which
1378
- the module re-derives and checks (they are stored nowhere).
1363
+ ``config_index`` selects the pool's ladder in :attr:`BandedCLOperate.configs`;
1364
+ ``counter`` and ``active_band`` are the witness of the pool input's reserves.
1379
1365
  """
1380
1366
 
1381
1367
  CONSTR_ID = 0
1382
1368
  pool_oref: OutputReference
1383
- config: BandedCLConfig
1369
+ config_index: int
1384
1370
  counter: int
1385
1371
  active_band: int
1386
1372
 
@@ -1401,10 +1387,31 @@ class BandedCLCreate(PlutusData):
1401
1387
 
1402
1388
  @dataclass
1403
1389
  class BandedCLOperate(PlutusData):
1404
- """Banded CL module ``Operate`` (constructor 1)."""
1390
+ """Banded CL module ``Operate`` (constructor 1): entries and their ladders."""
1405
1391
 
1406
1392
  CONSTR_ID = 1
1407
- entries: list[BandedCLEntry]
1393
+ entries: IndefiniteList
1394
+ configs: IndefiniteList
1395
+
1396
+ def __post_init__(self) -> None:
1397
+ """Type the decoded entries and configs; keep both lists indefinite."""
1398
+ super().__post_init__()
1399
+ self.entries = IndefiniteList(
1400
+ [
1401
+ e if isinstance(e, BandedCLEntry) else BandedCLEntry.from_primitive(e)
1402
+ for e in _list_items(self.entries)
1403
+ ],
1404
+ )
1405
+ self.configs = IndefiniteList(
1406
+ [
1407
+ c if isinstance(c, BandedCLConfig) else BandedCLConfig.from_primitive(c)
1408
+ for c in _list_items(self.configs)
1409
+ ],
1410
+ )
1411
+
1412
+ def config_of(self, entry: BandedCLEntry) -> BandedCLConfig:
1413
+ """The ladder ``entry`` selects."""
1414
+ return self.configs[entry.config_index]
1408
1415
 
1409
1416
 
1410
1417
  @dataclass
@@ -1898,12 +1905,17 @@ def _validator_hashes(title: str) -> frozenset[bytes]:
1898
1905
  _BASIC_ORDER_HASHES: frozenset[bytes] = _validator_hashes("basic_order.withdraw")
1899
1906
  _STRATEGY_ORDER_HASHES: frozenset[bytes] = _validator_hashes("strategy_order.withdraw")
1900
1907
 
1901
- # A module validator's blueprint title: ``<kind>.withdraw``, or
1902
- # ``<kind>.withdraw.superseded<N>`` for a build pools were upgraded off.
1903
- _MODULE_TITLE = re.compile(r"(?P<kind>.+)\.withdraw(?:\.superseded\d+)?")
1904
- # A module whose upstream title stem is not its kind's name.
1905
- _MODULE_KIND_ALIASES = {"banded_concentrated_liquidity": "banded_cl"}
1906
- _BANDED_CL_TITLE = "banded_concentrated_liquidity.withdraw"
1908
+ # A module validator's title: ``<kind>.withdraw``, optionally ``.audited`` or
1909
+ # ``.rev<N>`` (the same kind), then ``.superseded<N>`` for a replaced build.
1910
+ _MODULE_TITLE = re.compile(
1911
+ r"(?P<kind>[a-z_]+)\.withdraw(?:\.audited)?(?:\.rev\d+)?(?:\.superseded\d+)?",
1912
+ )
1913
+ # Title stems that are not the kind's name.
1914
+ _MODULE_KIND_ALIASES = {
1915
+ "concentrated_liquidity": "banded_cl",
1916
+ "banded_concentrated_liquidity": "banded_cl",
1917
+ }
1918
+ _BANDED_CL_TITLE = "concentrated_liquidity.withdraw"
1907
1919
 
1908
1920
 
1909
1921
  @dataclass(frozen=True)
@@ -1962,10 +1974,9 @@ class SundaeV4Deployment:
1962
1974
  def module_kind(self, script_hash: bytes) -> str | None:
1963
1975
  """The module kind (``constant_sum``, ``stableswap``, ...) of a withdraw script.
1964
1976
 
1965
- Module validators are registered under ``<kind>.withdraw``, and a build that
1966
- pools were upgraded off under ``<kind>.withdraw.superseded<N>``; anything
1967
- else (the vault, order and settings validators) is not a module. The
1968
- upstream ``banded_concentrated_liquidity`` titles are the ``banded_cl`` kind.
1977
+ Module validators are registered under ``<kind>.withdraw``, optionally
1978
+ with ``.audited``, ``.rev<N>`` or ``.superseded<N>``; anything else is not
1979
+ a module. ``concentrated_liquidity`` titles are the ``banded_cl`` kind.
1969
1980
  """
1970
1981
  for title, applied in self.validators.items():
1971
1982
  if bytes.fromhex(applied) != script_hash:
@@ -2084,7 +2095,6 @@ INVARIANT_MODULE_KINDS: frozenset[str] = frozenset(
2084
2095
  {
2085
2096
  "constant_sum",
2086
2097
  "constant_product",
2087
- "concentrated_liquidity",
2088
2098
  "stableswap",
2089
2099
  "banded_cl",
2090
2100
  },
@@ -2107,24 +2117,22 @@ def _reserve_unit(asset_class: AssetClass) -> str:
2107
2117
  _CONFIG_TYPES: dict[str, type[PlutusData]] = {
2108
2118
  "constant_sum": ConstantSumConfig,
2109
2119
  "constant_product": ConstantProductConfig,
2110
- "concentrated_liquidity": ConcentratedLiquidityConfig,
2111
2120
  "fee_split": FeeSplitConfig,
2112
2121
  "stableswap": StableSwapConfig,
2113
2122
  "banded_cl": BandedCLConfig,
2114
2123
  }
2115
2124
  _CREATE_TAG = 121 # constructor 0
2116
2125
  _OPERATE_TAG = 122 # constructor 1
2117
- # The superseded banded CL config: bands, closing, weight_total (no index).
2118
- _INDEX_LESS_BANDED_FIELDS = 3
2119
2126
 
2120
2127
 
2121
2128
  def _config_candidates(data_cbor: str, kind: str | None) -> list[Any]:
2122
2129
  """Config preimages a module redeemer may carry.
2123
2130
 
2124
2131
  A ``Create`` redeemer (constructor 0) carries the config as its first
2125
- field; an ``Operate`` redeemer (constructor 1) carries one
2126
- ``[pool_oref, config]`` entry per pool. Known kinds are decoded to their
2127
- typed config; others stay :class:`~pycardano.RawPlutusData`.
2132
+ field. An ``Operate`` redeemer (constructor 1) carries one
2133
+ ``[pool_oref, config, ...]`` entry per pool; the banded CL module's carries
2134
+ ``[entries, configs]``. Known kinds are decoded to their typed config;
2135
+ others stay :class:`~pycardano.RawPlutusData`.
2128
2136
  """
2129
2137
  raw = RawPlutusData.from_cbor(bytes.fromhex(data_cbor))
2130
2138
  tag = raw.data
@@ -2133,6 +2141,8 @@ def _config_candidates(data_cbor: str, kind: str | None) -> list[Any]:
2133
2141
  fields = _list_items(tag.value)
2134
2142
  if tag.tag == _CREATE_TAG and fields:
2135
2143
  payloads = [fields[0]]
2144
+ elif tag.tag == _OPERATE_TAG and kind == "banded_cl":
2145
+ payloads = _list_items(fields[1]) if len(fields) > 1 else []
2136
2146
  elif tag.tag == _OPERATE_TAG and fields:
2137
2147
  payloads = [
2138
2148
  _list_items(entry.value)[1]
@@ -2154,62 +2164,6 @@ def _config_candidates(data_cbor: str, kind: str | None) -> list[Any]:
2154
2164
  return candidates
2155
2165
 
2156
2166
 
2157
- def _lift_index_less(fields: list) -> BandedCLConfig | None:
2158
- """The current-build config of an index-less ``[bands, closing, weight_total]``.
2159
-
2160
- ``None`` when the fields are not that shape or fail the module's Create-time
2161
- checks.
2162
- """
2163
- bands_raw, closing_raw, weight_total = fields
2164
- if not isinstance(bands_raw, (list, IndefiniteList)) or not bands_raw:
2165
- return None
2166
- if not isinstance(weight_total, int) or isinstance(weight_total, bool):
2167
- return None
2168
- try:
2169
- bands = [BandSpec.from_primitive(band) for band in _list_items(bands_raw)]
2170
- closing = Rational.from_primitive(closing_raw)
2171
- ladder = banded_cl_ladder(bands, closing, weight_total)
2172
- except (DeserializeException, TypeError, ValueError, KeyError):
2173
- return None
2174
- return BandedCLConfig(
2175
- bands=IndefiniteList(bands),
2176
- index=IndefiniteList([IndefiniteList(list(entry)) for entry in ladder.index]),
2177
- closing=closing,
2178
- weight_total=weight_total,
2179
- )
2180
-
2181
-
2182
- def _index_less_banded_configs(data_cbor: str) -> list[BandedCLConfig]:
2183
- """Index-less banded CL configs anywhere in a redeemer, lifted to the current shape.
2184
-
2185
- The superseded build of the banded CL module committed to a constructor-0
2186
- ``[bands, closing, weight_total]`` with no ladder index. A vault moved off
2187
- that build commits to the same ladder with its index, and the transaction
2188
- that moves it may carry only the index-less shape, in a redeemer of a script
2189
- the manifest does not list. Every constructor-0 term of that shape is lifted
2190
- by computing its index; the caller accepts one only on a commitment match.
2191
- """
2192
- try:
2193
- stack: list[Any] = [RawPlutusData.from_cbor(bytes.fromhex(data_cbor)).data]
2194
- except (DeserializeException, TypeError, ValueError, cbor2.CBORDecodeError):
2195
- return []
2196
- out: list[BandedCLConfig] = []
2197
- while stack:
2198
- term = stack.pop()
2199
- if isinstance(term, CBORTag):
2200
- if not isinstance(term.value, (list, IndefiniteList)):
2201
- continue
2202
- fields = _list_items(term.value)
2203
- if term.tag == _CREATE_TAG and len(fields) == _INDEX_LESS_BANDED_FIELDS:
2204
- config = _lift_index_less(fields)
2205
- if config is not None:
2206
- out.append(config)
2207
- stack.extend(reversed(fields))
2208
- elif isinstance(term, (list, IndefiniteList)):
2209
- stack.extend(reversed(_list_items(term)))
2210
- return out
2211
-
2212
-
2213
2167
  def _rate_update_rates(
2214
2168
  records: list[RedeemerRecord],
2215
2169
  pool_hash: bytes,
@@ -2254,10 +2208,7 @@ def _matching_config(
2254
2208
  producing transaction's own redeemers and, failing that, each past
2255
2209
  transaction's redeemers visited while walking the pool NFT's history. For a
2256
2210
  stableswap module, each candidate is also tried with the rates of every
2257
- rate-update step in the same transaction. For a banded CL module, when no
2258
- module redeemer matches, every index-less config in any of the transaction's
2259
- redeemers is lifted and tried (see :func:`_index_less_banded_configs`). Only a
2260
- hash match is accepted.
2211
+ rate-update step in the same transaction. Only a hash match is accepted.
2261
2212
  """
2262
2213
  rate_sets = _rate_update_rates(records, pool_hash) if kind == "stableswap" else []
2263
2214
  for record in records:
@@ -2272,11 +2223,6 @@ def _matching_config(
2272
2223
  variant = dataclasses.replace(candidate, rates=IndefiniteList(rates))
2273
2224
  if module_config_hash(variant) == commitment:
2274
2225
  return variant
2275
- if kind == "banded_cl":
2276
- for record in records:
2277
- for lifted in _index_less_banded_configs(record.data_cbor):
2278
- if module_config_hash(lifted) == commitment:
2279
- return lifted
2280
2226
  return None
2281
2227
 
2282
2228
 
@@ -3524,6 +3470,7 @@ class SundaeV4ConstantSumPool(_SundaeV4BoundPool, AbstractMultiAssetPoolState):
3524
3470
  # A two-asset pool prices exactly two reserves; a ledger quantity is below 2**64.
3525
3471
  _TWO_ASSETS = 2
3526
3472
  _LEDGER_MAX = 2**64 - 1
3473
+ _MAX_RATIONAL = 2**64
3527
3474
 
3528
3475
 
3529
3476
  class _SundaeV4TwoAssetPool(_SundaeV4BoundPool):
@@ -3890,27 +3837,12 @@ class SundaeV4StableSwapPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState)
3890
3837
  class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
3891
3838
  """The banded concentrated-liquidity module bound to a vault on one action tag.
3892
3839
 
3893
- Two reserves: asset A is the vault's first declared reserve and asset B its
3894
- second, and price means B per A. The config is a ladder of sqrt-price bands
3895
- (:class:`BandedCLConfig`); the pool stores no price and no active band, so
3896
- both are derived from the reserves by the band proof (:meth:`witness`),
3897
- exactly as the on-chain module re-derives them on every spend. A swap prices
3898
- against the active band and crosses into the next band when it exhausts
3899
- that band's holding of the output asset, so even a small trade near a band
3900
- edge uses two bands. ``reserves`` and ``total_lp`` are a snapshot of the
3901
- vault's at construction, so :meth:`apply_swap` never mutates the vault.
3902
-
3903
- Every quote is the exact integer the chain pays (floor division in the
3904
- pool's favour at every step; see
3905
- :mod:`~charli3_dendrite.dexs.amm.sundae_v4_banded_cl_math`), so an order's
3906
- ``min_received`` set from it, less slippage, is what a scooper can fill. An
3907
- offer one scoop cannot fill in full (the ladder runs out, or a crossing
3908
- would lower the ladder counter) quotes zero, as a constant-sum step does;
3909
- :meth:`quote` reports how much of it the ladder absorbs, and
3910
- :meth:`get_amount_in` only names offers it absorbs in full. Only the current
3911
- build of the module is priced, and not a vault whose trade action also binds
3912
- a module the manifest does not know, such as an oracle-enabled banded pool's
3913
- oracle module.
3840
+ Asset A is the vault's first declared reserve and asset B its second; price
3841
+ is B per A. The active band and counter are derived from the reserves
3842
+ (:meth:`witness`). Quotes are exact integers (see
3843
+ :mod:`~charli3_dendrite.dexs.amm.sundae_v4_banded_cl_math`). An offer that
3844
+ does not fill in full quotes zero. ``reserves`` and ``total_lp`` are a
3845
+ snapshot of the vault's.
3914
3846
  """
3915
3847
 
3916
3848
  model_config = ConfigDict(arbitrary_types_allowed=True)
@@ -3935,11 +3867,8 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
3935
3867
  """Bind the banded CL module's ``config`` to ``vault`` on action ``tag``.
3936
3868
 
3937
3869
  Raises:
3938
- InvalidPoolError: the binding is refused (:meth:`_check_binding`),
3939
- ``config`` is not a :class:`BandedCLConfig`, the vault does not
3940
- declare exactly two reserves, its datum order and reserve units
3941
- disagree, the ladder fails the module's shape checks, or the
3942
- config's index is not the one its bands derive.
3870
+ InvalidPoolError: the binding is refused (:meth:`_check_binding`) or
3871
+ the vault or config is not a valid banded pool.
3943
3872
  """
3944
3873
  cls._check_binding(vault, tag)
3945
3874
  if not isinstance(config, BandedCLConfig):
@@ -3965,28 +3894,43 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
3965
3894
  if committed != list(ladder.index):
3966
3895
  msg = "SundaeV4BandedCLPool: the config's index is not its bands' index."
3967
3896
  raise InvalidPoolError(msg)
3897
+ rationals = [config.closing] + [
3898
+ r for band in bands for r in (band.start, band.fee_buy, band.fee_sell)
3899
+ ]
3900
+ if any(max(int(r.num), int(r.den)) > _MAX_RATIONAL for r in rationals):
3901
+ msg = "SundaeV4BandedCLPool: a ladder rational exceeds 2**64."
3902
+ raise InvalidPoolError(msg)
3903
+ if config.ext.to_cbor() != _void().to_cbor():
3904
+ msg = "SundaeV4BandedCLPool: the config's ext is not Void."
3905
+ raise InvalidPoolError(msg)
3968
3906
  return cls(vault=vault, tag=tag, config=config, ladder=ladder, **snapshot)
3969
3907
 
3970
3908
  @classmethod
3971
3909
  def _check_binding(cls, vault: SundaeV4Vault, tag: int) -> None:
3972
- """Refuse a superseded build of the module, or a module the manifest lacks.
3973
-
3974
- Only the current build of the banded CL module is priced: a superseded
3975
- build commits to an older config shape. A trade action that also binds a
3976
- module the deployment does not know (the oracle module of an
3977
- oracle-enabled banded pool is one) may constrain the trade in ways this
3978
- type does not model, so it is not priced either.
3910
+ """Refuse anything but the current build, or a module the manifest lacks.
3979
3911
 
3980
3912
  Raises:
3981
- InvalidPoolError: either case.
3913
+ InvalidPoolError: the deployment lists no current build, the action
3914
+ binds another build, or it binds an unknown module.
3982
3915
  """
3983
3916
  deployment = vault.deployment()
3984
3917
  modules = vault.modules_for(tag)
3985
3918
  current = deployment.validators.get(_BANDED_CL_TITLE)
3986
- if current is None or bytes.fromhex(current) not in modules:
3919
+ if current is None:
3920
+ msg = (
3921
+ f"SundaeV4BandedCLPool: the {deployment.network} deployment lists "
3922
+ f"no current build of the banded CL module ({_BANDED_CL_TITLE}); "
3923
+ "it is not priced."
3924
+ )
3925
+ raise InvalidPoolError(msg)
3926
+ if bytes.fromhex(current) not in modules:
3927
+ bound = [
3928
+ m.hex() for m in modules if deployment.module_kind(m) == "banded_cl"
3929
+ ]
3987
3930
  msg = (
3988
- f"SundaeV4BandedCLPool: action {tag} does not bind the current "
3989
- "build of the banded CL module; a superseded build is not priced."
3931
+ f"SundaeV4BandedCLPool: action {tag} binds "
3932
+ f"{', '.join(bound) or 'no banded CL module'}, not the current "
3933
+ f"build {current}; it is not priced."
3990
3934
  )
3991
3935
  raise InvalidPoolError(msg)
3992
3936
  unknown = [m.hex() for m in modules if deployment.module_kind(m) is None]
@@ -4016,24 +3960,17 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
4016
3960
  return (self.reserves.root[self.asset_a], self.reserves.root[self.asset_b])
4017
3961
 
4018
3962
  def _cached(self) -> dict[Any, Any]:
4019
- """Per-state memos (witnesses, drains), keyed on the reserves themselves.
4020
-
4021
- A move made directly on ``reserves`` or through :meth:`apply_swap` starts
4022
- a fresh memo, so a stale value is never served.
4023
- """
3963
+ """Per-state memos, keyed on the reserves."""
4024
3964
  key = self._ab()
4025
3965
  if self._memo is None or self._memo[0] != key:
4026
3966
  self._memo = (key, {})
4027
3967
  return self._memo[1]
4028
3968
 
4029
3969
  def witness(self, a_is_input: bool | None = None) -> Witness | None:
4030
- """The band proof's solution for the current reserves, or ``None``.
3970
+ """The witness of the current reserves, or ``None`` if unpriceable.
4031
3971
 
4032
- The ladder counter, the active band and the band's own holdings. ``None``
4033
- means no band admits the reserves: the pool is unpriceable and quotes
4034
- zero. A state exactly on a band edge is a witness in both neighbouring
4035
- bands; ``a_is_input`` picks the one a trade in that direction enters (see
4036
- :func:`~.sundae_v4_banded_cl_math.directed_witness`).
3972
+ With ``a_is_input``, the witness a trade in that direction starts from
3973
+ (:func:`~.sundae_v4_banded_cl_math.directed_witness`).
4037
3974
  """
4038
3975
  cached = self._cached()
4039
3976
  if a_is_input not in cached:
@@ -4050,7 +3987,7 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
4050
3987
 
4051
3988
  @property
4052
3989
  def active_band(self) -> int | None:
4053
- """The index of the band holding the current price (``None`` if unpriceable)."""
3990
+ """The index of the active band (``None`` if unpriceable)."""
4054
3991
  found = self.witness()
4055
3992
  return None if found is None else found.band
4056
3993
 
@@ -4064,14 +4001,24 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
4064
4001
  msg = f"Unit {unit_in} is not a reserve of this pool."
4065
4002
  raise ValueError(msg)
4066
4003
 
4004
+ def _drain(self, a_is_input: bool) -> BandedQuote:
4005
+ """The ledger-max quote in this direction, memoised per state."""
4006
+ cached = self._cached()
4007
+ key = ("drain", a_is_input)
4008
+ if key not in cached:
4009
+ cached[key] = banded_quote(
4010
+ self.ladder,
4011
+ *self._ab(),
4012
+ _LEDGER_MAX,
4013
+ a_is_input,
4014
+ )
4015
+ return cached[key]
4016
+
4067
4017
  def quote(self, unit_in: str, amount: int) -> BandedQuote:
4068
- """The exact quote for ``amount`` of ``unit_in``, band crossings included.
4018
+ """The quote for ``amount`` of ``unit_in``.
4069
4019
 
4070
- ``amount_out`` is what the pool pays for the part of the offer one scoop
4071
- can fill, ``spent``; ``spent`` is below ``amount`` when the ladder cannot
4072
- absorb the whole offer (see
4073
- :func:`~.sundae_v4_banded_cl_math.banded_quote`), and :meth:`get_amount_out`
4074
- then quotes zero. Zero output for no offer.
4020
+ ``spent`` is the largest part of ``amount`` that fills
4021
+ (:func:`~.sundae_v4_banded_cl_math.banded_quote`).
4075
4022
 
4076
4023
  Raises:
4077
4024
  ValueError: ``unit_in`` is not a reserve of this pool.
@@ -4080,31 +4027,15 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
4080
4027
  a, b = self._ab()
4081
4028
  if amount <= 0:
4082
4029
  return BandedQuote(amount_out=0, spent=0, bands=(), reserves_after=(a, b))
4083
- start = self.witness(a_is_input)
4084
- cached = self._cached()
4085
- key = ("drain", a_is_input)
4086
- quote = banded_quote(
4087
- self.ladder,
4088
- a,
4089
- b,
4090
- amount,
4091
- a_is_input,
4092
- start,
4093
- cached.get(key),
4094
- )
4030
+ drain = self._drain(a_is_input)
4095
4031
  if amount >= _LEDGER_MAX:
4096
- # The ledger-max quote (:meth:`max_output`'s) walks every band in this
4097
- # direction; later quotes from this state reuse its band crossings.
4098
- cached.setdefault(key, quote)
4099
- return quote
4032
+ return drain
4033
+ return banded_quote(self.ladder, a, b, amount, a_is_input, drain=drain)
4100
4034
 
4101
4035
  def price(self, unit_in: str, unit_out: str) -> tuple[int, int]:
4102
- """The active band's fee-exclusive marginal rate as weights ``(p_in, p_out)``.
4036
+ """The active band's fee-exclusive marginal rate as ``(p_in, p_out)``.
4103
4037
 
4104
- Out per in at the margin is ``p_in / p_out``: a CL band's virtual-reserve
4105
- ratio, a constant-sum bin's fixed price. On a band edge it is the margin of
4106
- the band a trade from ``unit_in`` enters. An unpriceable pool reports
4107
- ``(0, 1)``.
4038
+ An unpriceable pool reports ``(0, 1)``.
4108
4039
 
4109
4040
  Raises:
4110
4041
  ValueError: ``unit_in`` or ``unit_out`` is not a reserve of this pool,
@@ -4120,15 +4051,11 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
4120
4051
  return marginal_price(found, self.ladder.bands[found.band], a_is_input)
4121
4052
 
4122
4053
  def _takes(self, unit_in: str, out_unit: str, amount: int) -> int:
4123
- """The ladder's output for the part of ``amount`` it absorbs (:meth:`quote`)."""
4054
+ """The output of the largest part of ``amount`` that fills."""
4124
4055
  return self.quote(unit_in, amount).amount_out
4125
4056
 
4126
4057
  def _fills(self, unit_in: str, out_unit: str, amount: int) -> int:
4127
- """The output for the whole offer, or zero when the ladder cannot absorb it.
4128
-
4129
- As :class:`SundaeV4ConstantSumPool` does, an offer one scoop cannot fill
4130
- in full quotes zero rather than a partial fill.
4131
- """
4058
+ """The output for the whole offer, or zero when it does not fill."""
4132
4059
  quote = self.quote(unit_in, amount)
4133
4060
  return quote.amount_out if quote.spent == amount else 0
4134
4061
 
@@ -4143,9 +4070,6 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
4143
4070
  def max_output(self, out_unit: str) -> int:
4144
4071
  """The smallest undeliverable output of ``out_unit``, memoised per state.
4145
4072
 
4146
- One past what the largest offer the ladder absorbs in full buys: the
4147
- output of the ledger-max offer, which the ladder absorbs up to its end.
4148
-
4149
4073
  Raises:
4150
4074
  ValueError: ``out_unit`` is not a reserve of this pool.
4151
4075
  """
@@ -4156,13 +4080,7 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
4156
4080
  return cached[key]
4157
4081
 
4158
4082
  def fillable_input(self, unit_in: str, amount: int) -> int:
4159
- """The largest offer of at most ``amount`` that fills: ``0`` when none does.
4160
-
4161
- The largest ``x <= min(amount, cap_in)`` that :meth:`get_amount_out`
4162
- quotes a non-zero output for, where ``cap_in`` is the most the ladder
4163
- absorbs: the ledger-max quote's ``spent``, memoised per state with the
4164
- quote. The offers that fill are not an interval (see
4165
- :func:`~.sundae_v4_banded_cl_math.fillable_input`).
4083
+ """The largest offer of at most ``amount`` that fills, ``0`` if none.
4166
4084
 
4167
4085
  Raises:
4168
4086
  ValueError: ``unit_in`` is not a reserve of this pool.
@@ -4170,14 +4088,12 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
4170
4088
  a_is_input = self._a_is_input(unit_in)
4171
4089
  if amount <= 0:
4172
4090
  return 0
4173
- drain = self.quote(unit_in, _LEDGER_MAX)
4174
4091
  return fillable_input(
4175
4092
  self.ladder,
4176
4093
  *self._ab(),
4177
4094
  a_is_input,
4178
4095
  amount,
4179
- self.witness(a_is_input),
4180
- drain,
4096
+ drain=self._drain(a_is_input),
4181
4097
  )
4182
4098
 
4183
4099
  def get_amount_in(
@@ -4186,12 +4102,7 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
4186
4102
  in_unit: str,
4187
4103
  precise: bool = True,
4188
4104
  ) -> tuple[Assets, float]:
4189
- """An ``in_unit`` offer that reaches ``asset`` and the ladder absorbs in full.
4190
-
4191
- Draining the ladder's last band can leave the end bounded only at some
4192
- inputs, so the search may land on an offer the ladder does not absorb in
4193
- full; the part it absorbs pays the same output and is returned instead.
4194
- Outside such a drain the offer is the least that reaches ``asset``.
4105
+ """The least ``in_unit`` offer that fills and reaches ``asset``.
4195
4106
 
4196
4107
  Raises:
4197
4108
  ValueError: ``asset`` is not exactly one reserve, ``in_unit`` is not the
@@ -4208,7 +4119,7 @@ class SundaeV4BandedCLPool(_SundaeV4TwoAssetPool, AbstractMultiAssetPoolState):
4208
4119
  )
4209
4120
 
4210
4121
  def _measure(self) -> int:
4211
- """The LP supply: the proportional check scales a banded pool's reserves."""
4122
+ """The LP supply."""
4212
4123
  return self.total_lp
4213
4124
 
4214
4125