Skip to content

vaultless trade bug#2435

Open
rouzwelt wants to merge 3 commits into2025-07-11-direct-swapfrom
2026-02-04-valtless-swap-bug
Open

vaultless trade bug#2435
rouzwelt wants to merge 3 commits into2025-07-11-direct-swapfrom
2026-02-04-valtless-swap-bug

Conversation

@rouzwelt
Copy link
Contributor

@rouzwelt rouzwelt commented Feb 4, 2026

Motivation

Caution

This PR is chained after #1988

This PR adds a test for vautless trade (takeOrder4()),
this test currently fails most probably due to the fact that:

  • recordVaultIO() for the order tries to first pushTokens() to the order owner for the order's input by calling increaseVaultBalance().
  • This potentially can succeed fi orderbook has enough balance to cover for that token transfer, but if not, this direct token transfer fails due to the fact that the required tokens have not been taken from the taker yet
  • Why this doesnt fail for taking normal orders? because there is no direct token transfer in increaseVaultBalance() and increaseVaultBalance(), its just a change in the vault balance mappings in that case

Solution

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

@rouzwelt rouzwelt self-assigned this Feb 4, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 2026-02-04-valtless-swap-bug

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 and usage tips.

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

Comments