-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(BA-2964): Premium auction UI/UX for expired names in auction #2691
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
Conversation
✅ Heimdall Review Status
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
||
| export function useBasenamesNameExpires(name: string) { | ||
| // Convert name to full basename format | ||
| const fullBasename = name.includes('.') ? (name as Basename) : formatBaseEthDomain(name, 8453); // Base mainnet |
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.
[nit] Prefer using base from viem
| const fullBasename = name.includes('.') ? (name as Basename) : formatBaseEthDomain(name, 8453); // Base mainnet | |
| import { base } from 'viem/chains'; | |
| const fullBasename = name.includes('.') ? (name as Basename) : formatBaseEthDomain(name, base.id); |
Also should we be supporting testnet here as well? usually we'd do:
const { basenameChain } = useBasenameChain();
const fullBasename = name.includes('.') ? (name as Basename) : formatBaseEthDomain(name, basenameChain.id);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.
Actually good catch. We shouldn't assume base mainnet and can use the useBasenameChain hook to fetch the chain id properly.
| // Add 90 days (grace period) to get the auction start time | ||
| const auctionStartTime = nameExpiresTimestamp | ||
| ? nameExpiresTimestamp + BigInt(GRACE_PERIOD_DURATION_SECONDS) | ||
| : undefined; |
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.
Is it safe to return undefined here? should we throw instead?
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.
Throwing is a good idea. It's handled properly in the functional portion of usePremiumEndDurationRemaining but could look weird in the modal text in PremiumExplainerModal.
| To ensure fair distribution of recently expired Basenames, all names have a price premium | ||
| which starts at 100 ETH that then decays exponentially to 0 over 21 days. |
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.
Does it decay to 0 or is there a base/min price?
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.
Good q, the premium component decays to 0 but the base price is always applied. Let me take another pass at copy.
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.
On second read, the context is specific to price premium so I think it's clear AND the modal shows the price breakdown between the premium and the base price. I think leaving this as-is is fine.
JFrankfurt
left a comment
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.
Arjun's comments all seem good and worth consideration. I have no further input. lgtm otherwise
Approved review 3384180620 from JFrankfurt is now dismissed due to new commit. Re-request for approval.
arjun-dureja
left a comment
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.
LGTM!
What changed? Why?
We had launch premium auction logic in the repo when we launched basenames. Expired names enter a similar dutch auction but the auction params are different. Specifically; the launch auction is 21 days long starting from the moment the name expires. As such the logic we initially had needed to be reworked to fetch the expiry time and then generate ui elements related to the auction given the live expiration auction params.
Screenshare.-.2025-10-24.3_47_40.PM.mp4
Notes to reviewers
How has it been tested?
Have you tested the following pages?
BaseWeb