bisq-network / bisq2

GNU Affero General Public License v3.0
164 stars 62 forks source link

Change offers TTL policy #2625

Open suddenwhipvapor opened 1 month ago

suddenwhipvapor commented 1 month ago

Keeping all offers indistinctly online for a total of 15 days even when the maker is offline could become bad UX, where possible takers have to deal with one-shot users who make an offer and then go away to never return, and serious 24/7 makers have to recreate their own offers every 15 days no matter what.

I suggest that there is an offline-grace-period for makers who cannot continuously be online, let's say 24hrs before which your offer will not be deleted, so the offerbook is pruned of dead offers where maker cannot check in daily, and the time-to-live for all other offers, where the maker was online at least daily, is increased, to at least 21 days if we want to use a nice round number.

HenrikJannsen commented 1 month ago

Changed title to make it easier for devs to quickly get what its about...

rodvar commented 1 week ago

21 is a beautiful round number indeed @suddenwhipvapor :)

I'm happy to have a look into this, to round up your idea:

please confirm this is correct? thanks!

suddenwhipvapor commented 1 week ago

21 is a beautiful round number indeed @suddenwhipvapor :)

I'm happy to have a look into this, to round up your idea:

* TTL of offers in general should be increased from 15 to 21 days after this issue gets implemented

* During this period, at any point if the system detects that the user was not offline for more than 24 consecutive hours, the offer gets pruned

please confirm this is correct? thanks!

yes, that's correct!

HenrikJannsen commented 1 week ago

The easiest way is to reduce the TTL to something like 1 day and do a refresh when the maker is online. So if maker was not online in that time the offer is gone, otherwise it gets refreshed before expired. In Bisq1 that's every 5 minutes but here it would be enough to use TTL/2 or so. If maker gets online after that 1 day, we can allow to either automatically re-publish the offer or to ask the user if they want to republish. But this would require to persist the makers offers so its available for the maker for re-publishing after expired. We have only one date field which needs to be updated to current time at each refresh or republish. So we don't know the original creation date, but that could be added to the persisted data if needed. If available we could derive some policy from that (e.g. only refresh for max 2 weeks or so). Alternatively we could ask the user each time before refreshing if they want to still have the offer online. This might be better to create awareness.

suddenwhipvapor commented 1 week ago

okay, that's likely the most effective approach with code efficiency in mind. I would think that for those users with several open offers, having to reactivate each one after every restart will become quite annoying though. On the other side, since a proper "my offers" tab is missing in bisq2, just renewing each one on end is undesirable and makers would have a not nice time finding their offers in the book history to remove them if needed, so in my opinion adding a second date value for the offer creation is useful to just set a 2-3 weeks TTL anyway.

rodvar commented 1 week ago

Awesome guys, I'm happy to add this to my pipeline this month :muscle:

HenrikJannsen commented 1 week ago

okay, that's likely the most effective approach with code efficiency in mind. I would think that for those users with several open offers, having to reactivate each one after every restart will become quite annoying though. On the other side, since a proper "my offers" tab is missing in bisq2, just renewing each one on end is undesirable and makers would have a not nice time finding their offers in the book history to remove them if needed, so in my opinion adding a second date value for the offer creation is useful to just set a 2-3 weeks TTL anyway.

In 2.1.1 there will be a "Show my offers only" checkbox.