请问HN:你们是如何在应用中验证加密货币支付的?

1作者: Sem_pre2 个月前原帖
我正在构建一个接受USDC支付的SaaS。简单的需求是:客户发送稳定币,我需要知道它们何时到达以及金额是否匹配。目前的选项似乎有: 1. 支付处理器(如Coinbase Commerce、NOWPayments)——处理所有事务,但每笔交易收取0.5%-1%的费用。在一笔1万美元的支付中,这意味着仅确认费用就要50-100美元。 2. 自己动手使用Alchemy/Infura的webhooks——轮询转账事件,匹配金额,跟踪确认,处理重组,构建重试逻辑。我花了大约两周时间,但仍然不够稳定。 有没有折中的办法?有没有什么只做验证部分的解决方案——“告诉我在Y地址收到X金额”——而不涉及保管、结账或费用的开销? 我很好奇其他人是如何处理这个问题的,特别是在像Base这样的二层网络上,交易成本微乎其微,但验证基础设施的复杂性与主网相同。
查看原文
I&#x27;m building a SaaS that accepts USDC payments. Simple requirement: customer sends stablecoins, I need to know when they arrived and the amount matches. Current options seem to be:<p>1. Payment processor (Coinbase Commerce, NOWPayments) — handles everything but takes 0.5-1% per transaction. On a $10k payment that&#x27;s $50-100 just for confirmation.<p>2. DIY with Alchemy&#x2F;Infura webhooks — poll for Transfer events, match amounts, track confirmations, handle reorgs, build retry logic. Took me ~2 weeks and it&#x27;s still brittle.<p>Is there a middle ground? Something that just does the verification part — &quot;tell me when X amount arrived at Y address&quot; — without the custody&#x2F;checkout&#x2F;fee overhead? Curious how others are handling this, especially on L2s like Base where tx costs are negligible but verification infra is the same complexity as mainnet.