Skip to content
Matthew Rosendin edited this page Oct 4, 2021 · 5 revisions

This page is up-to-date as of 9/21/2021.

This page contains technical information about the Flare-XRPL Bridge contract.

Summary

Note: The Bridge contract currently only supports Aurei (AUR) transfers between Flare and the XRPL.

The purpose of the bridge contract is to issue tokens on XRP Ledger in a trustless manner. The bridge contract will lock up the tokens to be issued until they are redeemed by an owner of the corresponding trustless issued currency (trustless IC) on the XRPL. The two primary tasks that this contract performs for clients are (1) to issue trustless issued currency on the XRPL or (2) redeem the tokens on Flare Network. Additionally, clients read from the bridge contract to verify the validity of an XRPL trustless issued currency. Only validated addresses can issue and redeem trustless issued currency.

Specification

Issuance Protocol

Note: There is still a state connector feature that needs to be added before the protocol can be used in a production setting.

The bridge contract expects the client to create a new issuing account for each transfer from Flare to the XRP Ledger. A receiving account then receives the trustless issued currency after the following steps are completed:

Bridge Contract

The client approves an allowance of amount tokens for the bridge contract to custody. The client then makes a newIssuer transaction and provides the issuing account address and amount of tokens to the contract.

XRP Ledger

On the XRP Ledger, the client creates a trust line from the receiving account to the issuing account with a limit of amount. The issuing account settings must be configured as follows:

State Connector

Next, the client must validate the issuance by interacting with the state connector. The client calls provePaymentFinality on the state connector contract and provides the XRPL transaction ID. This step verifies the issuance transaction. Before the issuing account can be validated, the client calls the (TBD) method on the state connector contract to prove the issuing address validity.

Bridge Contract

Call completeIssuance on on the bridge contract to finalize the issuing address validation process. Anyone can call verifyIssuer to verify that issuers can no longer issue more tokens.

Redemption Protocol

Bridge Contract

Call redepemtionAttempt to pre-register an redemption attempt

XRP Ledger

Send the tokens back to the issuing account by the amount you wish you redeem.

State Connector

Prove that the payment on the XRP Ledger has completed by providing the transaction ID.

Bridge Contract

Call redeemTokens to unlock the tokens.

Penalties

The protocol penalizes bad actors. If an issuing address doesn't follow the procedure for trustless issued currency precisely, they will be penalized by paying a fee to the client that proves misuse before the contract returns the tokens to their original source.

Clone this wiki locally