Skip to content

bytetwt/send-usd

Repository files navigation

💸 SendUSD — Anchor Program

SendUSD is a Solana smart contract (Anchor program) that allows you to send SOL equivalent to a given USD amount using live price feeds from Pyth Network.

It automatically converts a USD value into SOL at the current exchange rate, and transfers that amount of SOL from the sender to a destination account.


✨ Features

  • USD ➔ SOL conversion on-chain
  • 📡 Pyth Price Feeds (PriceUpdateV2) integration
  • ⏱️ Ensures fresh prices with configurable MAXIMUM_AGE (default: 1 hour)
  • ✅ Safe math checks for precision and overflow
  • 🔒 Built with Anchor for security and developer experience

📦 Tech Stack


⚙️ Installation

Clone the repo:

git clone https://github.com/bytehash69/send-usd.git
cd send-usd

⛓ Deployment

anchor deploy

🛠 Testing

anchor test

📤 Contributing

Contributions are welcome. Please ensure all tests pass and follow the existing code style.


⛓️‍💥 Disclaimer

This is experimental software. Use at your own risk. Always audit smart contracts before deploying to mainnet.


About

Send SOL equivalent to a given USD amount using live price feeds.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors