multisend: guard array lengths, add tests, and ci#5
Open
mooncitydev wants to merge 1 commit into
Open
Conversation
Made-with: Cursor
michwill
added a commit
that referenced
this pull request
Jun 14, 2026
The audited oracle (fb3c746) scaled by stored lt.liquidity()/lt.totalSupply(), producing the staking/fee-dependent deviation. Commit 45949eb added _calculate_fresh_lv() replicating LT._calculate_values (admin-fee accrual + token_reduction supply burn), used on the normal pricing path. Document the response and the rare fallback-branch residual; no code change. Assisted-by: Claude <noreply@anthropic.com>
michwill
added a commit
that referenced
this pull request
Jun 14, 2026
Capped-virtual-price variant for lending integrations (e.g. LlamaLend). Raw price equals YBLendingOracle.price_in_asset (real virtual_price, all audit fixes #1/#2/#4/#5/#007), with a symmetric time-aware EMA (alpha = exp(-dt/EMA_TIME), EMA_TIME=866 -> ~10min half-life) layered on top to smoothen sharp ybBTC/BTC moves both ways. price_w() also checkpoints the aggregator via agg.price_w(). Documents the smoothing caveat: it is the standard discrete EMA (Curve price_oracle form), not a true continuous EMA, so the first interaction after a long idle gap snaps to the current raw and re-anchors; consumers must checkpoint regularly. Tests cover upward step (10-min half-life), downward step, and settled tracking of the base oracle. Assisted-by: Claude <noreply@anthropic.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.
Summary
len(users) == len(amounts)inMultisend.sendso mismatched arrays cannot read pastamountsor confuse operators.@devwhen some recipients were already paid.pytest tests/ -n auto(flake8 omitted: upstream already has violations in tests/scripts).made by mooncitydev