Skip to content

Show the terms a position is governed by - #77

Open
Enochthedev wants to merge 1 commit into
mainfrom
wavedidwhat/gho-30-show-users-the-terms-of-their-position
Open

Show the terms a position is governed by#77
Enochthedev wants to merge 1 commit into
mainfrom
wavedidwhat/gho-30-show-users-the-terms-of-their-position

Conversation

@Enochthedev

Copy link
Copy Markdown
Collaborator

Closes GHO-30.

A user could see their position and not one rule governing it. Confirmed all nine values against the live Sepolia deployment while building — the issue's table was right about every one, and three were not in the generated ABI, so the frontend had no way to ask.

  • Terms panel at the foot of the dashboard, not behind a /terms route — reference belongs below state, not further from the health factor it explains.
  • Every figure read from the chain. A panel stating 60% LTV against a vault redeployed at 55% is a user borrowing to a ceiling that does not exist.
  • The LTV/threshold gap stated as 20.00% — the distance between "you may borrow this" and "you may lose collateral". It exists only as a relationship between two immutables, so there is no getter and it appeared nowhere.
  • fullLiquidationThreshold read, not recomputed: deriving it on chain was the fix for a constant copied from Aave, and recomputing it here would put the second copy back.
  • Round terms one row per market, named by the feed's description().
  • Each term carries a sentence about what it costs you.

tsc caught value && format(value) yielding 0n for a zero-valued term — zero is a legitimate rake, so that is now an explicit undefined check.

Detail in ADR 0044 and runbook Part 7.51.

A user could see their position and not one rule governing it. Max LTV
60%, liquidation threshold 80%, bonus 5%, close factor 50%, rake 2%,
entry cutoff 15s — all enforced on chain, none stated in the app, and
three not in the generated ABI at all.

Adds a Terms panel at the foot of the dashboard, read live from the
contracts rather than written into copy: a term the UI believes while the
contract enforces another is the same bug as a hardcoded entry cutoff,
with a worse consequence.

The LTV/threshold gap is computed and stated as a figure — it is the
distance between "you may borrow this" and "you may lose collateral" and
it exists only as a relationship, so it had no getter and appeared
nowhere. Round terms are one row per market, since each market is its own
deployment and can carry its own rake.
@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

GHO-30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant