Skip to content

multisend: guard array lengths, add tests, and ci#5

Open
mooncitydev wants to merge 1 commit into
yield-basis:masterfrom
mooncitydev:multisend-tests-and-ci
Open

multisend: guard array lengths, add tests, and ci#5
mooncitydev wants to merge 1 commit into
yield-basis:masterfrom
mooncitydev:multisend-tests-and-ci

Conversation

@mooncitydev

Copy link
Copy Markdown

Summary

  • Assert len(users) == len(amounts) in Multisend.send so mismatched arrays cannot read past amounts or confuse operators.
  • Document index pairing in @dev when some recipients were already paid.
  • Add Titanoboa tests for Multisend (payouts, length revert, index alignment across two batches).
  • Add GitHub Actions workflow running pytest tests/ -n auto (flake8 omitted: upstream already has violations in tests/scripts).

made by mooncitydev

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>
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