smartcontractsalgorand

Is it possible for an account in algorand to cover transaction fees for a transaction if that account it neither sender or receiver?


recently I've been fiddling around Algorand.

I was going through the documentation & am wondering.

How is it possible for an Algorand Account to cover transaction fees for a transaction.

if it's neither sender or receiver?


Solution

  • This is really an Interesting question,

    I was also thinking something similar.

    I actually found Algorand do have a fee pooling mechanism.

    Before you do it you'll need to understand how Atomic transactions work.

    For this you can check out algorands documentation here

    In simple words it ensures either a transaction is executed fully or it fails.

    this allows to enable use cases like

    to execute and atomic transaction you'll need to group all the transactions & set transaction fees higher.

    Like before you compose an object set transaction fees to something like 2000

    txn.fee = 2000
    

    and the transactions you want to make it free for would have to set transaction fees at 0.

    txn.fee = 0
    

    this will allow you to cover transaction fees for other accounts.

    This is bit confusing but becomes much clear from this conversation on algorands forum