# Connector and Packet Questions

**URL:** <https://forum.interledger.org/t/connector-and-packet-questions/265>\
**Category:** General Questions\
**Created:** [February 26, 2019, 6:54am UTC](https://forum.interledger.org/t/connector-and-packet-questions/265 "2019-02-26T06:54:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![emschwartz](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.interledger.org/emschwartz/32/12_2.png) [@emschwartz](https://forum.interledger.org/u/emschwartz)\
**Post date:** [February 26, 2019, 12:54pm UTC](https://forum.interledger.org/t/connector-and-packet-questions/265/2 "2019-02-26T12:54:53Z")

</div>

Great questions!

> [@Rawad\_Rifai](#):
>
> Are there any assumptions about the type of account(s) that would exist between a participant and a connector? For example: multisig?

The general assumption is that both parties independently track their view of the (net) balance between them and use some kind of external accounting system to settle. See this thread for the discussion on the main settlement options: [Should the main Interledger UX use payment channels, on-ledger settlement, or hosted accounts?](https://forum.interledger.org/t/should-the-main-interledger-ux-use-payment-channels-on-ledger-settlement-or-hosted-accounts/119)

> [@Rawad\_Rifai](#):
>
> Are there chances for cycles between connectors and are there any mechanisms in place to avoid them?

Routing loops are possible if their routing tables are configured to point back to one another for a particular destination. Each time a packet is forwarded, some time is subtracted from the expiry, which at least makes it so that the packet won’t travel in a loop forever. For more details on how to avoid loops, you might want to ask in this thread: [How does routing work in Interledger?](https://forum.interledger.org/t/how-does-routing-work-in-interledger/94)

> [@Rawad\_Rifai](#):
>
> Is there documentation on the executionCondition? I’m trying to find what’s the actual cryptographic function that runs to fulfill the condition. Is it just a hash digest of the secret?

The execution condition (also sometimes referred to as just the condition) is just the SHA 256 hash digest of the fulfillment. See the [Interledger Protocol V4 spec](https://interledger.org/rfcs/0027-interledger-protocol-4/#packet-format) for more details.

> [@Rawad\_Rifai](#):
>
> For the fulfill packet, how do connectors know the previous node to send the packet to?

Connectors keep the previous hop in memory. Thus far, most implementations use a Promise or a Future (whatever async primitive the language uses) to map the incoming request to the outgoing request and response. A connector implementation could use a different design though.

> [@Rawad\_Rifai](#):
>
> At the risk of asking a naive question, is there a mechanism to ensure the connector credits a receiver when receiving a fulfillment package?

If the receiver doesn’t trust the connector, they should use a payment channel for settlement and require payment channel updates for every packet. In this way, the payment would almost immediately be guaranteed by the underlying ledger/blockchain.

> [@Rawad\_Rifai](#):
>
> If connectors subtract X from the expiration date of the prepare packet, how do we know what’s the real expiration date? And do we need to know? By “we”, I mean connectors. IOW, on the way back, don’t connectors check for expiration? Are they checking the altered value, and against what? Unless it’s a function of the connector to increment the expiration in the fulfill.

There is no single expiration date. Imagine that each time the packet is forwarded, it’s a completely separate packet with a different arrangement between the parties. If I send you a packet that expires in 20 seconds, what I’m saying is “I agree to pay you if and only if you give me a fulfillment that hashes to that condition within the next 20 seconds”. How you get that, including where you might send another packet or what that packet might look like, don’t matter at all to me. (A really important part of Interledger is how it localizes these relationships to the bilateral connections)

> [@Rawad\_Rifai](#):
>
> What is meant by “sign an update”? If this means issue a blockchain transaction, then it might not be realistic for any of the existing blockchains. If it means balancing a bilateral database account, how does it reduce trust required in the sender?

A payment channel is like a temporary escrow account on a blockchain. The payment channel is created by at least one of the parties submitting a transaction on the blockchain to deposit funds into the shared account. Then, the two parties can instantaneously “pay” one another by sending signed transactions or updates _to each other_ (not to the blockchain) that assign a greater portion of the escrowed funds to the other party. This can be repeated any number of times without touching the blockchain. When one or both of the parties wants to close the payment channel and withdraw their funds, they will then submit a second transaction to the blockchain to do so.

> [@Rawad\_Rifai](#):
>
> Can you point out wrong content in the following statements?  
> Connectors may have multiple types of payment channels. Each payment channel type comes with an input asset type and an output asset type, for example BTC =\> ETH. Connectors apply exchange rates per channel type. Payment channel may input and output the same asset type. Connectors may pay each other fees depending on connectivity (for example, the less connected pays the more connected)

Sounds correct to me.

> [@Rawad\_Rifai](#):
>
> When looking at the full stack, we have SPSP talking to ILP, while Pre-Shared Key V2 can be used for secret management.

Small correction: [STREAM](https://medium.com/interledger-blog/streaming-money-and-data-over-ilp-fabd76fc991e) is now the recommended transport protocol to use, rather than PSK2. Implementations of SPSP SHOULD automatically use STREAM now.

> [@Rawad\_Rifai](#):
>
> Is there an adopted db for bidirectional balance tracking?

That’s an implementation detail so not something that would necessarily be adopted across the board. Want to start a thread in the [Implementations](https://forum.interledger.org/c/implementations) category about which database technologies to use?

---

_[View the full topic](https://forum.interledger.org/t/connector-and-packet-questions/265)._
