-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui: reputation and limits #2575
Conversation
buck54321
commented
Oct 23, 2023
•
edited
Loading
edited
Looks really good. The "2.0 parcels..." sentence sounds rather cryptic to the uninitiated though, could this info be rephrased differently? |
For sure. Taking suggestions. |
3bdc6a3
to
d1658a6
Compare
There's a factor of 2 applied. PerTierBaseParcelLimit = 2 That factor is necessary so that an operator cannot accidentally make it impossible to block all likely taker orders, which have their weight doubled.
Good call. I do want to show some indicator of their current usage, but yeah, that sentence is crap and just showing lots and quantity is better.
Looks like that's fixed in #2577, which I need to review now.
I don't really agree on this. I think auto-rotation should always be enabled for GUI users, or possible disabled in settings only. What I do want to do though is to not allow renewal of bonds if all of the current bonds are expired on startup, indicating the user hasn't used dexc in a while. |
I don't plan to limit trading tier, just the number of penalties that can be offset. |
For all markets? That seems like a lot. |
d1658a6
to
ebe7a2a
Compare
I don't think it's really possible to know that auto-rotation will be happening. Maybe put a checkbox that is checked by default? I'm thinking that if someone tries dexc and if they don't like it, they would want to get their funds back. When they open dexc 30 days later and their bonds automatically get reposted, they will be pissed.
I feel like you'd want to see some information to determine how many bonds you want to post. |
ebe7a2a
to
ca9f40c
Compare
I've added a ton more info in the new "What's a bond" popup, including info about auto-renewal and how to disable. I've then added a "Auto Renew" toggle on the settings page (which either just sets the tier to 0 or shows the tier form). I agree about auto-renewing when they haven't used dexc in a while. As I mentioned, we should disable auto-renew if all bonds are already expired on startup, but it will involve a fair amount of work, because we need to catch that state, prevent auto-renew in core, deliver an indicator through the API, and show new dialogs. I'd like to save that work for a separate effort, if that's OK. Will open an issue.
That's why I show the info on the tier form though. So they know how many to post. I'm not opposed to showing the limits for all markets somewhere else, but I don't like the idea of stuffing it all on the dexsettings page shown by default, and thinking of how users might actually care about the info, it's most likely that they've already seen their limits from the markets view and want to increase their limits, so the tier form is already the right place. |
client/webserver/locales/en-us.go
Outdated
"1 Sync the Blockchain": "1: Sync the Blockchain", | ||
"Progress": "Progress", | ||
"remaining": "remaining", | ||
"2 Fund your Wallet": "2: Fund your Wallet", | ||
"whatsabond": "Fidelity bonds are time-locked funds redeemable only by you, but in the future. This is meant to combat disruptive behavior like backing out on swaps.", | ||
"bond_definition": "A fidelity bond is funds temporarily locked in an on-chain contract. After the contract expires, your wallet will reclaim the funds. On mainnet, funds are locked for up to 2 months.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When reading this I would ask, "can I lock them for less than 2 months, and how?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I remove the "up to" part?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, unless we add a setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add a setting to increase the bond lock, but not to decrease. Will change the messaging for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple things while lightly testing.
Is the lower bound here with no good behavior and the upper with very good behavior?
Unsure if related to these changes but something is weird with wallets you do not currently have created. Here I made a simnet dex with dcr, btc, and eth, and did the normal ui client creation. However when looking at the markets, it used to show that I could create the eth wallet here but now it either shows nothing or the wrong wallet. This is the btc/eth market but look at the wallets. After adding an eth wallet it looked fine, but the position of the market changed on the left which was slightly unexpected:
// function roundParcels (p: number): number { | ||
// return Math.floor(Math.round((p * 1e8)) / 1e8) | ||
// } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused.
this.dexAddrForm = new forms.DEXAddressForm(page.dexAddrForm, async (xc: Exchange) => { | ||
window.location.assign(`/dexsettings/${xc.host}`) | ||
}, undefined, this.host) | ||
|
||
forms.bind(page.bondDetailsForm, page.updateBondOptionsConfirm, () => this.updateBondOptions()) | ||
// forms.bind(page.bondDetailsForm, page.updateBondOptionsConfirm, () => this.updateBondOptions()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove?
|
||
tmpl.tradeLimitSymbol.textContent = unitInfo.conventional.unit | ||
tmpl.name.textContent = asset.name | ||
// assetTmpl.confs.textContent = String(bondAsset.confs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove?
@JoeGruffins I'm a little confused. You claim that you |
Srry, by used to I mean in previous commits. This was a new client with no eth wallet yet. Let me try on master and then on this again to make sure. |
Oh. It's probably because this branch doesn't include #2577 yes. I need to rebase. |
Adapt registration forms to bonding. Show trading limits for the tier input value. Add bond data to bond options registration form. Reuse registration forms for updating bond options on dexsettings. Show tier and reputation on dexsettings. Show parcel limits and reputation on markets view. A couple of notes. Nowhere are we going to show the cost of an individual bond, because that value is misleading. Instead, we'll show the "bond lock", which is the amount that will actually be locked for the given tier. I have removed the simnetfiatrates settings. fiat rates are all on by default. I have also changed coinpaprika so that it pulls all coin data, instead of just the ones with wallets. This enables us to e.g. show USD conversion of the bond lock value for assets that we don't yet have a wallet for.
ca9f40c
to
bcd91f6
Compare