How to build with PayPal USD (PYUSD) on Solana
PayPal USD (PYUSD) is now available on Solana, offering developers a new stablecoin option for their projects. With easy access to test tokens on the Solana Devnet faucet, comprehensive developer documentation and compatibility with the broader Solana ecosystem, building with PYUSD has never been more accessible.
This article explains what PYUSD is, where and how to build with PYUSD, and how developers can leverage this new stablecoin for their projects.
What is PYUSD?
The PayPal USD (PYUSD) stablecoin is issued and managed by Paxos Trust Company on behalf of PayPal. Its goal is to maintain a stable 1:1 value with the United States dollar, giving the cryptocurrency market a trustworthy and safe digital version of the U.S. dollar. By fusing the payments expertise of PayPal with the technological advantages of blockchains like Ethereum and Solana, PYUSD seeks to transform digital payments.
Initially launched on the Ethereum blockchain, PYUSD expanded to the Solana blockchain as per PayPal’s announcement on May 29, 2024. Solana, a leading blockchain known for its rapid adoption, boasts a robust ecosystem with millions of daily transactions and thousands of active developers.
This high-performance network is designed for speed, scalability and cost-efficiency, aiming for block times of approximately 400 milliseconds and supporting thousands of transactions per second at median fees of fractions of a cent.
Its global accessibility ensures PYUSD transfers settle almost instantly with minimal costs regardless of transaction size, making it scalable for large user bases and accessible worldwide to anyone with an internet connection. With the flexibility and accessibility offered by this multichain method, users can select the blockchain that best meets their requirements.
Why build with PYUSD?
PYUSD brings together the payments expertise of PayPal and the technical expertise of Solana. The stablecoin, which was only available on Ethereum before, is now available on Solana as well, offering near-instant settlements that are highly cost-efficient, available 24/7, and have global scope. Use cases of PYUSD include:
Cross-border P2P payments
One can transfer PYUSD to eligible recipients globally using a Solana wallet, with transactions settling almost instantly and at negligible cost.
Business-to-business transfers
Thanks to programmable features in PYUSD, businesses can develop their own services to facilitate near-instant, cost-effective cross-border transfers with minimal technological requirements.
Microtransactions
PYUSD facilitates microtransactions in real-time and at a low cost on Solana. With PYUSD, Web3 merchants such as nonfungible token (NFT) marketplaces and blockchain-based gaming platforms can integrate with fiat bank accounts using digital native currencies.
Global payouts
PYUSD removes the need for a complex network of multiple banking networks, currencies and digital wallet systems, simplifying global payouts.
What are Solana’s token extensions and their role in the development of PYUSD?
Token extensions (TEs) on the Solana blockchain are potent tools that expand the functionality of the Solana Program Library (SPL) Token Program, the standard for creating tokens. TEs are composable modules that can be applied to a token to offer specific features or functionalities. Simple metadata additions to intricate compliance and governance systems are examples of these enhancements.
The specific TEs PYUSD uses on Solana are:
Confidential transfers: Allowing merchants the option to maintain confidentiality of transaction amounts while maintaining visibility of other transaction details for regulatory purposes.Transfer hooks: Enabling developers to invoke custom programs during token transfers for individuals and merchants using PYUSD.Memo fields: Enabling senders and receivers to include information along with payments, creating a more user-friendly experience for daily payments and business transactions.These token extensions enable the following benefits for PYUSD:
Enhanced functionality
TEs allow PYUSD transactions to be confidential for users while remaining transparent for regulators, striking a balance between confidentiality and compliance.
Standardized information
The metadata extension allows for standardized storage of essential token information, such as name, symbol and logo, simplifying integration with various platforms.
Programmable control
The transfer hook extension allows for custom logic to be executed with each token transfer, providing greater control over how PYUSD interacts with wallets and applications.
Flexible fees
The transfer fee extension allows for the implementation of transfer fees, which can be used for various purposes, such as network maintenance or revenue generation.
Regulatory compliance
The permanent delegate extension enables a designated authority to manage PYUSD tokens for compliance purposes, ensuring adherence to regulatory requirements.
Account management
The mint close authority extension enables the closure of mint accounts and the reclamation of resources, ensuring efficient management of PYUSD tokens.
Advantages for developers in building with PYUSD using token extensions
Developers on the Solana blockchain can realize the full potential of programmable money and assets by leveraging the SPL Token Program with token extensions. This used to involve a laborious fusion of several codebases and protocols.
However, developers now have native access to a full range of programmability features when minting tokens with enabled token extensions. With this simplified method, developers can enable or disable particular capabilities on a per-feature basis, customizing their tokens to fit the specific requirements of their apps.
Additionally, TEs are industry-standard, well-tested and certified extensions that give PYUSD enterprise-level security and reliability. Because they are reusable standards, developers can design and test apps faster.
As plug-and-play modules, TEs offer a fast and proven path to adding blockchain and PYUSD to applications. Moreover, since TEs are an open standard, PYUSD can be used and integrated not just with PayPal but also with any other compatible wallet, exchange or library. This adaptability encourages innovation in the field of digital payments by enabling developers to freely experiment and expand upon PYUSD as needed.
How to build with PYUSD on Solana
The steps below will help to understand how interested developers can start building with PYUSD on Solana.
Step 1: Obtain PYUSD
Getting PYUSD is the first step in working with it. One can buy, sell and use PYUSD on the PayPal or Venmo wallets. The PayPal consumer protection policy is available to anyone using the PayPal ecosystem to buy PYUSD.
Alternatively, one can acquire PYUSD using fiat money from major Solana wallets such as Phantom and crypto exchanges like Crypto.com. Developers can test PYUSD on Solana’s Devnet via the PYUSD faucet.
Step 2: Understand the technical details
PYUSD mint address
To integrate PYUSD into an application, developers can use the PYUSD mint address:
2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo
On the Solana blockchain, this mint address uniquely identifies the PYUSD token. To get details of the mint account, one can use a Solana explorer.
Token extensions
PYUSD is built on TEs, which denote the next iteration of the Solana Program Library standard and offer out-of-the-box compliance frameworks, reducing development time. TEs roll out new methods to boost token functionality.
Essential features like minting, transferring and freezing tokens were part of the initial tokens program, but the TEs have brought in additional features such as confidential transfers, extended metadata, custom transfer logic and much more (as explained in the above section).
Step 3: Integrate PYUSD
PYUSD is accessible in major Solana wallets and on exchanges, including Phantom and centralized platforms like Crypto.com. Additionally, eligible users can buy, sell and use PYUSD within the PayPal ecosystem, including PayPal and Venmo.
Developers can easily obtain and integrate PYUSD into their Solana projects. Test PYUSD is available through the Solana Devnet faucet for development and testing in a sandbox environment. To understand how to build with PYUSD, they should also learn about token extensions before diving deeper into the development process.
PYUSD’s open-source nature and integration with Solana’s TEs allow developers to seamlessly incorporate it into their applications, enabling easy acquisition, spending and transfer of PYUSD within their apps. For eligible users, PYUSD’s compatibility with the Solana ecosystem, including various wallets and platforms, makes it readily accessible for digital transactions.
In addition, the Solana and PayPal developer documentation provides detailed information on integrating PYUSD and Solana-based tokens. Developers are encouraged to utilize the provided icon resources when integrating PYUSD into their applications. These resources include PYUSD icons in 128x128 px and 220x219 px sizes. To download, developers can right-click the image and select “Save image as…” Additionally, the PYUSD icon is available in SVG format through PayPal Objects.
By building with PYUSD, developers can create efficient, inclusive and trusted payment experiences for the future of digital commerce.
The future of the PYUSD stablecoin
Exciting possibilities lie ahead for PYUSD as new use cases materialize and the coin adapts to changing regulatory environments. Real-world assets (RWAs) are a ripe field for the growth of PYUSD. By enabling smooth, almost instantaneous transactions in the domain of RWAs, PYUSD can help improve liquidity in a broadly illiquid real estate market.
The way that stablecoin regulations are changing in the United States is likely to affect PYUSD, which will need to adapt in order to assure compliance. Cross-chain interoperability is another crucial component for PYUSD’s future. Branching out to other blockchains will help the stablecoin promote more adaptability and accessibility.
Future developments of PYUSD’s security features and smart contracts will also play a critical role in its evolution. By improving smart contract capability, new features like automated compliance and more complex financial instruments may emerge.