Overview
This VIP proposes a standardized URI format for representing various VeChain transactions, including payment requests in VET and VIP-180 tokens, multi-clause transactions, and fee-delegated transactions. These URIs can be embedded in QR codes, hyperlinks in web pages, emails, or chat messages to enable cross-application communication between loosely coupled applications. The format allows for instant invocation of the user’s preferred wallet application with the correct transaction parameters, requiring only confirmation by the authenticated user.
Link to PR: Add VIP: Transaction URI Standard by kyledotvet · Pull Request #89 · vechain/VIPs · GitHub
Motivation
The convenience of representing payment requests through clear, contact-less standards has been a significant factor in the adoption of digital payment methods like Apple Pay, Google Wallet, and other tap-to-pay solutions (see image of Square PoS system below). Bringing a similarly convenient mechanism to VeChain transactions would accelerate its acceptance as easy-to-use, plug-and-play platform among end-users and enterprises.
Rationale
The proposed format is designed to resemble Ethereum’s ERC-681 URI format as closely as possible, while extending it to support VeChain-specific features. This approach leverages existing familiarity among users and developers while accommodating VeChain’s unique capabilities.
Key design considerations include:
- Compatibility with existing URI schemes where possible
- Support for all VeChain transaction types and features
- Compact representation for efficient QR code encoding
- Clear separation between simple and complex use cases
- Extensibility for future enhancements
Specification
URI Structure Visualization
vechain:0xAddress@chainTag/function?param1=value1¶m2=value2#delegate=url
| | | | |
| | | | +-- Optional delegation
| | | +-- Parameters (optional)
| | +-- Function name (optional)
| +-- Chain tag (identifies network)
+-- Target address (contract or recipient)
Transaction Types & Examples
Simple VET Transfer
For a simple VET transfer, the URI format is:
vechain:0xRecipientAddress@chainTag?value=amountInWei
Example: Transfer 1.5 VET on the mainnet (chainTag: 0x4a):
vechain:0x98Ac46Fa6CaED2e7A867E1A717b9737F55774a03@4a?value=1.5e18
Basic Token Transfer
For ERC-20/VIP-180 token transfers, the URI format is:
vechain:0xTokenContractAddress@chainTag/transfer?address=recipientAddress&uint256=amountInTokenUnits
Example: Transfer 10 VTHO tokens:
vechain:0x0000000000000000000000000000456e65726779@4a/transfer?address=0x98Ac46Fa6CaED2e7A867E1A717b9737F55774a03&uint256=1e19
Multi-Clause Transactions
For multi-clause transactions, the URI format concatenates multiple clause definitions with a colon separator:
vechain:0xContractAddress@chainTag/function1?address=someAddress:0xOtherContractAddress@chainTag/function2?value=amountInWei
Example: Multi-clause transaction with two clauses:
vechain:0x0000000000000000000000000000456e65726779@4a/transfer?address=0x98Ac46Fa6CaED2e7A867E1A717b9737F55774a03&uint256=1e18:0x1234567890abcdef1234567890abcdef12345678@4a/transfer?address=0xabcdefabcdefabcdefabcdefabcdefabcdef&uint256=5e18
Note on QR Code Size Limitations: Multi-clause transactions can result in lengthy URIs that may exceed the practical capacity of QR codes at lower error correction levels (2,953 8-bit characters). Implementers should consider the following:
- Use the minimum necessary error correction level for QR codes
- For complex transactions with many clauses, consider alternative delivery methods
- When possible, optimize parameter values for brevity (e.g., using scientific notation for large numbers)
- Consider implementing a URI shortening service specifically for transaction URIs
Fee Delegation (VIP-191)
For transactions with VIP-191 fee delegation, the URI format includes delegation parameters:
vechain:0xContractAddress@chainTag/function?uint256=someValue#delegate=delegationUrl
Where delegationUrl
is a URL of the delegation service.
Example: Fee delegation with VIP-191:
vechain:0x0000000000000000000000000000456e65726779@4a/transfer?address=0x7567d83b7b8d80addcb281a71d54fc7b3364ffed&uint256=1e18#delegate=https://delegation.service/123456