Skip to content

implement configurable prices for oracle - #28

Open
brenzi wants to merge 3 commits into
simplexfrom
ab/names-v2-configurable-prices
Open

implement configurable prices for oracle#28
brenzi wants to merge 3 commits into
simplexfrom
ab/names-v2-configurable-prices

Conversation

@brenzi

@brenzi brenzi commented Aug 31, 2026

Copy link
Copy Markdown

Closes #27.

Adds SimplexPriceOracle, an IPriceOracleUSD implementation whose price list lives in storage instead of in immutables, so changing what a name costs is an owner call rather than a redeploy plus setPriceOracle.

Base $1/yr, rungs at 13 and 32:

setPrices(1e18, [ Rung({maxLength: 13, priceUSDPerYear: 4e18}),
                  Rung({maxLength: 32, priceUSDPerYear: 2e18}) ])

storage after the call: topRung = 32, lengths 1..13 hold 4e18,
lengths 14..32 hold 2e18, basePriceUSDPerYear = 1e18.

Label length Price per year Source
1 to 13 $4 rung 13, inherited downward through the gap
14 to 32 $2 rung 32
33 and up $1 base

And for the duch auction:

setPremium(startPremium, totalDays) retunes the Dutch auction on lapsed names.

@brenzi
brenzi marked this pull request as draft August 31, 2026 13:30
// The real `.simplex` curve, in attoUSD per second: $1/yr at 5+ characters,
// $32 at 4, $128 at 3. With the feed pinned to 1e8 below, 1 attoUSD is 1 wei,
// so a one-year 6-character name costs ~0.9993 ETH in these tests.
// $10/yr at 6+ characters, ten times more for each character lost. With the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why $10

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need a nonzero default. what would you propose instead? We can override it anyway

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.

2 participants