Repository navigation
Give HyperEVM a seven-day market that can take lending offers - #356
Merged
Merged
Conversation
HyperEVM has one market trusting LenderCommitmentForwarderAlpha -
market 3, created outside this repo - and its payment cycle is thirty
days. For an EMI market that is not merely a longer default, it is a
ceiling on how short a loan can be at all: TellerV2 sizes payments
through V2Calculations, EMI lands in NumbersLib.pmt, and pmt opens with
require(loanDuration >= cycleDuration)
So a seven-day offer published into market 3 cannot be drawn. It
publishes, sits in the book looking entirely normal, and reverts for
every borrower who tries. Teller Pro's on-demand lending writes
seven-day terms everywhere it can and has been forced back to thirty on
this chain for exactly that reason.
A market of its own is the only fix. The per-market forwarder slot holds
one address, so granting Alpha on market 1 - the seven-day pools market
- would not add offers, it would take that market's pools off line. That
is the trap Arc hit, and why Base runs offers on 22 and pools on 18.
The market this task creates is Bullet on a seconds cycle, so the pmt
floor does not apply to it at all: one payment at the end, priced off
the cycle rather than divided by it. The seven days here is the term we
want, not a constraint being worked around.
Nothing else in the file changes. The header and the comment above
`markets` both said every number there describes market 2 as it already
is and is never applied; that stays true of `long` and is not true of
the new entry, so both now say which is which.
Not deployed. Running it is `yarn hh bootstrap-markets --network
hyperevm`, which needs the deployer key and gas on HyperEVM; re-running
is safe, since anything already in deployments/hyperevm/market-bootstrap.json
is skipped.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1HkrFB3R5NcaNt5tLfXr7
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.
Why
HyperEVM has exactly one market that trusts
LenderCommitmentForwarderAlpha— market 3, created outside this repo — and its payment cycle is thirty days.For an EMI market that is not just a longer default, it is a floor on how short a loan can be at all. TellerV2 sizes payments through
V2Calculations, EMI lands inNumbersLib.pmt, andpmtopens with:So a seven-day lending offer published into market 3 cannot be drawn. It publishes, sits in the book looking entirely normal, and reverts for every borrower who tries. Teller Pro's on-demand lending writes seven-day terms wherever it can, and HyperEVM is the one chain where it has been forced back to thirty for exactly this reason.
Why a new market rather than a grant
The per-market forwarder slot holds exactly one address. Granting Alpha on market 1 — the seven-day pools market — would not add offers, it would take that market's pools off line. That is the trap Arc hit, and why Base runs offers on 22 and pools on 18.
What this adds
One
shortOffersentry inconfig/chain-bootstrap/hyperevm.ts:purposeoffers(trustsLenderCommitmentForwarderAlpha, gets no pools)durationSecondspaymentDefaultDurationbidExpirationTimebootstrap-marketscreates Bullet markets on a seconds cycle, so thepmtfloor above does not apply to what it makes: one payment at the end, priced off the cycle rather than divided by it. The seven days here is the term we want, not a constraint being worked around.What does not change
No pools are attached to it, and it stays out of
activateMarkets. The hyperRAM entries are untouched.The file's header and the comment above
marketsboth said every number there describes market 2 as it already is and is never applied. That stays true oflongand is not true of the new entry, so both now say which is which — otherwise the next reader takes the new market's numbers for documentation and edits them expecting nothing to happen.Deploying
Not deployed by this PR. Once merged:
with
CONTRACTS_REFrepinned to develop's head. Re-running is safe — anything already indeployments/hyperevm/market-bootstrap.jsonis skipped, so only the new market is created. The resulting market id then goes into Teller Pro'sODL_OFFER_MARKET_BY_CHAINas a seven-day Bullet row.🤖 Generated with Claude Code
https://claude.ai/code/session_01S1HkrFB3R5NcaNt5tLfXr7
Generated by Claude Code