Skip to content

Conversation

@joaobrunoah
Copy link
Collaborator

@joaobrunoah joaobrunoah commented Oct 10, 2025

Description

swapExactIn and swapExactOut need to support multiple ToB traders. These traders know exactly how much they'll pay and how much they'll receive in the transaction, so there's no minimum and maximum limits, only exact amounts.

The pathsToB swap aggregates all ToB swaps and the resulting swaps need to match perfectly the sum of ToB orders.

Notice that the test coverage is not 100% anymore. That's because the user signtures are not used. However, in the next PR, a support to user swaps that come after ToB swaps will be added, so these signatures were kept in the code.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency changes
  • Code refactor / cleanup
  • Optimization: [ ] gas / [ ] bytecode
  • Documentation or wording changes
  • Other

Checklist:

  • The diff is legible and has no extraneous changes
  • Complex code has been commented, including external interfaces
  • Tests have 100% code coverage
  • The base branch is either main, or there's a description of how to merge

Issue Resolution

Closes #8

bytes signature;
}

/***************************************************************************
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Events go above errors. (Was wrong in original; I didn't catch it last time.)

@joaobrunoah joaobrunoah marked this pull request as draft October 28, 2025 09:55
@joaobrunoah
Copy link
Collaborator Author

Converting to Draft since the implementation of ToB will change. The paths are not combined, and it needs to allow slippage since the pools may be boosted.

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.

3 participants