You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// We over-allocate by the developer vesting portion, and burn this later
err:=k.MintCoins(ctx, mintedCoins)
Epoch provisions include the developer rewards proportion. However, the developer rewards must be allocated from the developer vesting module account. As a result, we over-allocate from mint module account.
To mitigate, we instead burn tokens here while distributing them to dev reward receivers:
Instead, we should be minting the correct amount in the first place where we exclude the developer rewards from being minted by the mint module account. By doing so, we would avoid having to later burn the amount.
The suggested design should reduce coupling and remove the temporal decomposition code smell.
Acceptance Criteria
mint module account does not mint developer rewards
developer rewards are only minted by the developer vesting module account
unit test added to cover all new logic
The text was updated successfully, but these errors were encountered:
Background
Currently, we mint the number of tokens equal to epoch provisions:
osmosis/x/mint/keeper/hooks.go
Lines 42 to 47 in 8cb9470
Epoch provisions include the developer rewards proportion. However, the developer rewards must be allocated from the developer vesting module account. As a result, we over-allocate from mint module account.
To mitigate, we instead burn tokens here while distributing them to dev reward receivers:
osmosis/x/mint/keeper/keeper.go
Lines 218 to 220 in 8cb9470
This is called temporal decomposition where execution order is reflected in the code structure:
Suggested Design
Instead, we should be minting the correct amount in the first place where we exclude the developer rewards from being minted by the mint module account. By doing so, we would avoid having to later burn the amount.
The suggested design should reduce coupling and remove the temporal decomposition code smell.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: