Skip to content

Some minor and general questions regarding the details of Hop protocol #76

@NIC619

Description

@NIC619

Hi friends, I've read through the Hop protocol white paper and the contracts. Amazing work!
I've had some minor and general questions regarding the details of Hop protocol. I can not find other ways to get in touch so I just post them here. Let me know if I should post them somewhere.

  1. the two links in Diagram section in readme do not seem to be the correct ones

  2. don't know if it's just me, but the transferFromBridge/transferToBridge functions create a small confusion for me:

  • transferFromBridge actually transfer "to" some address while transferToBridge actually transfer "from" some address
  • function _transferFromBridge(address recipient, uint256 amount) internal override {
    l1CanonicalToken.safeTransfer(recipient, amount);
    }
    function _transferToBridge(address from, uint256 amount) internal override {
    l1CanonicalToken.safeTransferFrom(from, address(this), amount);
    }
  1. swapAndSend function mentioned in readme seems to reside in L2_AmmWrapper contract instead of L2_bridge.
    Are they refering to the same contract?

4-1. I see that L2_Bridge inherit Bridge contract so it will also have bondWithdrawal function. I think it's possible that a bonder accidentally call bondWithdrawal on L2_bridge contract? (though not really a big deal)
4-2. these two functions seem to differ only in whether they have AMM swap functionality or not?

  1. in Expected contract invocation section in readme
  • the L2 -> L2 (bonder offline) case says:
    • ...
    • ...
    • Wait for the sending layer-2 to be confirmed on layer-1 (approximately 7 days)
    • User or Relayer calls L2_Bridge.withdraw() on the receiving layer-2

are there any more steps or wait time between these last two steps?
if I understand correctly, even if sending layer-2 is confirmed on layer-1, it doesn't mean the state on receiving layer-2 is updated immediately?

  1. Can you explain more on this part in the Expected usage section in readme?
    "Credit is added to the Bonder's credit account each time transactions (from/to any chain) are successfully confirmed on layer-1. Debit is added to the Bonder's debit account each time transactions are sent (from/to any chain) but not yet confirmed on layer-1."
    6-1. what kind of transactions are to be confirmed? transfer? withdraw? bondWithdraw?
    6-2. what would be the circumstances where transactions are sent but not yet confirmed on layer-1?
    (it would be helpful to better understand what type of transactions and in what circumstances would have an affect on both credit and debt)

  2. if there's transferId for each transfer, it seems it should be able to prevent multiple bonder bonding for same transfer at the same time?

  3. do you have guidelines for how to become a bonder? it would be really helpful for us to better understand the protocol and assessing the risk!

Thanks alot!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions