Repository navigation
feat: add rebasing token extension with on-chain sync tool - #161
Merged
Merged
Conversation
Adds extensions.rebasing for tokens whose balances change without a transfer (Aave aTokens, stETH, AMPL, OUSD), populated by tools/sync-rebasing.ts via on-chain selector probes. Flags 285 tokens.
miguelmota
approved these changes
Sep 28, 2026
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.
Problem
Rebasing tokens change balances without a transfer. Aave aTokens also round transfers by a unit, so any fixed amount computed at quote time can be short by the time it executes. Trails hit this with aBasUSDC on Base: the origin fee transfer underflowed by 1 unit and the intent executed without collecting the fee. There is no flag for consumers to detect these tokens.
Change
extensions.rebasing: true, modelled onfeeOnTransfer(present only when true).tools/sync-rebasing.ts(pnpm sync-rebasing), which detects rebasing tokens on-chain by probing for selector pairs only rebasing implementations expose:UNDERLYING_ASSET_ADDRESS+scaledBalanceOfunderlyingAssetAddress+principalBalanceOfgetPooledEthByShares+sharesOfrebasingCreditsPerToken+nonRebasingSupplyscaledBalanceOf+scaledTotalSupplysync-rebasingand the existingsync-fee-on-transfertool in the README, and links both from the token schema.Notes
totalSupplysentinel. Public RPCs silently drop calls from large multicalls, which otherwise reads as "not rebasing". Failed sentinels are retried in smaller batches, then as individualeth_calls.rebasingkey from every changed file gives JSON identical to master, and re-running--writeis a no-op.