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

Economic protocol scenario 3 - contract earns fees #353

Closed
miloszm opened this issue Apr 10, 2024 · 0 comments
Closed

Economic protocol scenario 3 - contract earns fees #353

miloszm opened this issue Apr 10, 2024 · 0 comments
Assignees
Labels
team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)

Comments

@miloszm
Copy link
Contributor

miloszm commented Apr 10, 2024

Summary

We have a mechanism for "contract-pays-for-gas" scenario, now, based on similar approach we need to implement "contract-earns-fees" scenario.

Possible solution design or implementation

Make a method named "set_charge" available for contracts, and pass the charge down to the transfer contract. Transfer contract will increase contract's balance and pass down the signal for increasing the fee. Should the fee be not paid, the transaction will be rejected.

Additional context

This issue is related to Rusk issue 1630

@miloszm miloszm added team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc) labels Apr 10, 2024
@miloszm miloszm self-assigned this Apr 10, 2024
@HDauven HDauven added this to the Mainnet milestone Apr 10, 2024
@miloszm miloszm closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)
Projects
None yet
Development

No branches or pull requests

2 participants