YouTube2Text

Fermah Pay - T1 Walkthrough — Transcript

by Fermah · 867 words · 153 segments · language en · Watch on YouTube

Full transcript

  1. 0:00Hey, I'm Maxi, Rust protocol engineer at
  2. 0:02Firma, and this is a quick walkthrough
  3. 0:04of Trans 1 from Obelus Teller.
  4. 0:06Trans 1 was the prepaid ledger. It's a
  5. 0:10sovereign contract where a buyer
  6. 0:12deposits USDC 1s, and a seller charges
  7. 0:15small amounts against that balance.
  8. 0:18On top of it, there's a gateway that
  9. 0:20sends every transaction and pays the
  10. 0:22network fees. So, the buyer never pays a
  11. 0:25fee. This is the contract on testnet.
  12. 0:29Um down here, you can see its activity,
  13. 0:31deposits, charge, batches, and
  14. 0:34withdrawals.
  15. 0:36It shows three versions because we
  16. 0:38upgraded it in place, so the hash here
  17. 0:41is the current one. But, the address and
  18. 0:44the balance stay the same.
  19. 0:46This is a deposit. Up here, the source
  20. 0:49account is ours. It's the account that
  21. 0:52sends the transaction, and this one is
  22. 0:54the fee source account. It's a separate
  23. 0:57one um
  24. 0:59that paid the fee for this transaction
  25. 1:01through a fee bump, so the buyer paid
  26. 1:04nothing.
  27. 1:05Here is the deposit call. This address
  28. 1:10right here is the the buyer, and this is
  29. 1:13the amount. It's point um
  30. 1:1603 USDC
  31. 1:18since USDC has seven decimals here.
  32. 1:22In the details right here, you can see
  33. 1:24the USDC coming out of the buyer's
  34. 1:27wallet and going into our treasury.
  35. 1:31And here, um
  36. 1:33the contract
  37. 1:35credits the buyer's balance in the
  38. 1:37ledger, which is what the seller charges
  39. 1:39against.
  40. 1:41The USDC transfer only happens with the
  41. 1:44buyer's authorization, and this is the
  42. 1:47line. Um the buyer's signed
  43. 1:50authorization gets used up with the with
  44. 1:53this nonce, so nobody can replay it.
  45. 1:56Now here, in signatures, there's only
  46. 1:58our key. That's because the buyer never
  47. 2:00signed this transaction itself. They
  48. 2:02just signed that one authorization for
  49. 2:04the deposit once. So, next, a charge.
  50. 2:08Um here is the charge call.
  51. 2:10As you can see, it's the same buyer. Um
  52. 2:13this is the charge ID.
  53. 2:16And
  54. 2:17this is the amount. It's .01 USDC, and
  55. 2:21this last number is the latest ledger it
  56. 2:24can settle in. So, a charge can sit
  57. 2:26there and forever.
  58. 2:28Charges need the operator roles
  59. 2:31authorization, and this is it.
  60. 2:34Um the operator's nonce getting used up.
  61. 2:37As you can see here, um
  62. 2:40the event at the end has a zero.
  63. 2:43Right here. Um which in the contract
  64. 2:46means charge it.
  65. 2:48And um here
  66. 2:51the
  67. 2:52the buyer's balance in the ledger goes
  68. 2:54down. Um no USDC moves in that charge.
  69. 2:58It's just the ledger moving the amount
  70. 3:00the amount from the buyer's um balance
  71. 3:02to the seller's revenue.
  72. 3:06>> [snorts]
  73. 3:06>> And lastly, this right here, as you can
  74. 3:10see,
  75. 3:12um
  76. 3:13this line's the important one for the
  77. 3:16next part because the contract
  78. 3:19um keeps a record of every charge ID
  79. 3:21with with its um outcome. So, the same
  80. 3:25charge can never be taken twice.
  81. 3:28Now the duplicate. Um this is a batch of
  82. 3:3298 charges that had already been um
  83. 3:37settled.
  84. 3:38We sent it a second time on purpose.
  85. 3:41It's the same setup as before, as you
  86. 3:43can see.
  87. 3:45Um each entry is a buyer, a charge ID,
  88. 3:49an amount, and the last ledger. The same
  89. 3:51shape as the single charge before, just
  90. 3:5398 of them in one transaction.
  91. 3:57Um the transaction um
  92. 4:01goes through,
  93. 4:02but this error is um what the contract
  94. 4:06returned. One result uh per charge.
  95. 4:09Every single one is free, which in the
  96. 4:11contract means uh duplicate because
  97. 4:13those um charge IDs were already
  98. 4:16recorded.
  99. 4:18>> [snorts]
  100. 4:18>> And if you send a single duplicate
  101. 4:20charge straight um to the contract, it's
  102. 4:23refused before it even reached the the
  103. 4:26chain. So, there's no transaction at
  104. 4:28all. So, this is the CI. This runs on
  105. 4:32every change to main.
  106. 4:34It's an end-to-end test against testnet
  107. 4:37that goes through the gateway API, the
  108. 4:39same way a real seller would use it.
  109. 4:42This is the
  110. 4:44the shop summary list.
  111. 4:46Um as you can see, it lists every step
  112. 4:50with its um transaction.
  113. 4:53First, it creates uh a new buyer. It
  114. 4:56funds it with testnet USDC.
  115. 4:59It deposits with one buyer signature, um
  116. 5:03and it settles free charges.
  117. 5:06Then, it checks the
  118. 5:09the duplicate both ways. Um our retry
  119. 5:13charge through the API just returns the
  120. 5:15original one, and the same charge sent
  121. 5:18um straight to the contract gets refused
  122. 5:21before submission.
  123. 5:23And at the end, um
  124. 5:26it checks that the gateway's balance
  125. 5:28match the the contract's to the to the
  126. 5:31unit.
  127. 5:32>> [snorts]
  128. 5:33>> Every hash um links to the explorer, so
  129. 5:37anyone can check it themselves, as you
  130. 5:39can see,
  131. 5:40right here. Trench two builds on top of
  132. 5:43it with four pieces.
  133. 5:45First is recurring
  134. 5:48um charges,
  135. 5:50which is the buyer authorize a monthly
  136. 5:53charge once and the seller can charge
  137. 5:55each period without asking again until
  138. 5:58the mandate expires.
  139. 6:01Second is
  140. 6:03um settlement interface compatible with
  141. 6:06um X402.
  142. 6:09So, any third-party facilitator can
  143. 6:12check a buyer's balance and settle
  144. 6:15against it.
  145. 6:17Third
  146. 6:18um is on-chain monitoring with um
  147. 6:22with alerts for each risk we identify we
  148. 6:25identify and so on. And fourth, it's a
  149. 6:28testnet integration with um ecosystem
  150. 6:31partner.
  151. 6:33Well, so the first two already run here
  152. 6:36on every change to main and we are
  153. 6:38closing the the other two now.

About this transcript

This page contains the full transcript of Fermah Pay - T1 Walkthrough by Fermah, generated from the public captions YouTube serves with the video. The transcript has 867 words across 153 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.