So where does that leave us? Reading through both this thread and the discussion in Ledger Adaptor API, it’s unclear to me where there’s consensus and where there is not.
Here’s how things appear to stand from may vantage point (I’m guessing I’ve missed a few things, or am possibly simply wrong in certain areas, so please chime-in if you disagree):
Consensus
- Settlement Adaptor: We want a non-Connector process that can interact with an underlying settlement system (e.g., Bitcoin, XRPL, etc) that does not run in the Connector process. This will allow us to scale Connectors and Settlement systems independently. I’m calling this thing the Settlement Adaptor (shout-out to @kincaid for good rationale around why to drop the word “ledger” here).
-
Settlement Engine: We all agree that ILP-account balance-tracking (i.e., “when to settle based on the ILP credit balance”) should live in a
Settlement Engine
, but for now this component will just be an internal service/function of each Connector implementation.- Based upon how implementations get built, it may make sense in the future to extract this into a standalone system and/or shared-libraries, but this is out of scope for now.
- Connector/SE <-> SA Transport: To aid adoption and for simplicity, we’re all OK with the Connector/SE communicating with the Settlement Adaptor using an HTTP+JSON API as a first-attempt. We may explore other techniques later if it makes sense.
-
Settlement Adaptor API Endpoints
-
sendMoney
: When called by an external system (e.g., a Connector), instructs the Settlement Adaptor to send a payment via the underlying settlement system (e.g., XRPL). -
getBalance
: Returns the current balance of the underlying settlement account (i.e. available liquidity for settlements). -
sendData
: When called by an external system (e.g., a Connector), allows an ILP packet to be transmitted to the Settlement Adaptor for further processing, such as to exchange a Payment Channel claim.
-
-
Connector/SE API Endpoints
-
sendData
: Allows the local Settlement Adaptor to communicate with the other Settlement Adaptor (used by the peer Connector) by transiting the local Connector using ILP link-layer technologies andpeer.settle.
addresses. -
sendMoney
: Allows the Settlement Adaptor to indicate that a settlement payment was received on the underlying settlement system. For example, the account123
received10 XRP
. The Connector will react to this callback and update its balances appropriately.
-
Open Questions
- Are the above API endpoints correct?
- If you get into a taxi cab, and ask the driver to drive backwards to your destination, will the cab driver owe you money?