Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
What specifies the price of a jetton?

Where is the line of code that specifies the price of a jetton? Is the price of a jetton always what I choose or does it change with supply and demand?


This question was imported from Telegram Chat: https://t.me/tondev_eng/9849

Votes Newest

Answers


When added to a liquidity pool protocol, a jetton is defined by supply and demand. If you are looking for a way to sell a jetton at a single fixed price, then you're likely looking for an ICO smart contract:

https://github.com/ton-blockchain/token-contract/blob/main/ft/jetton-minter-ICO.fc#L56

Where the amount of TON sent with the transaction is multiplied by some value of jetton to mint to the sender.

int jetton_amount = buy_amount; ;; rate 1 jetton = 1 toncoin; multiply to price here

;; additional code

mint_tokens(sender_address, jetton_wallet_code, amount, master_msg);
1
1
Posted one year ago
Edited one year ago
Jeremy
404 × 5 Administrator
18K Views
1 Answer
one year ago
one year ago
Tags