Trying to understand how ERC20 Smart Contracts could work for Omni MAID

Hey guys I’ve been exploring how ethereum smart contracts work and figured out a way for MaidSafe to host a ERC20 token that would be backed 1:1 by Omni MAID.

This video has been the basis for my understanding to easily deploy an ERC20 token and work in the following way:

  1. Omni protocol and the Ethereum blockchain cannot communicate to each other thus a central server must bridge the calls. This requires a omni core node (on top of full bitcoin node) that can receive RPC calls to know the balance of the public address that receives and sends MAID for claiming ERC20 tokens and claiming back MAID. To ensure safety of deposited funds I would say this wallet with the private keys and server must be controlled by MaidSafe or else the potential risk for a third party to run away with funds is too high.

  2. There will be a smart contract that represents the ‘MAID’ ERC20 token. This will have same limit as tokens as MAID = 452,552,412.

  3. There will be a smart contract (lets call it TokenIssuer) that issues, keeps publicly track of the amount that is being issued and redeemed. This smart contract is similar to the video (where it is called TokenFarm) being controlled by the owner, in this case MaidSafe, by using function to issue ERC20 to the address of the person who deposits MAID or transfer ERC20 back to the ERC20 token smart contract when someone redeems his MAID.
    This also means that only as many ERC20 tokens can be issued as MAID deposited to the public address held by MaidSafe, if only 10000 MAID is deposited and locked-up, only 10000 ERC20 tokens will exist. This TokenIssuer must be called by a server that monitors the Omni Core wallet and is able to give RPC commands to return MAID to the people who redeem their MAID by sending back their ERC20 Tokens.

In the video they demonstrate farming with the TokenFarm smart contract. For our example this would not be added. Basically a deposit address with 0% interest.

A problem here is transferring MAID in and out the controlled wallet because this requires BTC to pay for transaction fees plus GAS fees for the Ethereum Network also have to be payed. The user who wants to claim MAID thus has to send both to pay for these fees and I assume this kind of asynchronous logic would be tedious to develop and ensure it works flawlessly. The main issue here is really the cross-chain interaction of both Omni and Ethereum.

If successful it could be a great two way route,
a) Omni Maid ==> Get’s locked up ==> ERC20 Amount Gets Issued and is tradable on any DEX
b) ERC20 Tokens ==> Get Redeemed and Unlocked ==> Send out to address of redeemer who pays for tx fees.

This is just my personal findings and if anything is unclear or could be done differently please reply. Would also be great if @SwissPrivateBanker could explain how his team would proceed in making this a reality and who would control the MAID that is being transfered for ERC20 Tokens.

Note I added an image of what I think the layout would be, the ERC20 Token and TokenIssuer are deployed on the Ethereum Network but I think some kind of polling would be required by the server to know the current state of these on-chain values to be used by the RPC distributing MAID or having the server call command to issue ERC20 for people who deposit MAID and receive ERC20 Tokens.


Very good research, friend! Thank you!


I would add that the MaidSafe company does not need to do anything. Once we release Fleming, many intermediaries will appear and take advantage of the opportunity to sell at a premium price in the ETH DEXs…

1 Like

The Omni Wallet receiving and sending the MAID can be hold by a third-party but I assume not many trust any party besides MaidSafe to be in control of the locked supply. Besides this and dealing with transaction fees (BTC and Gas) the whole process is pretty straightforward and simple.

People who lock in can sell their ERC20 Tokens at premium price on DEX’s to cover fees and make it attractive. In turn they receive BTC again for their sold Tokens which others can then redeem for MAID. The sellers can then again rebuy maid at KYC exchanges and repeat the arbitrage process to increase their MAID holdings and value.

Buyers of the Tokens have the pro of not needing any KYC to buy Omni MAID after they redeem it.

1 Like

There are millions and millions in bitcoin locked in the Ethereum network through third parties, I think it will not be a problem for a small token like MAID :wink:

1 Like

Thank you very much for the research. We know SAFE Network is going to be amazing. We should make sure there is as much liquidity as possible. I’m down to only one source to buy MAID in the US we pay 10% over asking.


A centralised exchange service is not required in theory and although it does sound like a simple solution, it also means having to trust a single third party to hold and secure the locked Omni Maid plus adds KYC honey pots on top. A much better solution is a decentralised method that can be verified as secure by anyone.

A more sustainable solution is to use one of the upcoming fully decentralised, and open sourced cross chain protocols. For example AnySwap running on the Fusion chain could be promising perhaps even more desirable than the Ren project method (which have committed to closed source algorithms for false sense of security)

1 Like