Open PhyuSinMyat8 opened 1 month ago
As per testing result ,Pending/Reserved amount for failed transfers in Account and Balance BC still remaining after the transaction status is changed to aborted.
Aborted Transaction (Testing with ILP packet)
Check expired timestamp for short period like 1 hr
Check in DB after expiring but remain pending debit balance at payer side
hi @PhyuSinMyat8 , Thanks for catching and documenting this; I'm very eager to see whats happening here.
Are there any equations or specification somewhere in the docs that show how the balances are updated with the terminology used here?
I'm asking because currently - technically there's no pending balance at any given point. The update is clearly made to the position of the Payer FSP account (subject to NDC check and other validations) and then once it is finalized, another change is made to the position - if committed, then to the Payee FSP side (position updated to reflect the incoming amount) and if aborted, then position of the Payer FSP updated again to reflect the amount that wasn't sent.
Dear @elnyry-sam-k,
Apologies for the delayed response and thank you for your patience. Let me address your question.
The "pending balance" referenced in this ticket refers to the amounts held in the pendingDebitBalance of the payer’s position account and the pendingCreditBalance of the hub reconciliation account before a transaction is finalized. Once the transaction is finalized (committed), these pending debit and credit balances are cleared from their respective accounts. The amounts are then updated in the postedDebitBalance of the payer’s FSP and the postedCreditBalance of the payee in the database.
For aborted transactions, the pending debit in the payer’s position account and the pending credit in the hub reconciliation account should also be cleared after the transaction is aborted. However, at present, the amounts from aborted transactions still remain in the pending debit and pending credit balances of each account.
Credit to @ZweHMyat for the above figure
Acceptance Criteria for Clearing Pending/Reserved Amounts
Scenario: Pending/Reserved amount for failed transfers in Account and Balance BC should be cleared after the transaction status is changed to aborted.
Acceptance Criteria:
Transaction Status Change:
Account Balance Update:
Error Handling:
Consistency Check: