Search code examples
wavesplatform

Assign a value in USD to a Waves smart asset token


I'm new very to blockchain and smart contracts. I am trying to understand how I can peg the value of a token to any stable coin or somehow allow it to be exchanged for a fixed value (e.g. in USD).

I would like to create a token that can be used within a game we are creating. The token will only be used within the game. We would like to use the Waves DEX API to enable users to buy and sell the token.

I've looked at the documentation for creating a smart asset and I cannot see an example or find any information on how to assign a value to a token. I basically would like our gamers to buy the token from us so they can use it in the game and then later sell it back to us for a fixed value in USD. Can anyone help further. Thanks


Solution

  • The token will be pegged to the USD because you promise to always give back $1 for every token. As long as you keep that promise, and people believe that you will be able to keep that promise for the foreseeable future, it is "pegged". In your example, your promise and reputation within your group of friends should have to be enough to "back" the token. In essence, all stablecoins work like this. They are backed by a company or even a smart contract that uses all sorts of methods to provide users trust that they will always be able to sell their tokens back for the original underlying value.

    So if you keep the token circulating among your friends, you should be fine. But if you start using the token outside of this close group, with people you may not even know - the "peg" will start to lose it's value. People don't know you and might not trust you to give back the full 1$.

    Be aware that there is no real method of "fixing" a coin to a specific value, at least not without a tremendous effort. Even the Tether (USDT) token fluctuates in price. For a game, you might try to use on of the stablecoins present on your platform.

    More importantly, selling cryptocurrency in exchange for dollars or other fiat (normal) currencies is a highly regulated activity, with expensive permits and complicated procedures regarding KYC/AML (Know-your-customer/Anti-money-laundering) so this should not be taken lightly.