Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add set_min_fee() to allow babel fees without validation zones #699

Open
elRaulito opened this issue Nov 4, 2024 · 2 comments
Open

Add set_min_fee() to allow babel fees without validation zones #699

elRaulito opened this issue Nov 4, 2024 · 2 comments

Comments

@elRaulito
Copy link

Good morning everyone,

Lately at Fluid we have been working on Babel fees, and in order to allow them without validation zones it is possible for users to setup ADA utxos in a contract, allowing to be spent if that ADA is used for fees, also users can ask CNTs in exchange for them

We had already working it using Blaze, however Blaze is not plutus v3 compatible

image
https://github.com/butaneprotocol/blaze-cardano/releases/tag/%40blaze-cardano%2Ftx%400.3.2

What's the result and use case?
image

Users able to interact with txs without having to spend ADA from their wallets

How does the set_min_fee() works?

Since the evaluation process changes dinamically the fee of the tx, set_min_fee would enforce the minimum fee, after evaluation if the fee of the tx could be lower than min fee, it's forced to be the one we set in the function

What if this function is missing?
In general is hard to pass as parameter the fee to the smart contract because the fee is not something that can be controlled or forecasted

If you need any more input let me know

@lisicky
Copy link
Contributor

lisicky commented Nov 4, 2024

Thanks @elRaulito for your issue!
So you need a function to set fee value manually ? As I understood you the set_min_fee just do max(actual_tx_fee, requested_min_fee) ?
Would the next logic is valid for your use case:

  1. tx_builder.set_fee(desired_fee)
  2. tx_builder.add_change()
  3. And here will have error or ok if desired_fee have enough ada to cover actual fee.

@elRaulito
Copy link
Author

Exactly! @lisicky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants