Show the terms a position is governed by - #77
Open
Enochthedev wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
/termsroute — reference belongs below state, not further from the health factor it explains.fullLiquidationThresholdread, 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.description().tsccaughtvalue && format(value)yielding0nfor 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.