V Systems Payment Channels

Jacob Gadikian
V Systems
Published in
3 min readAug 7, 2020

Unidirectional Payment Contracts for Off-Chain Payments

A payment channel is a payment contract that enables instant, trustless, unidirectional transactions between two individual users. Recipients of assets that have traveled through a payment channel aggregate messages that allow them to claim funds from a payment channel.

Tradeoffs

The key trade-off of the V Systems payment channel design for instant, trustless payments is that the recipient must be aware of the payment channel’s duration and make their claim before the payment channel closes. The recipient’s wallet software can monitor the states of payment channels in which he has received transactions and ensure that claims are always made before payment channel closure.

Opening payment channels

When users open a payment channel, they set three variables:

  • Address (who will this payment channel be sent to?)
  • Duration (when will this payment channel close?)
  • Capacity (how much will this payment channel contain?)

V Systems payment channels can technically be used on any blockchain supporting smart contracts, but the first implementation of payment channel contracts is on the V Systems blockchain, so let’s walk through the first use case.

Walkthrough

Alice is a Tachyon VPN user.
Bob is a Tachyon VPN Node Operator.

Alice would like to pay Bob 0.05 IPX for every 5MB of traffic she consumes. She doesn’t want anyone but Bob to know when she is using the internet, either.

Alice opens a payment channel addressed to Bob containing 100 IPX tokens set to expire a week from now.

Every time Alice has consumed 5MB of bandwidth from Bob, she sends Bob a message allowing him to claim .05 IPX

When Bob wants to claim the IPX that he has accumulated, he takes the last message that Alice sent him and submits it to the payment channel contract. The payment channel then emits Bob’s IPX.

Bob must claim his IPX before Alice’s payment channel closes, so Bob’s wallet automatically tracks the state of payment channels opened to his address once he has received a message from them.

Security and Trustlessness

Payment channels are secured through relatively simple mathematics. The contract ensures security using this system:

x is the total of funds added to the payment channel by the sender

y is the capacity remaining in the payment channel after emissions to the recipient are settled to the blockchain

z is the amount the payer needs to send to the receiver in an off-chain message

x >= y >= z

  • The capacity of the payment channel, X, must always be greater than or equal to Y, the capacity remaining in the payment channel after settlements to the blockchain have occurred.
  • Y must always be greater than or equal to Z, the amount the payer needs to send to the receiver

Summary

The payment channel offers a uniquely fast and lightweight way to accomplish secure, trustless off-chain transactions that can be finalized by settlement to the blockchain at any time of the recipient’s choosing.

Stay Connected

We continue to regularly iterate new features into V Systems to provide developers with a more stable and user-friendly platform. Community participation is encouraged, as feedback provides insight into the specific needs of developers. If you would like to offer feedback on VSYS 2.0 and work more closely with our team, you can contact our developer relations team at Github.

Twitter: https://twitter.com/VSYSCoin
Telegram:https://t.me/VSYSOfficialGroup
Medium:https://medium.com/vsystems
YouTube:https://bit.ly/3i8ZY6v
Reddit:https://www.reddit.com/r/V_SYSTEMS/
Github: https://github.com/virtualeconomy/v-systems

Other Useful Links

VSYS Official Website: https://www.v.systems
Supernode Ranklist: https://vsysrate.com/
VSYS Blockchain Explorer: https://explorer.v.systems/

--

--