Pay transaction fee to unlock funds in staking contract from the locked funds

The user @WooKing in the spanish Telegram group suggested that perhaps the fees involved in a transaction to unlock the funds in a staking contract could be taken from the locked funds. The reason is that it seems that many of us have been in a situation - maybe in DeFi, or an exchange - where to be able to withdraw funds we had to send additional funds to that account in order to be able to pay for the transaction fees.

Personally I’ve been there, and if that’s implemented it could be an usability improvement for a use case that seems to be quite common.

4 Likes

Nice to hear a suggestion although my dislike for high gas fees in Ethereum is above the level I can endure so maybe others will find this great for security.

1 Like

Indeed, and those high fees in Ethereum make things even worse when an additional transaction is required to move the funds needed to pay for the withdrawal transaction fees in the first place.

Right now it’s not possible, and it would require us to change the transaction format a bit. For the foreseeable future that won’t be an issue since Nimiq has zero tx fees.
After Nimiq 2.0 we intend to change to the UTXO model so that’s the perfect time to consider this problem (and it’s much easier to fix in the UTXO model).

2 Likes

Thanks for taking a look at this. I posted the suggestion because I thought it was interesting that it hadn’t been addressed in so many PoS projects, DeFi, and in crypto in general. Now that I’ve thought of it, it seems an obvious flaw in usability/UX that perhaps has become normalized across the sector. And as it correctly was pointed out by WooKing in Telegram, the banking sector don’t ask for a deposit to unlock funds that are already in the bank (I’m paraphrasing). I’m glad that the UTXO model will bring easier ways to tackle the issue in Nimiq 2.0.

You’re right, it’s a huge usability flaw. Together with not allowing other accounts to pay your transaction fees and not allowing paying transaction fees in non-native tokens, it does complicate the UX a lot in Ethereum (and others).
The problem appears because in the account model each transaction is an interaction between two accounts, it’s always an 1-to-1 relationship. And having the transaction initiator pay the fees is the only sane option. But that, by definition, forces the user to have tokens to do any interaction.
The UTXO model is better in this situation. A transaction is just the destruction of n inputs and the creation of m outputs. And the fees are not attributed to anyone in particular. If we can make a user’s stake be an UTXO like any other, then it’s easy to do what you said (and other cooler stuff).

2 Likes