Skip to content

Index DTF v6: explicit version contract, protocol-accurate auction state, v6 open auction - #45

Open
lcamargof wants to merge 5 commits into
mainfrom
feat/index-dtf-v6-support
Open

lcamargof wants to merge 5 commits into
mainfrom
feat/index-dtf-v6-support

Conversation

@lcamargof

Copy link
Copy Markdown
Collaborator

Summary

Folio 6.0 support across the Index DTF rebalance surface, with an explicit version contract.

  • Version contract. prepareIndexDtfOpenAuctionArgs, prepareIndexDtfOpenAuction, buildIndexDtfStartRebalanceArgs and the write-ABI selector require version ("5.0.0" | "6.0.0") and reject anything else with SdkError(INVALID_INPUT); buildIndexDtfStartRebalance reads the proxy version when none is passed and applies the same check. The settings builders share the guard. Folio 4.x is intentionally not admitted (Register keeps it local).
  • Auction state. getLatestAuction / getActiveAuction resolve one block first and pin every read to it, report currentRebalanceNonce and blockNumber, and treat an auction as active only while startTime <= now <= endTime (inclusive, as Folio's bid checks) and its nonce matches the current rebalance.
  • v6 open auction. The args builder takes auctionLength, drives the library's V6 math with it and carries it into the six-argument calldata; an explicit length that diverges from the one the math used is rejected. New getIndexDtfMaxAuctionLength / useIndexDtfMaxAuctionLength read the protocol's ceiling.
  • Validation. Open-auction inputs reject zero, negative or non-finite prices before the rebalance library runs.
  • Generated v6 ABIs (Folio, deployer, version registry), six-argument startRebalance with nonce and deadline, v6 settings setters, fork-smoke fixture lane, docs and changesets.

Evidence

  • turbo build --force, typecheck, lint, format, check:sdk-bundle, docs:links green; core 400+ tests and React 85 tests pass.
  • Register (paired PR) runs its full offline suite and a real BSC fork launch on this build.

Release

Minor release for both packages (changesets included). Register pins the published pair exactly before its merge.

…ion state for v6

Folio 6.0 support across the rebalance surface: generated v6 ABIs, six-argument
startRebalance with nonce and deadline, openAuction with the trailing auction
length, v6 settings setters and deploy/registry ABIs.

Version contract: prepareIndexDtfOpenAuctionArgs, prepareIndexDtfOpenAuction,
buildStartRebalanceArgs and the write-ABI selector require "5.0.0" | "6.0.0"
and reject anything else with a typed error; buildIndexDtfStartRebalance reads
the proxy version when none is passed. v4 stays Register-local by decision.

Auction state: getLatestAuction/getActiveAuction resolve one block and pin
every read to it, compare the auction nonce with the current rebalance nonce,
and use the inclusive bid window Folio enforces. Open-auction inputs reject
non-positive or non-finite prices before the rebalance library runs.
…l rebalance reads in open-auction input

Adds getIndexDtfMaxAuctionLength (namespace, ref, React hook and query key) so
launchers can pass the protocol's required v6 auction length once, and relaxes
prepareIndexDtfOpenAuctionArgs to accept a rebalance read without bidsEnabled,
which the auction math never uses.
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1b874818-18e5-41cd-9755-01be2ab56b63


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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