In the real world,
let's say I have some Commodities Certificates each of the cost of 1000 USD $ and I want to create new tokens with the same value (in Ether).
USD Dollars and Ethers are volatil so in Solidity how can I deploy these new tokens?
In the real world,
let's say I have some Commodities Certificates each of the cost of 1000 USD $ and I want to create new tokens with the same value (in Ether).
USD Dollars and Ethers are volatil so in Solidity how can I deploy these new tokens?
Firstly, you can't exactly do this, because static value cannot be assigned to something with variable value. You can tether a token to the price, but the actual cost of converting the token to fiat will always be included in the exchange. If the Ethereum network ceases to exist, those tokens will also become worthless. This is also a risk that will always be priced into the token.
So while it is possible to tether something, it is impossible to peg it exactly. It's still a derivative product. Any number of derivative products can be created to mitigate risk, including tethered tokens, but there is always a price to be paid for reducing variance. The more volatile the underlying asset, the more you will pay to reduce exchange risk.
If you are looking to for the technical aspects of doing this, please start with Vitalik's SchellingCoin article. https://blog.ethereum.org/2014/03/28/schellingcoin-a-minimal-trust-universal-data-feed/
There is more than one strategy for doing a tether, and there are compromises to be made no matter which contract you write.
you can create and distribute a stable-value token using an ERC20 smart contract. the token should not be traded to avoid the volatility due to the speculation. but you need to back it by so;thing real having an intrinsic stable value or pseudo-stable like gold.