Am a rust developer, just getting started on concordium blockchain, i wanted to create a stable coin smart contract and build an oracle that points at the token standard in which it can use ID layer and be mined in batches anytime, and it will be holding the price pegged to the token. anyone that can guide me on that?
Hello Justen90 thank for contacting Us.
We will get back to you ASAP.
Regards, Concordium Tech Support
Hi Justen90,
You can get started with the CIS-2 standard for your token. The CIS-2 standard can represent fungible and non-fungible tokens. It combines the Ethereum ERC20
and ERC721
standards with some modifications. Here are some example implementations from the Concordium smart contract repo that might help you get started.
Since you specifically asked for stablecoins: One important design decision is for stablecoins that you have to ensure that your token stays pegged to e.g. 1 USD. It could be that you need a reserve and actually hold USD that is valued at the same amount then your tokens in the smart contract or have any other insurance/algorithm that guarantees your peg.
Since you ask about smart contract oracles:
There is an example of how to implement a “weather oracle” in this ice cream example. An oracle feeds outside data to a smart contract.
ice cream smart contract
can you give me a already made stable coin token smart contract for me to clone for my project?
Can you take me through?