Update ERC-8056: add optional UIMultiplierUpdateCancelled event - #1946
Open
robriks wants to merge 5 commits into
Open
Update ERC-8056: add optional UIMultiplierUpdateCancelled event#1946robriks wants to merge 5 commits into
robriks wants to merge 5 commits into
Conversation
Collaborator
Adds Markus Osterlund (Base) to the author list, per assent from the existing authors. Base implemented ERC-8056 in its B20 asset standard and contributed the optional UIMultiplierUpdateCancelled event in this PR. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Adds an optional
UIMultiplierUpdateCancelledevent to ERC-8056, as dscussed on the ERC-8056 thread: comment #15.Motivated by a full ERC-8056 integration in Base's B20 asset standard.
What it adds
When an issuer schedules a UI multiplier update via the Pending Multiplier extension (
newUIMultiplier/effectiveAt), the spec today has no signal if that pending update is later cancelled or superseded before it takes effect. An indexer that observed the schedulingUIMultiplierUpdatedhas no on-chain way to tell the schedule was withdrawn or replaced, so its projected multiplier timeline can silently diverge from what actually happens on chain.Deliberately an event only, with no accompanying function:
setUIMultiplieris already left to the issuer.TransferWithUIAmountprecedent, an optional event on the core interface. Events do not affect interface IDs, so there are no interface ID changes and no new extension interface.Changes
cancelUIMultiplierUpdate()example, and aligns thesetUIMultiplierbranch boundary withuiMultiplier()(>=) so an update that has just become effective is no longer treated as still pending.On that last item:
uiMultiplier()treats a pending update as effective atcurrentTime >= _effectiveAt, butsetUIMultiplierbranched on>. At exactlycurrentTime == _effectiveAtthe update has taken effect yet fell into the "still pending" branch, where it would be discarded and reported with a staleoldMultiplier. Aligning the boundary also keeps the new event from firing for an update that already took effect.Context
The same gap has surfaced independently elsewhere: BNB's BEP-677 added scheduled-update and overwrite-audit events, and Solana's original
ScaledUiAmounthas the same overwrite-a-pending behavior with a documented two-transaction workaround and no cancellation signal.