mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 08:15:19 +00:00
28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
<!--
|
|
order: 3
|
|
-->
|
|
|
|
# Messages
|
|
|
|
Users claim rewards using `MsgClaimUSDXMintingReward` and `MsgClaimHardReward` messages.
|
|
|
|
```go
|
|
// MsgClaimUSDXMintingReward message type used to claim USDX minting rewards
|
|
type MsgClaimUSDXMintingReward struct {
|
|
Sender sdk.AccAddress `json:"sender" yaml:"sender"`
|
|
MultiplierName string `json:"multiplier_name" yaml:"multiplier_name"`
|
|
}
|
|
|
|
// MsgClaimHardReward message type used to claim Hard liquidity provider rewards
|
|
type MsgClaimHardReward struct {
|
|
Sender sdk.AccAddress `json:"sender" yaml:"sender"`
|
|
MultiplierName string `json:"multiplier_name" yaml:"multiplier_name"`
|
|
}
|
|
```
|
|
|
|
## State Modifications
|
|
|
|
- Accumulated rewards for active claims are transferred from the `kavadist` module account to the users account as vesting coins
|
|
- The number of coins transferred is determined by the multiplier in the message. For example, the multiplier equals 1.0, 100% of the claim's reward value is transferred. If the multiplier equals 0.5, 50% of the claim's reward value is transferred.
|
|
- The corresponding claim object is reset to zero in the store
|