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

Fast Bridge #175

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fast Bridge #175

wants to merge 3 commits into from

Conversation

guidohernan93
Copy link
Contributor

No description provided.

@guidohernan93 guidohernan93 changed the title PR draft Fast Bridge Sep 15, 2020
IPs/RSKIP175.md Show resolved Hide resolved

The system comprises one or more liquidity providers (LPs), listed in an onchain marketplace. Interactions with LPs are intermediated using a dApp or a website.

#### Liquidity Providers contract
Copy link
Contributor

Choose a reason for hiding this comment

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

Please include the Solidity interface for this.
e.g.

interface ILiquidityBridgeContract {
   transferStatus(bytes32[]) return uint;
   transferFunds(bytes32[]);
}


#### registerBtcTransfer()

**Parameters**:
Copy link
Contributor

Choose a reason for hiding this comment

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

Please include the ABI signature for this method

IPs/RSKIP175.md Outdated Show resolved Hide resolved
IPs/RSKIP175.md Outdated
- *byte[]* btcTxSerialized: Serialized Bitcoin transaction
- *int* height: Block number where the transaction is present
- *byte[]* pmtSerialized: Serialized partial merkle tree
- *Sha256Hash* derivationArgumentsHash: A hash created from all the derivation arguments
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- *Sha256Hash* derivationArgumentsHash: A hash created from all the derivation arguments
- *Sha256Hash* derivationArgumentsHash: A hash created from the derivation arguments

It's not all the derivation arguments, only those not required by the Bridge

IPs/RSKIP175.md Outdated Show resolved Hide resolved
IPs/RSKIP175.md Outdated Show resolved Hide resolved
- If status obtained is **OK**, will check if Locking Cap value is surpassed:
- If not surpassed, will transfer funds to Liquidity Bridge Contract
- If surpassed, will refund Liquidity Provider

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that there are a few missing steps.

  • There should be validation to determine if the UTXO to the derive Fed was already registered.
  • There should be a step to register the UTXO


### Federation Address Derivation

The address derivation process will be carried out by creating a custom redeem script that will make a push of a 32 bytes hash created from the provided derivation arguments. That data is then dropped.
Copy link
Contributor

Choose a reason for hiding this comment

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

You could add a clarification that this custom redeem script is executed in the same way to the standard one, allowing the same Federation members to sign the releases of these ad-hoc Federations.

IPs/RSKIP175.md Outdated
receiverAddress.transfer(msg.value);
}

The Solidity interface for this cotract must be:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The Solidity interface for this cotract must be:
The Solidity interface for this contract must be:

IPs/RSKIP175.md Outdated

interface ILiquidityBridgeContract {
transferStatus(bytes32) return uint;
transferFunds(bytes32) external payable;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
transferFunds(bytes32) external payable;
transferFunds(bytes32) payable;

@guidohernan93 guidohernan93 force-pushed the fast-bridge branch 3 times, most recently from 78e207b to 469c45a Compare September 22, 2020 16:15
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