I'm writing a Defi project. What I want to do is to set an automatic payment. For example, when a lender asks to lend 10 eth, the money would be automaticly sent to him after a month. I have searched a lot but found nothing. Are there any possible remedy? THANKS!
I'm writing a Defi project. What I want to do is to set an automatic payment. For example, when a lender asks to lend 10 eth, the money would be automaticly sent to him after a month. I have searched a lot but found nothing.
You don't. In Ethereum, transactions are always initiated by the user, or Externally Owned Accounts (EOAs).
You program your smart contract in a way that after certain block.timestamp
has passed the user can call claim()
function that sends him any payment.