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

doc: update bridge documentation #880

Merged
merged 8 commits into from
Nov 1, 2023

Conversation

sameh-farouk
Copy link
Member

@sameh-farouk sameh-farouk commented Oct 24, 2023

Description

This pull request enhances the documentation for the TFChain bridge by providing a more detailed look into the sequential flow of how it works, which is divided between the Stellar network, bridge daemon/s, and TFChain runtime.
The added information would lessen the learning curve for newcomers.

Checklist:

@@ -34,3 +34,94 @@ Again, a withdrawfee of 1 TFT will be taken, so make sure you send a larger amou
The amount withdrawn from TF Chain will be sent to your Stellar wallet.

Example: ![swap_to_stellar](swap_to_stellar.png)
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing image here

bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
bridge/docs/bridging.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@renauter renauter left a comment

Choose a reason for hiding this comment

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

Great work!!
I basically rephrased some parts and identified some typos
Tell me if you are OK with it

Copy link
Collaborator

@renauter renauter left a comment

Choose a reason for hiding this comment

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

Committed my suggestions


2. The transaction information undergoes validation. If it fails, a refund is issued (sent back to the stellar source account). Starting from this point, we assume that the validation has passed, but we will examine the refund flow in the next section.
2. Each time such transaction event is reported by a bridge validator it undergoes some validation. If it fails, a refund is issued (sent back to the stellar source account). Here we assume that the validation has passed, but we will examine the refund flow in the next section.
Copy link
Member Author

Choose a reason for hiding this comment

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

reported -> received

@@ -41,13 +41,13 @@ Example: ![swap\_to\_stellar](swap_to_stellar.png)

In this section, we look into the details of transferring TFT from a Stellar Account to a TFChain Account.

1. A transaction is received on the bridge Stellar account and witnessed by a bridge validator..
1. A transaction is received on the bridge Stellar account (aka. vault) and monitored by bridge validators (deamons).
Copy link
Member Author

Choose a reason for hiding this comment

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

monitored -> noticed or witnessed

* `tftBridgeModule.BurnTransactionExpired`
* `tftBridgeModule.RefundTransactionExpired`
* `tftBridgeModule.BurnTransactionExpired`: from TFCHAIN -> STELLAR burn flow, when transaction (burn TFT on TFChain source account and transfer amount from Stellar vault account to Stellar destination account) is stuck in bridge.
* `tftBridgeModule.RefundTransactionExpired`: from STELLAR -> TFCHAIN refund flow, after TFT were locked into Stellar vault, finally not minted to TFChain, and transaction to get it back to Stellar source account is stuck in bridge.
Copy link
Member Author

Choose a reason for hiding this comment

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

I think saying stuck in bridge is technically wrong? you can say the transfer is pending approval from bridge daemons instead which more accurate
also Both events explained below, if you think we need to include a short description here as well lets say something like

  • certain number of TFChain blocks passed without a BurnTransaction being noticed and signed by the majority of bridge validators
  • certain number of TFChain blocks passed without a RefundTransaction being noticed and signed by the majority of bridge validators

Copy link
Collaborator

Choose a reason for hiding this comment

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

Correct, I ll change

@sameh-farouk sameh-farouk merged commit 38ea787 into development Nov 1, 2023
1 check passed
@sameh-farouk sameh-farouk deleted the development-update-bridge-documentation branch November 1, 2023 13:51
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.

2 participants