Vesting via Cardano smart contract fails if receiver wallet is empty

161 Views Asked by At

Assume vesting code block in Plutus playground. Simply, if receiver wallet has some ADA, the contract works normally. But in case of an empty receiver wallet, transaction will fail because sending money from script to wallet needs an amount of fee and this fee should be paid by receiver. Any modification for such problem?

1

There are 1 best solutions below

0
On

That's not a problem, that's the way smart contracts works in cardano, even that's the way everything works on blockchain. When an address sends money to another, the source address should pay for the fees. That logic applies to any blockchain (as I know).

So, in smart contracts is the same. If a wallet wants to retrieve (not receive as you said) money from a validator script, then should pay for the fees. This is because the wallet wants those funds, therefore it should submit a transaction in the blockchain, that implies to pay the fees for it.

In blockchain, every user/wallet/addres that submit a transaction to the network, should pay fees.