StarkWare, the blockchain scalability, and privacy protocol, today announced that StarkPay, a prepaid debit card-style system that offers scalable, inexpensive, trustless, capital-efficient, payments over Ethereum, now supports instant payments. With instant payments, StarkPay maintains all of its properties while offering merchants the ability to provide goods and services instantly, risk-free.
Instant Payments
Instant payment support is an improvement to StarkPay which offers merchants finality on receivables (i.e. payments received). There are no trust assumptions between any of the parties involved in a payment’s life cycle: customer, merchant, payment processor, and StarkWare which runs the StarkPay on behalf of the payment processor.
Instead of trust, the payment processor offers the merchant a dedicated on-chain security deposit (roughly equal in value to the sum total of the merchant’s receivables during a proof cycle), and counter-signs customer payments.
For counter-signed payments, the merchant is assured to receive the funds — either via the payment’s inclusion in a subsequent proof or by redeeming the payments directly from the security deposit. Much like a standard security deposit, in the normal course of affairs, it is left untouched.
Mechanism
For every merchant offered the instant payments system, the payment processor locks up a security deposit in a merchant-specific on-chain smart contract. As mentioned above, the deposit is roughly equal to the volume of payments to the merchant during a proof cycle.
Example Interaction – a customer walks into a jewelry store wishing to buy an expensive item:
- The customer provides a merchant with a signed payment.
- Merchant verifies there are sufficient funds in the security deposit contract.
- Merchant forwards payment to the payment processor.
- The payment processor checks customer has sufficient funds.
- Payment processor counter-signs payment and returns it to the merchant.
- Merchant can serve the customer instantly once it receives the counter-signature from the payment processor.
Post Customer Interaction
- Standard Process: In the normal course of affairs, the merchant monitors the blockchain until it sees a proof that includes the customer’s payment. This means that the merchant’s off-chain balance was credited with this customer’s payment (alongside any other payments made to the merchant in this most recent proof cycle).
- Security Deposit Activation: If the merchant doesn’t see a proof including the payment within some reasonable timeframe, the merchant can send the counter-signed payment to their security deposit contract. The contract, after verifying that enough time has elapsed and that the merchant has yet to receive payment, pays the merchant.
Note, a merchant may experience an activity exceeding the value stored in their security deposit. Accordingly, they can do one of two things:
- Require the payment processor to increase the size of the security deposit.
- Delay processing of transactions till previous transactions processed is confirmed via a proof. Obviously, this doesn’t always make commercial sense: Starbucks can’t delay the delivery of a cup of coffee for an hour, but Amazon can certainly delay the shipping of a package for an hour.
A Trustless System
In the StarkPay system, the merchant does not need to trust the payment processor (and StarkWare as a technology provider), and conversely, the payment processor need not trust the merchant.
- Trustless Payment Processor: Merchants can always redeem an unpaid counter-signed payment (i.e. signed by both the customer and the payment processor) by sending it to the security deposit smart contract.
- Trustless Merchant: The merchant can’t redeem from the security deposit smart contract a payment accounted for in a proof submitted to the blockchain. In fact, as long as the payment processor follows the protocol, the merchant can’t withdraw funds from the security deposit at all.
Comparison to Lightning
In light of instant payments, the StarkWare team revisited its original comparison of StarkPay to Lightning:
- Faster Finality: Oneadvantage that Lightning had over the initial StarkPay design: faster finality. In the initial design, finality was a function of “proof cycle time”. In Lightning, finality is instant, in the sense that once one has the counterparty’s signature, the payment is guaranteed. StarkPay now matches Lightning’s speed of finality.
- Lower Cost of Capital: With instant payments, the merchant needs to secure only the value paid to them during a proof cycle — that is all that needs to be locked up by the payment processor, in order to give the merchant peace of mind. In particular, StarkPay, with instant payments, is still much more capital efficient than Lightning.