Categories
Solana

How do DeFi applications calculate the price for tokens that are listed on dex’s? In other words, are there smart contracts with functions that calculate the price or contain the necessary information to calculate the price off chain (e.g., with Serum or OpenBook)?

I’m trying to to learn more about Raydium and want to code up a swap without the SDK just using direct calls to my RPC. However, I’m realizing that calculating the minimum amount out seems to rely on data from the Raydium API, and I want to figure out how to construct a swap without the API.

I’m guessing there’s something obvious that I’m missing, but I’m struggling with the documentation that’s available (since everything just calls the Raydium API..).

Thanks!

submitted by /u/FrozenMuffinMan
[link] [comments]

Join The SmashBotAI Telegram Community Now! Get trade alerts, smashable token trade ideas, and more!

https://t.me/smashbotcommunity

Start Trading Now:

SmashBotAI Telegram Bot

Claim Your $SMASH Airdrop Now!

Join The SmashBotAI Telegram Community Now! Get trade alerts, smashable token trade ideas, and more! https://t.me/smashbotcommunity

Start Trading Now:
SmashBotAI Telegram Bot

Claim Your $SMASH Airdrop Now!

Categories