Creating a trade on Solana’s Delivery versus Payment (DvP) program involves setting up clients, deriving trade records, and establishing escrow accounts. This process is essential for recording trade terms securely on the blockchain. For more detailed information, you can refer to the official Solana documentation.
Key Takeaways
- The DvP program records trade terms and creates escrow accounts.
- Trade creation is permissionless, allowing any party to initiate.
- Escrow accounts are derived from trade records and mints.
Setting Up the DvP Trade
The DvP program on Solana allows users to record the terms of a trade and create two escrow accounts that the involved parties will fund. The process does not move tokens but ensures that the terms are securely stored on the blockchain. This setup can be initiated by any party, including a counterparty or a third party, and requires verification by all participants before proceeding to fund the trade’s legs.
Deriving Addresses and Recording Terms
To create a trade, users derive a program-derived address for the trade record, which involves the settlement authority, the two parties, the mints, and a nonce. The escrow accounts are associated token accounts for each mint. A random 64-bit nonce is used to prevent address prediction by third parties. The trade terms include amounts, expiry, and optional fields like settlement destinations. The payer funds the rent for the record and escrows, with the rent going to the signer of the closing instruction. For further guidance on Solana’s DvP program, explore our Solana guides.




