Search code examples
blockchainsmartcontractswavesplatformride

In Ride4dApps, how does the deposit and withdraw dApp(the example in Waves IDE) handle the delay issue?


Their seems to be a delay write key and transferring asset which means the deposit function could be manipulated what if someone deposits then immediately withdraws the money from the invoke account the dApp will still write a record with the amount specified?

enter image description here


Solution

  • ScriptResult(WriteSet(), TransferSet()) is a total inseparable result of transaction. All transactions are processed strictly one after another. So such problem will never happen.