Plutus Smart Contracts interaction with Yoroi Wallet

I am new to the Blockchain space but excited about exploring possibilities for DApps which are immediately usable in Developing countries where Peer-to-Peer via Mobile phones is the only practical solution. Currently, I am designing an App which will use Plutus Smart Contracts depositing/withdrawing funds (ADA) from Yoroi Wallets managed in the Cardano Blockchain. I am also hoping to explore how Soshen could provide ease of infrastructure implementation.

Question:

  1. How would Plutus Smart Contract communicate to the Yoroi Wallet ? This is general education question…is there a non-technical document I can read?

  2. Will the Plutus Smart Contract be able to “lockdown” the funds deposited for the Smart Contract within the Yoroi Wallet (this would be a major benefit for unreliable Internet connectivity) or will it be within the Smart Contract on the Cardano Blockchain (This could slow down the Smart Contract execution where there is unreliable Internet connectivity?

1 Like
  1. Plutus is still in development so IOHK is investigating multiple ways to connect to Plutus from Javascript and other applications in general. You can see their progress on this on Github

  2. Do you mean will we store the smart contract locally on Yoroi? The first version of Plutus will run on the settlement layer and lets you lock utxos themselves with scripts. Presumably we will have to store these scripts locally on the device since it’d be the only way to detect which utxo is spendable.

3 Likes

Thanks for the feedback. I am adopting the worse case scenario where Yori can only get infrequent Internet Access to sychronise via the Sidechain to Cardano blockchain. There is the important need to assure the user that once the funds are deposited for the Smart Contract, that there is on-going reliable communication between the Smart Contract and Yoroi. So with the Smart Contract App resident in the User phone but secured on the Blockchain via the sidechain functionality. It should not be possible for the user or some bad actor to be able to delete Yoroi, reinstall Yoroi to a state prior to the deposit of the funds for the Smart Contract, thus denying Smart Contract fulfilment and blaming the Smart Contract as faulty…I hope I am making sense.

Another way to look at it is that if the deposited funds are locked up in Yoroi with the Private Key in the Smart Contract, then even if Yoroi was re-installed, the Smart Contract should be able to communicate with Yoroi and confirm that there was a valid allocation of funds that needs to be restored. Maybe, with Yoroi having updated to the Cardano Blockchain prior to the re-install may automatically restore the funds and contract as part of the partial re-sychronisation…

Question: A bad actor could delete the scripts with the utxos if it is stored on the Mobile phone to void the Smart Contract, unless it is stored on the Block chain. How can the funds auto-restore in Yoroi be accomplished? There are very strong incentives among people in poor countries to avoid contracts and we need immutability in funds allocated to a contract when there is unreliable Internet connectivity.
Are the suggestions I have made previously in response to your reply useful, misguided or am I miss understanding how Yoroi will be able to work with Smart contracts? I want to understand Yoroi’s capability and limits when interacting with a Smart Contracts irrespective of whether it is Plutus or Ethereum Classic, etc.