Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for SynapseRouterV2 and its periphery [WIP] #257

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

ChiTimesChi
Copy link
Collaborator

@ChiTimesChi ChiTimesChi commented Jul 27, 2023

Description

Adds internal documentation for SynapseRouterV2, to be used for later development.

TODO:

  • Documentation for "how to bridge"
  • Documentation for "how to get a bridge quote"
  • Documentation for "how to swap"
  • Documentation for "how to get a swap quote"
  • Documentation for implementing Router Adapters.
  • Documentation for implementing Bridge Adapters.

Checklist

  • New Contracts have been tested
  • Lint has been run
  • I have checked my code and corrected any misspellings

@coveralls
Copy link

coveralls commented Jul 27, 2023

Pull Request Test Coverage Report for Build 5903898087

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 17.292%

Totals Coverage Status
Change from base Build 5427919227: 0.0%
Covered Lines: 664
Relevant Lines: 3451

💛 - Coveralls

@Defi-Moses
Copy link
Collaborator

Some comments around documentation here:

  • In Line 15, this is the bridge Token (and not the initial token). It may be helpful to tell the developer where to get this token from (since the bridge token can differ and is not being grabbing solely in the Queries now)

  • In Line 33 why would a user want to skip the swap? For CCTP and when input token == bridge token ?

  • Line 93 and 95 call the same function yet return something different ... is this an error or how the workflow works? It would be helpful to understand what additional information helps to return the entire quote rather than just the bridgeable tokens

  • Small comment: I found the low level bridge quote workflow MUCH more helpful(good job here) than the high-level bridge quote workflow. Im curious if 1. The high-level is even needed 2. We can reword in a way that attempts to simplify instead of pack information tightly

  • SwapQuoter overview needs a "This is useful for..."

  • Although this is internal I remember the idea of a SwapQuery not being trivial. Maybe including a small note that SwapQuery is an object generated in the Router contract that packs information about a swap (as a precursor to a bridge event) on the origin and destination chain. The reason why I say this is because the bridge architecture is not trivial and im imagining if someone not close to the bridge or a new engineer could understand by reading this document.

@ChiTimesChi ChiTimesChi mentioned this pull request Jul 31, 2023
8 tasks
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.

None yet

3 participants