-
Notifications
You must be signed in to change notification settings - Fork 98
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
refact(v2.7): feeshare #206
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## release/v2.7 #206 +/- ##
================================================
+ Coverage 65.41% 68.13% +2.72%
================================================
Files 45 45
Lines 2137 2150 +13
================================================
+ Hits 1398 1465 +67
+ Misses 583 524 -59
- Partials 156 161 +5
|
wip: feeshare tests
…to refact/v2.7/feeshare
0e3156e
to
f61fd9f
Compare
f61fd9f
to
69b4339
Compare
…t/v2.7/feeshare
…to refact/v2.7/feeshare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some comments
javiersuweijie
approved these changes
Nov 21, 2023
tuky191
approved these changes
Nov 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request modifies the distribution method for feeshare incentives. Rather than solely rewarding the contract in execution—which may disadvantage other smart contracts engaged in the transaction and discourage the composition of multiple contracts...
The revised approach ensures equitable distribution of feeshare incentives among all smart contracts participating in a transaction. Each contract linked to the withdrawing address will receive an equal portion of the revenue share defined in the module param as a % of the transaction fee.
To achieve the previous statement, the official version of wasm is wrapped on a custom implementation which allows to keeps track of contract executions. When a contract is Executed the custom wasm module will keep track of each contract address in a list. When the transaction is completed the PostHanlder from x/feeshare will distribute the rewards between the participants and another post handler from x/wasm will remove the addresses that does not need to be stored for anything.