# Actions

This page lists all actions on the pol.fusion contract, including their descriptions and a list of the parameters for each action.

## Quick Links

[#claimgbmvote](#claimgbmvote "mention")

[#claimrefund](#claimrefund "mention")

[#clearexpired](#clearexpired "mention")

[#deleterental](#deleterental "mention")

[#initconfig](#initconfig "mention")

[#initstate3](#initstate3 "mention")

[#rebalance](#rebalance "mention")

[#rentcpu](#rentcpu "mention")

[#setallocs](#setallocs "mention")

[#setrentprice](#setrentprice "mention")

### claimgbmvote

> If this contract has any voting rewards to claim from the eosio system contract, this action can be called by anyone to claim those rewards. Claiming will automatically send the rewards to the main dapp contract where they will be moved into the revenue\_awaiting\_distribution bucket.

### claimrefund

> If this contract has any refunds to claim from the eosio system contract, this action can be called by anyone to claim the refund. Claiming will automatically move the claimed WAX back into the wax\_available\_for\_rentals pool on this contract.

### clearexpired

> Unstakes WAX from any expired orders in the renters table, and removes the rows of the expired rentals.

| Parameter | Type | Description                                                                                  |
| --------- | ---- | -------------------------------------------------------------------------------------------- |
| limit     | int  | The maximum number of expired rentals that should be processed (to avoid CPU timeout issues) |

### deleterental

> If a user calls the rentcpu action on this contract, but never pays for their rental, this action will allow them to delete the unpaid rental from our contract. Requires auth of the renter.

| Parameter  | Type      | Description                        |
| ---------- | --------- | ---------------------------------- |
| rental\_id | uint64\_t | The ID of the rental to be deleted |

### initconfig

> Initializes the config singleton, if it doesn't exist yet. Requires auth of this contract.

### initstate3

> Initializes the state3 singleton. Requires auth of this contract.

### rebalance

> If the lswax\_bucket in the state singleton is empty, and the wax\_bucket has > 100 wax in it, this action will convert half of the wax into lsWAX, so that the next liquidity addition will allocate close to all of the protocol's funds. Can be called by anyone.

### rentcpu

> Opens a new row for a renter, which is required before the contract can accept a rental payment. If the row already exists, the action will do nothing besides sync the current contract state. Requires auth of the renter. Renter pays RAM on their row.

| Parameter     | Type | Description                                             |
| ------------- | ---- | ------------------------------------------------------- |
| renter        | name | The WAX address of the wallet who is renting CPU        |
| cpu\_receiver | name | The WAX address of the wallet that will receive the CPU |

### setallocs

> Updates the portion of protocol revenue that goes to liquidity on Alcor. Requires auth of this contract.

|                                     |           |                                                                                       |
| ----------------------------------- | --------- | ------------------------------------------------------------------------------------- |
| liquidity\_allocation\_percent\_1e6 | uint64\_t | The 1e6 scaled percentage that should go to liquidity. Can be set between 1% and 100% |

### setrentprice

> Updates the cost\_to\_rent\_1\_wax in the state singleton. Requires auth of the dapp.fusion smart contract, which calls this action inline when an admin\_wallet sets the rent price on that contract.

| Parameter              | Type  | Description                                                    |
| ---------------------- | ----- | -------------------------------------------------------------- |
| cost\_to\_rent\_1\_wax | asset | The WAX price that users will pay to rent 1 WAX for 1 full day |
