You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(config): replace max_to_lend with max_offer_size for smoothed lending
Remove redundant \max_to_lend\, \max_percent_to_lend\, and \max_to_lend_rate\ configurations that conflicted with the FRR strategy.
Introduce \max_offer_size\ to cap the maximum amount of a single loan offer, allowing unused balances to carry over for smoothed lending rates over time.
Simplify \MaxToLend.py\ to exclusively handle \max_active_amount\ global caps.
Update documentation and configuration templates to reflect these changes.
Add comprehensive test coverage for \max_offer_size\ order sizing and remainder precision logic.
Copy file name to clipboardExpand all lines: TODO.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,5 +16,5 @@
16
16
-[x] Clean unused options in config
17
17
-[x] Make rate:dur mapping configurable in Settings
18
18
-[x] Make my added features configurable in web settings (like frrdelta) and add proper docs for them
19
-
-[] max_to_lend/max_percent_to_lend/max_to_lend_rate: These 3 config options are not useful and may conflict with FFR strategy? Consider removing them
19
+
-[x] max_to_lend/max_percent_to_lend/max_to_lend_rate: These 3 config options are not useful and may conflict with FFR strategy? Consider removing them
Copy file name to clipboardExpand all lines: docs/configuration.rst
+18-42Lines changed: 18 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -271,48 +271,6 @@ Very few situations require you to change these settings.
271
271
- Uncomment to enable.
272
272
- Format: ``YEAR-MONTH-DAY``
273
273
274
-
Max to be lent
275
-
--------------
276
-
277
-
This feature group allows you to only lend a certain percentage of your total holding in a coin, until the lending rate surpasses a certain threshold. Then it will lend at max capacity. These settings are found in the ``[coin.default]`` section or specific ``[coin.SYMBOL]`` sections.
278
-
279
-
- ``max_to_lend`` is a raw number of how much you will lend of each coin whose lending rate is below ``max_to_lend_rate``.
280
-
281
-
- Default value: 0 (disabled)
282
-
- Allowed range: 0 (disabled) or ``min_loan_size`` and up
283
-
- If set to 0, it is disabled.
284
-
- If disabled, the bot will check if ``max_percent_to_lend`` is enabled and use that instead.
285
-
- Setting this overrides ``max_percent_to_lend``.
286
-
- This is a setting for the raw value of coin that will be lent if the coin's lending rate is under ``max_to_lend_rate``.
287
-
- Has no effect if current rate is higher than ``max_to_lend_rate``.
288
-
- If the remainder (after subtracting ``max_to_lend``) in a coin's balance is less than ``min_loan_size``, then the remainder will be lent anyway. Otherwise, the coins would go to waste since you can't lend under ``min_loan_size``.
289
-
290
-
- ``max_percent_to_lend`` is a percentage of how much you will lend of each coin whose lending rate is below ``max_to_lend_rate``.
291
-
292
-
- Default value: 0 (disabled)
293
-
- Allowed range: 0 (disabled) to 100 percent
294
-
- If set to 0, it is disabled.
295
-
- If disabled in addition to ``max_to_lend``, the entire feature will be disabled (100% of balance will be lent).
296
-
- This percentage is calculated per-coin, and is the percentage of the balance that will be lent if the coin's current rate is less than ``max_to_lend_rate``.
297
-
- Has no effect if current rate is higher than ``max_to_lend_rate``.
298
-
- If the remainder in a coin's balance is less than ``min_loan_size``, then the remainder will be lent anyway.
299
-
300
-
301
-
- ``max_to_lend_rate`` is the rate threshold (in percent) when all coins are lent.
302
-
303
-
- Default value: 0 (disabled)
304
-
- Allowed range: 0 (disabled) or ``min_daily_rate`` to 5 percent
305
-
- Setting this to 0 with a limit in place causes the limit to always be active.
306
-
- When an individual coin's lending rate passes this threshold, all of the coin will be lent instead of applying the limits from ``max_to_lend`` or ``max_percent_to_lend``.
307
-
308
-
.. code-block:: toml
309
-
310
-
[coin.default]
311
-
max_to_lend = 0
312
-
max_percent_to_lend = 0
313
-
max_to_lend_rate = 0
314
-
315
-
316
274
Config per Coin
317
275
---------------
318
276
@@ -357,6 +315,24 @@ Max Active Amount (Limit Total Lending)
357
315
min_loan_size = 150
358
316
max_active_amount = 5000.0 # Only lend up to 5000 USD total
359
317
318
+
Max Offer Size (Smooth Lending Over Time)
319
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
320
+
321
+
- ``max_offer_size`` limits the maximum amount of coin placed in a single loan offer. Found in the ``[coin.default]`` or specific ``[coin.SYMBOL]`` section.
322
+
323
+
- Default value: -1 (unlimited)
324
+
- Allowed values:
325
+
- ``-1`` = Unlimited (standard spreading applies)
326
+
- ``> 0`` = Limit (cap each individual offer to this amount)
327
+
- If set to >0, no individual loan offer will exceed this amount. Unused balance remains in your wallet and will be offered in the next bot cycle (e.g. 60 seconds later). This effectively creates a Dollar Cost Averaging (DCA) effect, smoothing out your lending rates over time.
328
+
329
+
Example configuration:
330
+
331
+
.. code-block:: toml
332
+
333
+
[coin.USD]
334
+
max_offer_size = 1000.0 # Never place an offer larger than 1000 USD
0 commit comments