Skip to content

Commit

Permalink
-Fixing and adding some comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
PyGryhapoRbryDer committed Jul 10, 2024
1 parent 02ef5fa commit f49768e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/jmclient/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@ def jm_single() -> AttributeDict:
# where x > 1. It is a real number (so written as a decimal).
bond_value_exponent = 1.3
# Maximum probability for a single maker to be included in a transaction. A value smaller
# than 1 for tx_max_expected_probability constrains the probability of abnormally large
# makers to be included in a transaction, by capping the value of their bonds as required
# to reach this probability target.
tx_max_expected_probability = 1.0
##############################
Expand Down
9 changes: 5 additions & 4 deletions src/jmclient/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,12 @@ def fidelity_bond_weighted_order_choose(orders, n, nrem = None, large_makers_not
choose orders based on fidelity bond for improved sybil resistance
* with probability `bondless_makers_allowance`: will revert to previous default
order choose (random_under_max_order_choose)
order choose (random_under_max_order_choose) amongst bondless and bond makers
* with probability `1 - bondless_makers_allowance`: if there are no bond offerings, revert
to previous default as above, or if tx_max_expected_probability is defined and the number
of bond offerings is smaller than n/tx_max_expected_probability. If not, choose
randomly from those, with weighting being the fidelity bond values.
to previous default amongst bondless makers, or if tx_max_expected_probability is defined and
is sufficiently small to constrain the bond values of all remaining bond makers. If not, choose
randomly from bond makers, with weighting being the fidelity bond values, with possible some of
these weights capped if tx_max_expected_probability is defined and is smaller than 1.
"""

if random.random() < get_bondless_makers_allowance():
Expand Down

0 comments on commit f49768e

Please sign in to comment.