𝗙𝗿𝗼𝗺 𝘁𝗮𝗽 𝘁𝗼 𝗯𝗹𝗼𝗰𝗸: 𝘁𝗵𝗲 𝗳𝘂𝗹𝗹 𝗹𝗶𝗳𝗲 𝗼𝗳 𝗮 𝗚𝗮𝘀𝗙𝗿𝗲𝗲 𝘁𝗿𝗮𝗻𝘀𝗳𝗲𝗿, 𝗲𝘅𝗮𝗰𝘁𝗹𝘆 𝗮𝘀 𝘁𝗵𝗲 𝗼𝗳𝗳𝗶𝗰𝗶𝗮𝗹 𝘀𝗽𝗲𝗰 𝗱𝗲𝘀𝗰𝗿𝗶𝗯𝗲𝘀 𝗶𝘁. I mapped the whole flow, because "the provider handles it" hides a lot of careful engineering. The six stages: ➜ Discover: the wallet pulls the supported tokens and the list of available service providers. ➜ Prepare: it queries your GasFree account for status, balance and the current nonce. ➜ Sign: you sign one EIP-712 compatible PermitTransfer message. ➜ Submit: the wallet sends the signed authorization to the provider. ➜ Verify: the provider checks it immediately and returns either a pass with a unique traceId, or a rejection. ➜ Track: the wallet follows that traceId until the transfer is on-chain. The state machine is refreshingly explicit. An authorization moves through WAITING, INPROGRESS and CONFIRMING, then ends in SUCCEED or FAILED. The on-chain transaction has its own states too, reaching SOLIDITY once the block is solidified. The detail I appreciate most is in the verify step. If verification fails, the spec says the authorization is discarded and 𝘄𝗶𝗹𝗹 𝗻𝗼𝘁 𝘁𝗿𝗶𝗴𝗴𝗲𝗿 𝗮𝗻 𝗮𝗰𝘁𝘂𝗮𝗹 𝘁𝗿𝗮𝗻𝘀𝗮𝗰𝘁𝗶𝗼𝗻 𝗼𝗻 𝘁𝗵𝗲 𝗯𝗹𝗼𝗰𝗸𝗰𝗵𝗮𝗶𝗻. So a bad request costs you nothing, and a good one gets an ID you can trace. My take: this is how payments infrastructure should feel, with 𝗲𝘃𝗲𝗿𝘆 𝘁𝗿𝗮𝗻𝘀𝗳𝗲𝗿 𝗵𝗮𝘃𝗶𝗻𝗴 𝗮𝗻 𝗜𝗗, 𝗮 𝘀𝘁𝗮𝘁𝘂𝘀 𝗮𝗻𝗱 𝗮 𝗳𝗶𝗻𝗮𝗹 𝗮𝗻𝘀𝘄𝗲𝗿. The full authorization process is in section 2 of the spec: https://t.co/mTYvGbaKRr @justinsuntron @DeFi_JUST #TronEcoStar #GasFree.
𝗔𝗹𝗱𝗿𝗶𝗰𝗧𝗵𝗲𝗚𝗿𝗲𝗮𝘁 | 𝗚𝗚Share

Source:Show original
Disclaimer: The information on this page may have been obtained from third parties and does not necessarily reflect the views or opinions of KuCoin. This content is provided for general informational purposes only, without any representation or warranty of any kind, nor shall it be construed as financial or investment advice. KuCoin shall not be liable for any errors or omissions, or for any outcomes resulting from the use of this information.
Investments in digital assets can be risky. Please carefully evaluate the risks of a product and your risk tolerance based on your own financial circumstances. For more information, please refer to our Terms of Use and Risk Disclosure.