Skip to content

Test task for cc developers

dimxy edited this page Apr 27, 2021 · 6 revisions

A Test Task for CC Blockchain Developers

Goal: Implement a simple stablecoin in komodo assets chain.

How to start:
Make a fork from https://github.com/komodoplatform.com/komodo.git and build it on linux or macos.
Allocate a new evalcode and add custom consensus code for this eval code and implement needed rpc to create transactions - for the stable coin contract.

The stablecoin contract description:
This contract shold allow to create stablecoin treasury pool and issue coins in exchange for normal (mineble) coins and buyback stablecoins for normal coins. The consensus code should check that only valid user (public key) could issue stablecoins.

The contract should not convert existing coins but just store the stablecoin amount in the OP_RETURN as CAmount number. There should be rpc to transfer stablecoin from a user to user (from the current node pubkey to a destnation pubkey) Total issued stablecoin balance should be preserved and ensured by consensus code when stablecoin is transferred to other users (think about any rpc being changed by a malicious user to try to steal or add stablecoins).

Hints:

Clone this wiki locally