ioCash is a platform composed of a centralized API and smart contracts that reside on blockchain. While some operations start at the API-centric solution, others are directly executed against the blockchain in a decentralized way. In both cases, in all operations, it is required the intervention of the two parts of the platform and thus there is constant communication between them.
Cash-in operations (card cash-in and SEPA cash-in) are started in the centralized API since they are actions that are coming from exterior accounts and the change of balance is reflected first on the IBAN bank account. On the other hand, transfers between ioCash accounts are decentralized, users can directly trigger them against the blockchain. Of course, the operation will be as well reflected and verified by the banking institution connected to our API. Cash-outs are at the moment centralized operations but in the near future, it will also be possible to execute them directly against the smart contract.
IoCash is Ethereum network agnostic i.e. it can be used in any Ethereum based network, no matter if it is public, private or permissioned and what consensus protocol it is used.
For the moment, IoCash use cases are deployed on a permissioned network. Compared to the Ethereum main net, instead of PoW (proof of work), it uses POA ( Istanbul BFT ) consensus algorithm that does not require as much computational power and energy consumption. However, each client can decide in wich network to deploy their solution.
ioCash team, in collaboration with Adhara, is creating an extension of the ERC-20 token standard called EM-Token that adds extra functionalities with the aim to enable the issuance of regulated electronic money on blockchain networks and its practical usage in real financial applications.
These main functionalities are: compliance, holds, clearing, funding requests and payouts orders.
ioCash is already using some of these concepts in its smart contracts. The next paragraphs will explain these functionalities and how to use them by interacting with the smart contracts.
In order to interact with the EM-Token smart contract the following Solidity contract can be used, which combines the transfer, hold and two step transfer functionalities.
The abstract EM-Token contract can be found in our GitHub repository.
The EM-Token offers the following features:
ioCash is fully compliant with the ERC-20 standard which is used for transfers. The following functions are available:
transferSend tokens to another address.
transferFromSend tokens on behalf of somebody else.
approveAllow another address to send on your behalf.
allowanceTells you how much somebody can send on somebody else's behalf.
balanceOfTells you how many tokens an address has.
totalSupplyTells you total amount of all tokens combined.
decimalsTells you how many decimals after the coma can be used when transferring tokens.
symbolTells you the individual symbol of a token.
nameTells you the individual name of a token.
For more details please see the ERC-20 standard.
Holds guarantee a future transfer and make the held tokens unavailable for transfer in the meantime. Holds are similar to escrows because they are firm and lead to final settlement.
A hold specifies a payer, a target, an amount, a notary and an expiration time. When the hold is created, the specified token balance from the payer is put on hold. A held balance cannot be transferred until the hold is either executed or released. The hold can only be executed by the notary, which triggers the transfer of the tokens from the payer to the payee. The execution of a hold can be done with the full amount or a partial one. If only a partial hold is executed the remaining tokens are available again to the payer. If a hold is released, either by the notary or the target at any time, or by anyone after the expiration, no transfer is carried out and the amount is available again for the payer. The expiration of a hold is optional, it can also be perpetual.
The following functions are offered:
holdCreates a new hold.
holdFromCreates a new hold on behalf of another account.
executeHoldTransfers all or a part of the tokens which were specified when creating the hold.
releaseHoldDoes not make a transfer and makes the held tokens available again to the payer.
renewHoldChanges the expiration date.
retrieveHoldDataReturns the details of a given hold.
balanceOnHoldTells you how many tokens of an address are held.
netBalanceOfTells you how many tokens including the held tokens an address has.
totalSupplyOnHoldTells you total amount of all held tokens combined.
authorizeHoldOperatorAuthorizes an account to create holds on behalf of the sender.
revokeHoldOperatorRevokes the permission to create holds on behalf of the sender.
isHoldOperatorForReturns if an account is authorized to create hold on behalf of another account.
The following ERC-20 functions behave differently than the standard if a hold is used:
The held balance of an account is deducted from the ERC-20 balance. In order to get all tokens assigned to an account the function virtualBalanceOf has to be used.
The implementation of ERC-20 has been changed in order to deduct the held balance from the ERC-20 balance. Any amount that is held can not be transferred.
The standard implementation of ERC-20 has been changed in order to deduct the held balance from the ERC-20 balance. Any amount that is held can not be transferred.
For more details please see our GitHub repository with the interface of the Holdable Token.
The two step transfer (clearing) process turns the promise of a transfer into the actual movement of money from one account to another. It has the same properties as a hold, but the notary and expiration are set automatically by the ioCash platform. The amount which should be transferred is not deducted from the balance of the payer, but neither is it available for another transfer and therefore ensures, that the execution of the transfer will be successful when it is executed. Off-chain checks are executed to decide if the transfer can be executed or not.
The following functions are offered:
orderTransferCreates a request for a transfer.
releaseTransferTransfers the token which were specified when requesting the transfer.
revokeTransferByExpirationRevokes the transfer after it has expired.
revokeTransferByNotaryThe notary can revoke the hold at any time.
revokeTransferByTargetThe target can revoke the hold at any time.
For more details please see our GitHub repository with the interface of the TwoStep Transferable Token.