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

first pass at updating RFQ relayer documentation #3000

Merged
merged 5 commits into from
Aug 22, 2024
Merged

Conversation

Defi-Moses
Copy link
Collaborator

@Defi-Moses Defi-Moses commented Aug 9, 2024

Took a first pass and updated feedback that weve gotten from developers and teams. Two items are currently missing

  1. Added observability into balances + transaction status for relayers not using the implementation provided (blocked by me)
  2. Correct CCTP rebalancing config in the example. I think the error is from just not having a configured omnirpc value but maybe @dwasse can take a quick look (maybe it needs its own unique submitter config ?)

Summary by CodeRabbit

  • Documentation
    • Clarified the expected format for signature values in the RFQ API documentation.
    • Expanded details on supported blockchain networks and the prove function in the Synapse RFQ contract documentation.
    • Introduced the "Dispute Period and Guards" section to enhance transaction integrity and security measures.
    • Updated the Relayer documentation to specify the need for whitelisting and clarified rebalancing logic and configuration guidance.

eca0c94: docs preview link
5f1bcdb: docs preview link

@Defi-Moses Defi-Moses requested a review from dwasse August 9, 2024 11:10
Copy link
Contributor

coderabbitai bot commented Aug 9, 2024

Walkthrough

The recent documentation updates provide clarity and detail across the RFQ API, Synapse RFQ Contract, and Relayer functionalities. Changes include specifying the signature format for the RFQ API, adding support for additional blockchain networks, detailing the prove function, and outlining security mechanisms for transaction integrity. These modifications aim to enhance users' understanding of operational requirements and functionalities.

Changes

Files Change Summary
docs/bridge/docs/rfq/API/API.md Clarified signature format for the RFQ API, specifying V values as 0 or 1 instead of 27 or 28, with a subtraction method.
docs/bridge/docs/rfq/Contracts.md Expanded on bridge transactions, added support for new networks, clarified prove function usage, and introduced dispute mechanisms.
docs/bridge/docs/rfq/Relayer/Relayer.md Enhanced clarity on relayer functionality, emphasized whitelisting, expanded rebalancing loop details, and improved readability.

Poem

🐇 In the meadows of code, we leap with glee,
New changes and features, as bright as can be!
Whitelists and signatures, all clear as the sun,
With bridges and rebalancers, we’ve only begun!
So hop along, friends, let’s celebrate this day,
For our RFQ journey is now on its way! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the M-docs label Aug 9, 2024
Copy link

cloudflare-workers-and-pages bot commented Aug 9, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 60e7cbf
Status: ✅  Deploy successful!
Preview URL: https://416042ec.sanguine-fe.pages.dev
Branch Preview URL: https://docs-rfq-update.sanguine-fe.pages.dev

View logs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (3)
docs/bridge/docs/rfq/Contracts.md (1)

51-51: Use a Heading Instead of Emphasis.

The text "ChainGas" should be formatted as a heading to improve readability and adhere to Markdown best practices.

- **ChainGas**
+ ### ChainGas
Tools
Markdownlint

51-51: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

docs/bridge/docs/rfq/Relayer/Relayer.md (2)

96-96: Avoid Using Bare URLs.

The URL for the Omnirpc instance should be formatted as a hyperlink to enhance readability and adhere to Markdown best practices.

- omnirpc_url: 'http://omnirpc' # url of the omnirpc instance, please reference [this](../../Services/Omnirpc) for proper configuration
+ omnirpc_url: '[Omnirpc URL](http://omnirpc)' # url of the omnirpc instance, please reference [this](../../Services/Omnirpc) for proper configuration
Tools
Markdownlint

96-96: null
Bare URL used

(MD034, no-bare-urls)


182-182: Avoid Using Bare URLs.

The URL for the base Omnirpc should be formatted as a hyperlink to enhance readability and adhere to Markdown best practices.

- base_omnirpc_url: "http://omnirpc" # Make sure this is configured properly
+ base_omnirpc_url: "[Omnirpc URL](http://omnirpc)" # Make sure this is configured properly
Tools
Markdownlint

182-182: null
Bare URL used

(MD034, no-bare-urls)

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 085a758 and 1461e3a.

Files selected for processing (3)
  • docs/bridge/docs/rfq/API/API.md (1 hunks)
  • docs/bridge/docs/rfq/Contracts.md (3 hunks)
  • docs/bridge/docs/rfq/Relayer/Relayer.md (4 hunks)
Additional context used
Markdownlint
docs/bridge/docs/rfq/Contracts.md

51-51: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

docs/bridge/docs/rfq/Relayer/Relayer.md

96-96: null
Bare URL used

(MD034, no-bare-urls)


182-182: null
Bare URL used

(MD034, no-bare-urls)

LanguageTool
docs/bridge/docs/rfq/Relayer/Relayer.md

[style] ~7-~7: Consider a shorter alternative to avoid wordiness.
Context: ...- :::note Relayers must be whitelisted in order to fill bridgeRequests. ::: At a high le...

(IN_ORDER_TO_PREMIUM)


[grammar] ~32-~32: Probably a preposition is missing after ‘continue’.
Context: ...is below the maintenance_balance_pct, continue 2. Calculate the amount to rebalance by taking the d...

(ATD_VERBS_TO_COLLOCATION)


[style] ~34-~34: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ebalance to the max_rebalance_amount. If the amount to rebalance is less than th...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~37-~37: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...lementation for certain native bridges (e.g Scroll) is also supported. It works sli...

(E_G)

Additional comments not posted (5)
docs/bridge/docs/rfq/API/API.md (1)

34-35: Clarification on Signature V Values.

The added note effectively clarifies the requirement for V values in signatures to be 0 or 1, which is crucial for users to correctly interact with the RFQ API. This enhances the documentation's clarity.

docs/bridge/docs/rfq/Contracts.md (2)

11-15: Expansion of Supported Networks.

The addition of new entries for "Scroll," "Linea," "BNB Chain," and "Blast" networks provides users with more comprehensive information on supported platforms. This is a valuable update for users integrating with these networks.


41-47: Introduction of Dispute Period and Guards.

The new section on dispute periods and guards enhances the documentation by outlining mechanisms that ensure the integrity of bridge transactions. This addition is crucial for understanding the security framework of the RFQ system.

docs/bridge/docs/rfq/Relayer/Relayer.md (2)

7-8: Note on Whitelisting Relayers.

The added note emphasizes the critical requirement for relayers to be whitelisted, which is essential for operational compliance. This clarification is important for users to understand the prerequisites for relayer functionality.

Tools
LanguageTool

[style] ~7-~7: Consider a shorter alternative to avoid wordiness.
Context: ...- :::note Relayers must be whitelisted in order to fill bridgeRequests. ::: At a high le...

(IN_ORDER_TO_PREMIUM)


30-30: Clarification on Rebalancing Loop.

The expanded explanation of the rebalancing loop and support for native bridges like Scroll provides valuable insights into the relayer's operational scope. This addition improves the documentation's comprehensiveness.

@Defi-Moses Defi-Moses marked this pull request as ready for review August 13, 2024 21:22
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request updates the RFQ (Request for Quote) system documentation in the Synapse project, enhancing clarity and providing more detailed guidance for developers and users.

  • Added note about relayer whitelisting requirement in /docs/bridge/docs/rfq/Relayer/Relayer.md
  • Introduced "Dispute Period and Guards" section in /docs/bridge/docs/rfq/Contracts.md to explain security measures
  • Expanded supported blockchain networks list in /docs/bridge/docs/rfq/Contracts.md
  • Clarified API signature requirements in /docs/bridge/docs/rfq/API/API.md, specifying V values should be 0/1 instead of 27/28
  • Enhanced rebalancing logic explanation, including CCTP and native bridge (e.g., Scroll) implementations in /docs/bridge/docs/rfq/Relayer/Relayer.md

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Outside diff range, codebase verification and nitpick comments (4)
docs/bridge/docs/rfq/Relayer/Relayer.md (4)

5-9: Consider reducing wordiness in the note.

The note could be made more concise. Consider revising to: "Relayers must be whitelisted to fill bridge requests."

- Relayers must be whitelisted in order to fill bridgeRequests.
+ Relayers must be whitelisted to fill bridge requests.
Tools
LanguageTool

[style] ~7-~7: Consider a shorter alternative to avoid wordiness.
Context: ...- :::note Relayers must be whitelisted in order to fill bridgeRequests. ::: At a high le...

(IN_ORDER_TO_PREMIUM)


30-38: Improve readability and grammar in the rebalancing section.

Consider the following revisions for clarity and grammatical accuracy:

  • Add a preposition after "continue" in step 1.
  • Vary sentence beginnings in step 3.
  • Correct the abbreviation "e.g." to "e.g.,".
  • Add a comma after "differently".
  • Add "the" before "mainnet" for clarity.
- If the balance is below the `maintenance_balance_pct`, continue
+ If the balance is below the `maintenance_balance_pct`, then continue

- If the amount to rebalance is greater than the `max_rebalance_amount`, set the amount to rebalance to the `max_rebalance_amount`. If the amount to rebalance is less than the `min_rebalance_amount`, do not rebalance.
+ If the amount to rebalance exceeds the `max_rebalance_amount`, adjust it to the `max_rebalance_amount`. Conversely, if it is below the `min_rebalance_amount`, skip rebalancing.

- The implementation for certain native bridges (e.g Scroll) is also supported. It works slightly differently as flows are only supported between Scroll and Mainnet.
+ The implementation for certain native bridges (e.g., Scroll) is also supported. It works slightly differently, as flows are only supported between Scroll and the Mainnet.
Tools
LanguageTool

[grammar] ~32-~32: Probably a preposition is missing after ‘continue’.
Context: ...is below the maintenance_balance_pct, continue 2. Calculate the amount to rebalance by taking the d...

(ATD_VERBS_TO_COLLOCATION)


[style] ~34-~34: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ebalance to the max_rebalance_amount. If the amount to rebalance is less than th...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~37-~37: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...lementation for certain native bridges (e.g Scroll) is also supported. It works sli...

(E_G)


[uncategorized] ~37-~37: Possible missing comma found.
Context: ...l) is also supported. It works slightly differently as flows are only supported between Scr...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~37-~37: You might be missing the article “the” here.
Context: ...nd if imbalanced, initiates a bridge to mainnet, allowing the CCTP relayer to rebalance...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


96-96: Format the bare URL properly.

Use markdown syntax to format the URL: [Omnirpc section](../../Services/Omnirpc).

- omnirpc_url: 'http://omnirpc' # url of the omnirpc instance, please reference the Omnirpc section under Services for proper configuration
+ omnirpc_url: 'http://omnirpc' # url of the omnirpc instance, please reference the [Omnirpc section](../../Services/Omnirpc) under Services for proper configuration
Tools
Markdownlint

96-96: null
Bare URL used

(MD034, no-bare-urls)


182-182: Format the bare URL properly.

Use markdown syntax to format the URL: [Omnirpc](http://omnirpc).

- base_omnirpc_url: "http://omnirpc" # Make sure this is configured properly
+ base_omnirpc_url: "[Omnirpc](http://omnirpc)" # Make sure this is configured properly
Tools
Markdownlint

182-182: null
Bare URL used

(MD034, no-bare-urls)

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1461e3a and 85cc702.

Files selected for processing (1)
  • docs/bridge/docs/rfq/Relayer/Relayer.md (4 hunks)
Additional context used
LanguageTool
docs/bridge/docs/rfq/Relayer/Relayer.md

[style] ~7-~7: Consider a shorter alternative to avoid wordiness.
Context: ...- :::note Relayers must be whitelisted in order to fill bridgeRequests. ::: At a high le...

(IN_ORDER_TO_PREMIUM)


[grammar] ~32-~32: Probably a preposition is missing after ‘continue’.
Context: ...is below the maintenance_balance_pct, continue 2. Calculate the amount to rebalance by taking the d...

(ATD_VERBS_TO_COLLOCATION)


[style] ~34-~34: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ebalance to the max_rebalance_amount. If the amount to rebalance is less than th...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~37-~37: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...lementation for certain native bridges (e.g Scroll) is also supported. It works sli...

(E_G)


[uncategorized] ~37-~37: Possible missing comma found.
Context: ...l) is also supported. It works slightly differently as flows are only supported between Scr...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~37-~37: You might be missing the article “the” here.
Context: ...nd if imbalanced, initiates a bridge to mainnet, allowing the CCTP relayer to rebalance...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

Markdownlint
docs/bridge/docs/rfq/Relayer/Relayer.md

96-96: null
Bare URL used

(MD034, no-bare-urls)


182-182: null
Bare URL used

(MD034, no-bare-urls)

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 85cc702 and 480ccf2.

Files selected for processing (2)
  • docs/bridge/docs/rfq/Contracts.md (3 hunks)
  • docs/bridge/docs/rfq/Relayer/Relayer.md (4 hunks)
Additional context used
Markdownlint
docs/bridge/docs/rfq/Contracts.md

13-13: Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe
Table pipe style

(MD055, table-pipe-style)


13-13: Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


13-13: Expected: 2; Actual: 1; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)


56-56: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

docs/bridge/docs/rfq/Relayer/Relayer.md

114-114: null
Bare URL used

(MD034, no-bare-urls)


200-200: null
Bare URL used

(MD034, no-bare-urls)

LanguageTool
docs/bridge/docs/rfq/Relayer/Relayer.md

[style] ~7-~7: Consider a shorter alternative to avoid wordiness.
Context: ...- :::note Relayers must be whitelisted in order to fill bridgeRequests. ::: At a high le...

(IN_ORDER_TO_PREMIUM)


[grammar] ~32-~32: Probably a preposition is missing after ‘continue’.
Context: ...is below the maintenance_balance_pct, continue 2. Calculate the amount to rebalance by taking the d...

(ATD_VERBS_TO_COLLOCATION)


[style] ~34-~34: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ebalance to the max_rebalance_amount. If the amount to rebalance is less than th...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~37-~37: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...lementation for certain native bridges (e.g Scroll) is also supported. It works sli...

(E_G)


[uncategorized] ~37-~37: Possible missing comma found.
Context: ...l) is also supported. It works slightly differently as flows are only supported between Scr...

(AI_HYDRA_LEO_MISSING_COMMA)

Additional comments not posted (8)
docs/bridge/docs/rfq/Contracts.md (4)

30-30: Clarification on prove function usage is clear.

The requirement for the prove function to be called from the solver's address is well-explained and adds necessary detail.


44-44: On-Chain Statuses are well-defined.

The statuses provide a clear understanding of the transaction lifecycle in the RFQ contract.


46-52: Dispute mechanisms are clearly explained.

The section provides a thorough understanding of the dispute period and the role of guards in ensuring transaction integrity.


56-58: Explanation of sendChainGas is clear.

The section clarifies the purpose and current implementation status of the sendChainGas field, aiding user understanding.

Tools
Markdownlint

56-56: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

docs/bridge/docs/rfq/Relayer/Relayer.md (4)

5-9: Whitelisting requirement is clearly stated.

The note effectively communicates the need for relayers to be whitelisted, providing essential information for users.

Tools
LanguageTool

[style] ~7-~7: Consider a shorter alternative to avoid wordiness.
Context: ...- :::note Relayers must be whitelisted in order to fill bridgeRequests. ::: At a high le...

(IN_ORDER_TO_PREMIUM)


Line range hint 11-21: Quoting process is well-described.

The section provides a clear and detailed explanation of the quoting process and its components.

Tools
LanguageTool

[style] ~7-~7: Consider a shorter alternative to avoid wordiness.
Context: ...- :::note Relayers must be whitelisted in order to fill bridgeRequests. ::: At a high le...

(IN_ORDER_TO_PREMIUM)


Line range hint 39-49: Relaying process is well-documented.

The section provides a clear and detailed explanation of the relaying process and its states.

Tools
LanguageTool

[grammar] ~32-~32: Probably a preposition is missing after ‘continue’.
Context: ...is below the maintenance_balance_pct, continue 2. Calculate the amount to rebalance by taking the d...

(ATD_VERBS_TO_COLLOCATION)


[style] ~34-~34: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ebalance to the max_rebalance_amount. If the amount to rebalance is less than th...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~37-~37: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...lementation for certain native bridges (e.g Scroll) is also supported. It works sli...

(E_G)


[uncategorized] ~37-~37: Possible missing comma found.
Context: ...l) is also supported. It works slightly differently as flows are only supported between Scr...

(AI_HYDRA_LEO_MISSING_COMMA)


Line range hint 202-204: Observability features are well-documented.

The section provides a clear and detailed explanation of the observability features of the RFQ relayer.

Tools
Markdownlint

200-200: null
Bare URL used

(MD034, no-bare-urls)

Gitleaks

199-199: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

Comment on lines 13 to 15
<<<<<<< HEAD
| BNB Chain| [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://bscscan.com/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) |
| Blast | [0x34F52752975222d5994C206cE08C1d5B329f24dD](https://blastscan.io/address/0x34F52752975222d5994C206cE08C1d5B329f24dD) |
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix table formatting issues.

The table is missing leading and trailing pipes, and the row for "BNB Chain" has too few cells.

Apply this diff to fix the table formatting:

 | Chain    | Address                                                                                                                          |
 | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
 | Arbitrum | [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://arbiscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E)             |
 | Base     | [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://basescan.org/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E)            |
 | Ethereum | [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://etherscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E)            |
 | Optimism | [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://optimistic.etherscan.io/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E) |
 | Scroll   | [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://scrollscan.com/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E)          |
 | Linea    | [0x34F52752975222d5994C206cE08C1d5B329f24dD](https://lineascan.build/address/0x34F52752975222d5994C206cE08C1d5B329f24dD)         |
+| BNB Chain| [0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E](https://bscscan.com/address/0x5523D3c98809DdDB82C686E152F5C58B1B0fB59E)             |
+| Blast    | [0x34F52752975222d5994C206cE08C1d5B329f24dD](https://blastscan.io/address/0x34F52752975222d5994C206cE08C1d5B329f24dD)            |

Committable suggestion was skipped due to low confidence.

Tools
Markdownlint

13-13: Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe
Table pipe style

(MD055, table-pipe-style)


13-13: Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe
Table pipe style

(MD055, table-pipe-style)


13-13: Expected: 2; Actual: 1; Too few cells, row will be missing data
Table column count

(MD056, table-column-count)

@@ -104,7 +111,7 @@ The relayer is configured with a yaml file. The following is an example configur

screener_api_url: 'http://screener-url' # can be left blank
rfq_url: 'http://rfq-api' # url of the rfq api backend.
omnirpc_url: 'http://omnirpc' # url of the omnirpc instance
omnirpc_url: 'http://omnirpc' # url of the omnirpc instance, please reference the Omnirpc section under Services for proper configuration
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix bare URL issue in configuration section.

There are bare URLs in the configuration section that should be formatted as links.

Apply this diff to fix the bare URL issue:

- omnirpc_url: 'http://omnirpc' # url of the omnirpc instance, please reference the Omnirpc section under Services for proper configuration
+ omnirpc_url: '[http://omnirpc](http://omnirpc)' # url of the omnirpc instance, please reference the Omnirpc section under Services for proper configuration

- base_omnirpc_url: "http://omnirpc" # Make sure this is configured properly
+ base_omnirpc_url: "[http://omnirpc](http://omnirpc)" # Make sure this is configured properly

The section provides a detailed explanation of the configuration parameters for the relayer.

Also applies to: 200-200

Tools
Markdownlint

114-114: null
Bare URL used

(MD034, no-bare-urls)

Comment on lines +30 to +38
The rebalancing loop is more complex and is responsible for ensuring that the relayer has enough liquidity on each chain. The CCTP rebalancer is supported and works like this:

1. At `rebalance_interval`, check the `maintenance_balance_pct` of each token on each chain and compare it to the current balance. If the balance is below the `maintenance_balance_pct`, continue
2. Calculate the amount to rebalance by taking the difference between the maintenance balance and the current balance and multiplying it by the `initial_balance_pct`.
3. If the amount to rebalance is greater than the `max_rebalance_amount`, set the amount to rebalance to the `max_rebalance_amount`. If the amount to rebalance is less than the `min_rebalance_amount`, do not rebalance.
4. Repeat after `rebalance_interval`

The implementation for certain native bridges (e.g Scroll) is also supported. It works slightly differently as flows are only supported between Scroll and Mainnet. At a high level, the rebalancer checks inventory on Scroll versus other chains, and if imbalanced, initiates a bridge to mainnet, allowing the CCTP relayer to rebalance funds where needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fix grammar issue in rebalancing section.

There is a missing preposition in the sentence "If the balance is below the maintenance_balance_pct, continue".

Apply this diff to fix the grammar issue:

 1. At `rebalance_interval`, check the `maintenance_balance_pct` of each token on each chain and compare it to the current balance. If the balance is below the `maintenance_balance_pct`, continue
+   with the rebalancing process.

The section provides a detailed explanation of the rebalancing process, including support for native bridges.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
The rebalancing loop is more complex and is responsible for ensuring that the relayer has enough liquidity on each chain. The CCTP rebalancer is supported and works like this:
1. At `rebalance_interval`, check the `maintenance_balance_pct` of each token on each chain and compare it to the current balance. If the balance is below the `maintenance_balance_pct`, continue
2. Calculate the amount to rebalance by taking the difference between the maintenance balance and the current balance and multiplying it by the `initial_balance_pct`.
3. If the amount to rebalance is greater than the `max_rebalance_amount`, set the amount to rebalance to the `max_rebalance_amount`. If the amount to rebalance is less than the `min_rebalance_amount`, do not rebalance.
4. Repeat after `rebalance_interval`
The implementation for certain native bridges (e.g Scroll) is also supported. It works slightly differently as flows are only supported between Scroll and Mainnet. At a high level, the rebalancer checks inventory on Scroll versus other chains, and if imbalanced, initiates a bridge to mainnet, allowing the CCTP relayer to rebalance funds where needed.
The rebalancing loop is more complex and is responsible for ensuring that the relayer has enough liquidity on each chain. The CCTP rebalancer is supported and works like this:
1. At `rebalance_interval`, check the `maintenance_balance_pct` of each token on each chain and compare it to the current balance. If the balance is below the `maintenance_balance_pct`, continue with the rebalancing process.
2. Calculate the amount to rebalance by taking the difference between the maintenance balance and the current balance and multiplying it by the `initial_balance_pct`.
3. If the amount to rebalance is greater than the `max_rebalance_amount`, set the amount to rebalance to the `max_rebalance_amount`. If the amount to rebalance is less than the `min_rebalance_amount`, do not rebalance.
4. Repeat after `rebalance_interval`
The implementation for certain native bridges (e.g Scroll) is also supported. It works slightly differently as flows are only supported between Scroll and Mainnet. At a high level, the rebalancer checks inventory on Scroll versus other chains, and if imbalanced, initiates a bridge to mainnet, allowing the CCTP relayer to rebalance funds where needed.
Tools
LanguageTool

[grammar] ~32-~32: Probably a preposition is missing after ‘continue’.
Context: ...is below the maintenance_balance_pct, continue 2. Calculate the amount to rebalance by taking the d...

(ATD_VERBS_TO_COLLOCATION)


[style] ~34-~34: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ebalance to the max_rebalance_amount. If the amount to rebalance is less than th...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[uncategorized] ~37-~37: The abbreviation “e.g.” (= for example) requires two periods.
Context: ...lementation for certain native bridges (e.g Scroll) is also supported. It works sli...

(E_G)


[uncategorized] ~37-~37: Possible missing comma found.
Context: ...l) is also supported. It works slightly differently as flows are only supported between Scr...

(AI_HYDRA_LEO_MISSING_COMMA)

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.55118%. Comparing base (f789485) to head (480ccf2).
Report is 2 commits behind head on master.

Additional details and impacted files
@@                 Coverage Diff                  @@
##              master       #3000          +/-   ##
====================================================
+ Coverage   23.30197%   90.55118%   +67.24921%     
====================================================
  Files            193          54         -139     
  Lines          11690        1016       -10674     
  Branches          82          82                  
====================================================
- Hits            2724         920        -1804     
+ Misses          8715          93        -8622     
+ Partials         251           3         -248     
Flag Coverage Δ
opbot ?
packages 90.55118% <ø> (ø)
promexporter ?
rfq ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (3)
docs/bridge/docs/rfq/Contracts.md (3)

23-23: Clarify the prove function description.

The description of the prove function now specifies that it must be called from the solver's address. Ensure this requirement is clearly communicated in any related documentation or user guides.


37-37: Ensure consistency in status descriptions.

The status descriptions should be consistent in tone and detail. Consider adding more detail to the "Null" status to match the others.


39-45: Enhance clarity in the "Dispute Period and Guards" section.

The section provides a good overview but could benefit from more specific examples or scenarios where disputes might arise. This would help users better understand the importance and functionality of the guards.

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 480ccf2 and 60e7cbf.

Files selected for processing (1)
  • docs/bridge/docs/rfq/Contracts.md (3 hunks)
Additional context used
Markdownlint
docs/bridge/docs/rfq/Contracts.md

49-49: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

Additional comments not posted (1)
docs/bridge/docs/rfq/Contracts.md (1)

13-13: Fix table formatting issues.

The table is missing leading and trailing pipes, and the row for "BNB Chain" has too few cells.


### Other Functionalities

**ChainGas**
Copy link
Contributor

Choose a reason for hiding this comment

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

Use a heading instead of emphasis for "ChainGas".

The static analysis tool suggests using a heading instead of emphasis for "ChainGas" to maintain consistency with other sections.

Apply this diff to fix the heading:

-**ChainGas**
+### ChainGas
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**ChainGas**
### ChainGas
Tools
Markdownlint

49-49: null
Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

@Defi-Moses Defi-Moses merged commit 1d06a74 into master Aug 22, 2024
29 checks passed
@Defi-Moses Defi-Moses deleted the docs/rfq-update branch August 22, 2024 09:07
@coderabbitai coderabbitai bot mentioned this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants