How PAPE Works
Pan-African payments, simplified
It is important to notice that currencies don’t actually leave the payment gateway during PAPE cross-border payments.
High level workflow
High level Sequence Diagram
Step by Step
How does money move from Sender to Receiver?
Step 0
Suppose we have:
Payment Gateway
Sender (SenderPaymentGateway), which uses a currency called LCY (local currency), and- Payment Gateway Receiver (ReceiverPaymentGateway), which uses a currency called FCY (foreign currency).
Suppose also that we’ve set up a PAPE liquidity provider
account between SenderPaymentGateway and ReceiverPaymentGateway.
Suppose also that we have a user called Sender in SenderPaymentGateway, that wants to send some funds to Receiver in ReceiverPaymentGateway.
Sender
->Receiver
Step 1
The Liquidity Provider will deposit some FCY funds into the receiving payment gateway.
Let’s say the Liquidity Provider deposits 1,000,000 FCY. This deposit will sit in the Liquidity Provider Pool
set up by the receiving payment gateway.
All liquidity providers on the receiving payment gateway will share the same liqudity pool. Account balances of each liquidity provider will be tracked by the
PAPE Blockchain
.
LiquidityProvider
–> (deposit 1,000,000 FCY) –>Receiving Gateway Liquidity Pool
Sender Currency (LCY) | Receiver Currency (FCY) |
---|---|
Bank Liquidity Provider Pool: 0 Liquidity Provider: 0 | Bank Liquidity Provider Pool: 1,000,000 Liquidity Provider: 0 |
— | — |
Step 2
The Receiving Gateway Backend will notify PAPE via PAPE APIs that a liquidity provider made a deposit. The PAPE blockchain will take note of the amount deposited and adjust blockchain account balances accordingly.
Receiving Gateway Backend
–> (notify deposit from Liquidity Provider via PAPE APIs) –>PAPE PAPE Blockchain
(which maintains and adjusts liquidity provider balances)
Sender Currency (LCY) | Receiver Currency (FCY) |
---|---|
Bank Liquidity Provider Pool: 0 Liquidity Provider: 0 | Bank Liquidity Provider Pool: 1,000,000 Liquidity Provider: 1,000,000 |
— | — |
Step 3
Liquidity Provider logs into the Liquidity Provider Dashboard
created by PAPE, and sets exchange rates between LCY and FCY.
Liquidity Provider
–> (sets exchange rate) –>Liquidity Provider Dashboard
Let’s assume the exchange rate set is 2 LCY = 1 FCY.
Step 4
Suppose the Sender wants to send 100,000 FCY to receiver.
The Sender will use their typical banking app, which will query PAPE APIs for the best exchange rates between LCY and FCY.
The user will confirm the exchange rates are good enough for them, and the destination name matches before submitting the payment request.
Sender
–> (uses bank app to submit receiver account details and amount) –> [Best LCY/FCY exchange rate will be returned, including name validations.]
Sender Currency (LCY) | Receiver Currency (FCY) |
---|---|
Sender: 200,000 Bank Liquidity Provider Pool: 0 Liquidity Provider: 0 | Receiver: 0 Bank Liquidity Provider Pool: 1,000,000 Liquidity Provider: 1,000,000 |
— | — |
Step 5.
Let’s assume the liquidity provider above set the best rate of 2 LCY = 1 FCY.
Which means Sender will have to send 200,000 LCY, so that their receiver will receive 100,000 FCY.
If this is OK with the sender, the sender will confirm within the bank app, and 200,000 LCY will be debited from the sender’s account, and credited into the Sending Gateway Liquidity Pool
account.
Sender Currency (LCY) | Receiver Currency (FCY) |
---|---|
Sender: 0 Bank Liquidity Provider Pool: 200,000 Liquidity Provider: 0 | Receiver: 0 Bank Liquidity Provider Pool: 1,000,000 Liquidity Provider: 1,000,000 |
— | — |
Step 6.
Sender Gateway Backend
–> (notify PAPE about payment from Sender)
Step 7.
PAPE does its magic, and adjusts account balances accordingly.
Sender Currency (LCY) | Receiver Currency (FCY) |
---|---|
Sender: 0 Bank Liquidity Provider Pool: 200,000 Liquidity Provider: 200,000 | Receiver: 0 Bank Liquidity Provider Pool: 1,000,000 Liquidity Provider: 900,000 |
— | — |
Step 8 and 9
Receiving Gateway Backend polls PAPE endpoints, and detects it has to send 100,000 FCY to Receiver. The Receiving Gateway must honor the cross-border payment. Funds will come from the liquidity provider pool.
Sender Currency (LCY) | Receiver Currency (FCY) |
---|---|
Sender: 0 Bank Liquidity Provider Pool: 200,000 Liquidity Provider: 200,000 | Receiver: 100,000 Bank Liquidity Provider Pool: 900,000 Liquidity Provider: 900,000 |
— | — |
Step 10.
The Liquidity Provider can at any moment withdraw the 200,000 LCY it has gained from enabling a trade between Sender and Receiver payment gateways.