Login
Register
All Activity
Questions
Unanswered
Tags
Users
Ask a Question
Welcome to the Developer Q&A for the
MultiChain
blockchain platform.
Please feel free to ask questions about the platform to receive answers from the MultiChain developers or other members of the community.
Related questions
How to decode/tally the vout in the decoded output of sendassettoaddress transactions
Smart contracts in Multichain?
How to implement B2B Data Transfer Application in MultiChain ?
how to write smart contract in multichain?which language it supports for writing smart contract
How can i implement etherium like smartcontract in multichain
4,157
questions
4,370
answers
5,718
comments
Most popular tags
multichain
streams
assets
stream
transactions
json-rpc
blockchain
wallet
permissions
error
address
raw-transactions
asset
mining
node
api
issue
multichain-explorer
nodes
connect
multichaind
multisig
transaction
smart-filters
metadata
private-key
atomic-exchange
multichain-cli
multichain-web-demo
data
connection
performance
blocks
demo
web
json
database
storage
native-currency
bitcoin
private-blockchain
network
fee
smart-contracts
wallets
signrawtransaction
off-chain
exchange
multiple-nodes
getnewaddress
How to implement "Smart Contracts" in multichain?
0
votes
Hi,
Please guide me, as to how to create "Smart Contracts" in multichain (with or without Ethereum)?
Regards
Anuj Mehra
smart-contracts
transfer
asset
asked
Jan 25, 2016
by
anuj
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1 Answer
0
votes
What a well timed question... (
http://www.ibtimes.co.uk/how-are-banks-actually-going-use-blockchains-smart-contracts-1539789
)
Right now MultiChain does not have a built-in smart contracts layer. But a "smart contract" is just a piece of code that runs on a blockchain, so can you tell us anything more about what you would like your smart contract to actually do?
answered
Jan 25, 2016
by
MultiChain
Hi,
We are planning a solution where multiple parties will be involved, as below;
1). A bank (guarantor)
2). 2 or more customers
Customers will be involved in a deal (supplier and consumer). Consumer will remit the payment to the bank (guarantor) and bank will remit payment to the supplier from time to time on the basis of some conditions getting fulfilled.
How can we proceed with such a solution using Multichain?
Regards
Anuj
OK, but what is the nature of these conditions, and who supplies the information for them?
Let's take a use case:
There is a goods producer (P) and a consumer (C). Bank is the guarantor (G).
When C places order for x goods to P, P will have to make good and thus need to invest money. C won't give any upfront payment to P due to trust issue.
Both P and C trust G. So C will remit money to G and on logical conditions like; procurement of ram material , dispatch of goods by P, goods received by C, G will remit some amount of total amount to P.
We are looking for a smart contract where such conditions can be coded.
Regards
Anuj
OK, but *who* is writing to the blockchain whether conditions such as procurement, dispatch, and goods received have happened? The blockchain cannot interrogate the outside world to know this information, so some trusted party/parties will be responsible for submitting and signing this information.
If it is the bank, they you don't need anything else - the bank can just check whether the conditions are fulfilled, and then make the payment if appropriate.
If it is some other party/parties, then you can use multisig, so the transaction needs to be signed by both the bank and this other party/parties, if the appropriate conditions are fulfilled.
For audit purposes you can still embed any information regarding procurement, dispatch, etc..., inside the blockchain, using transaction metadata.
So we are saying that, we will have an outside system, in which bank will be having its own database, where it will maintain what all steps that have been performed (like a workflow).
And on the blockchain, we just transfer asset(s) between wallet addresses.
Then where does "Smart Contract" came into picture?
Exactly. A "smart contract" means executing general-purpose computer code on a blockchain. MultiChain does not support this because we are waiting to understand more about the common use cases that are not covered by simpler things like multisig and transaction metadata.
Is there a reference URL providing detail about how to use multisig with MultiChain?
I don't have idea about multisig, so not sure if we can use it for our use-case or not.
Not yet but any reference for Bitcoin will work exactly the same on MultiChain.
Is there any reference material available to implement Ethereum along with Multichain?
No, not at the moment - sorry.
So if I understand correctly - the logic operations of the transactions happens off the blockchain, for example on a validation server, and the final result of the validation initiates an action on the blockchain; this can be transferring representation of an asset, or equally just appending new state information. Did I understand that correctly?
Thanks
No, all logic is processed on the blockchain, i.e. calculated by every node. Otherwise someone could post a false outcome.
I have kept my business login outside the blockchain. I am currently using blockchain as persistence layer.
Hi Anuj, that's pretty much what I'm thinking, thanks. As for the blockchain, it can be used for acceptance validation of logic before recording for persistence, no?
Thanks
Can you give an example?
Please
log in
or
register
to add a comment.
...