# ExtraRewardsMultiMerkle

This smart contract's purpose is to hold the rewards coming from votes on gauge incentives for users that delegated their voting power to the Paladin delegation address

(current delegation address is : 0x68378fCB3A27D5613aFCfddB590d35a6e751972C)\
\
The distribution process is : \
\- Paladin claims all rewards for the users, and swap everything to USDC\
\- The Merkle Root in this smart contract is frozen, allowing to calculate the round rewards to be added to each user, based on the votes they delegated, and the previous amounts claimed or not by the user (allowing users to accumulate the rewards to claim it all at once).\
\- A new Merkle Root is generated and updated in this smart contract, allowing users to claim their rewards.

## Smart Contract :&#x20;

Here are the useful methods on this smart contract :&#x20;

### ClaimParams struct :

<pre class="language-solidity"><code class="lang-solidity">struct ClaimParams { 
<strong>    address token; 
</strong>    uint256 index; 
    uint256 amount; 
<strong>    bytes32[] merkleProof; 
</strong>}
</code></pre>

### isClaimed :

Checks if the rewards were claimed for an index

#### Params :&#x20;

* &#x20;token : address of the token to claim&#x20;
* &#x20;index : Index of the claim&#x20;

**Returns :**  bool : true if already claimed

{% code overflow="wrap" %}

```solidity
isClaimed(address token, uint256 index) public view returns (bool)
```

{% endcode %}

### claim :&#x20;

Claims rewards for a given token for the user

#### Params :&#x20;

* &#x20;token : Address of the token to claim&#x20;
* &#x20;index : Index in the Merkle Tree&#x20;
* &#x20;account : Address of the user claiming the rewards&#x20;
* &#x20;amount : Amount of rewards to claim&#x20;
* &#x20;merkleProof : Proof to claim the rewards

{% code overflow="wrap" %}

```solidity
function claim(address token, uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) public
```

{% endcode %}

### multiClaim :&#x20;

Claims multiple rewards for a given list of ClaimParams

#### Params :&#x20;

* &#x20;account : Address of the user claiming the rewards&#x20;
* &#x20;claims : List of ClaimParams struct data to claim

{% code overflow="wrap" %}

```solidity
function multiClaim(address account, ClaimParams[] calldata claims) external
```

{% endcode %}

### freezeRoot :&#x20;

Freezes the given token

#### Params :&#x20;

* &#x20;token : Address of the token to freeze&#x20;

{% code overflow="wrap" %}

```solidity
function freezeRoot(address token) public
```

{% endcode %}

### updateRoot :&#x20;

Udpates the Merkle Root for a given token

#### Params :&#x20;

* token : Address of the token&#x20;
* root : Merkle Root

{% code overflow="wrap" %}

```solidity
function updateRoot(address token, bytes32 root) public
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paladin.vote/warden-quest-v1-deprecated/smart-contracts/extrarewardsmultimerkle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
