A concrete example would be flash loans, where you could borrow some value from a lending script, do something interesting with it, and return the borrowed amount to the script with a fee, all in one transaction.

Intuitively this feels like it would need to be multiple transactions with separate outputs, but the lending script needs to verify that it is receiving sufficient value in return before it will ever lend anything.

How might this be modeled in Plutus to work?


Flash loans are not possible within the eUTXO model as each transaction is a single state transition, where a typical flash loan consist of two state transitions within a single transaction.

In my opinion, this is one of the most interesting security/safety features of the eUTXO model.

  • That "two state transitions within a single transaction" is what I mean by "atomic." Yeah. The safety here sounds comforting, but in describing the EUTxO model, Lars suggested that anything on Ethereum would be theoretically possible on Cardano--maybe I read too much into it. I'm far from understanding the limitations of the EUTxO model, but Haskell has ways of modelling this safely with the STM monad. I'd hope in the future Plutus could be extented to allow it. May 31 at 19:06
  • Yes, it was mentioned already that Lars called it a flash loan by mistake in one of the presentations, but he meant smart contract composability - similar, but a different concept. May 31 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.