-
Notifications
You must be signed in to change notification settings - Fork 9
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
LM parallel rewards support #41
base: master
Are you sure you want to change the base?
Conversation
val poolLQ0 = SELF.tokens(2) | ||
val poolVLQ0 = SELF.tokens(3) | ||
val poolTMP0 = SELF.tokens(4) | ||
val poolOptReward0 = SELF.tokens(5) |
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.
If the asset at this index is supposed to be optional, then I guess it can be absent. This code fails in that case.
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.
Yes, at least 1 optional reward token must be added during the initialisation with it's redeemer in the R5.
val budgetsNotDepleted = poolMainReward1._2 != 0 && poolOptReward0._2 != 0 | ||
|
||
if ( | ||
(deltaMainReward > 0 || deltaOptReward > 0) && !budgetsNotUpdated && budgetsNotDepleted |
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.
Budget can be increased only in the case opt token is initialized and not depleted?
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.
Same, depleted means 0 tokens, which is impossible during normal program operation
List of main changes: