Proposal: PIP-82: Deploy Compass-EVM Fee-Manager On All Target Chains
Status: Proposed
Author(s): birdlady
Type: EVM Proposal
Discussions-to: Governance - Paloma
Created: 08/29/2024
Simple Summary
With the deployment of Paloma v2 and Pigeon v2, Paloma Compass-EVM deployment requires the initial deployment of Compass-EVM fee manager. This proposal outlines the vote for the fee manager to the current eight target chains supported by Paloma.
Abstract
With the deployment of Paloma v2 and Pigeon v2, Paloma Compass-EVM deployment requires the initial deployment of Compass-EVM fee manager. This proposal outlines the vote for the fee manager to the current eight target chains supported by Paloma.
Motivation
Paloma v2 and Pigeon v2 requires that all relay and decentralized jobs be paid in advance for execution. Users make payments to Compass-EVM contracts. In order to redeem payments to validators for execution, Paloma requires the Fee Manager
contract to be deployed and its address included in the Paloma Compass-EVM constructor so that the Compass-EVM deployed on each chain references the canonical Paloma Compass-EVM v2 contract.
Specification Overview
The Fee Manager contract is a Vyper contract that controls the management of fees collected for relay activities on target chains and for general jobs completed by Paloma validators.
Technical Specification
The Rewards Program
- rewards_community_balance: public(uint256) # stores the balance attributed to the community wallet. These are the fees that are distributed to Paloma stakers.
- rewards_security_balance: public(uint256) # stores the balance attributed to the security wallet. These are the fees that are distributed to validators for valset update security features.
- funds: public(HashMap[bytes32, uint256]) # stores the spendable balance of paloma addresses. This is the spendable balance of Paloma addresses that have prepaid for onchain execution.
- claimable_rewards: public(HashMap[address, uint256]) # stores the claimable balance for eth addresses. This is the spendable balance of EVM addresses that have prepaid for onchain execution.
- total_funds: public(uint256) # stores the balance of total user funds
- total_claims: public(uint256) # stores the balance of total claimable rewards
The DEX Details for swapping from target chain denom to GRAINs
def bridge_community_fee_to_paloma(amount: uint256, dex: address, payload: Bytes[1028], min_grain: uint256) → uint256:
- bridge community fee to paloma address
- amount: community fee ETH amount
- dex: address of the DEX to use for exchanging the token
- payload: the function payload to exchange ETH to grain for the dex
- min_grain: expected grain amount getting from dex to prevent front-running(high slippage / sandwich attack)
- Run the governance command to deploy the smart contract to all evm chains
# 01. Arbitrum
palomad tx gov submit-legacy-proposal evm set-fee-manager-address \\
arbitrum-main \\
0xd865124b3d9C67acDFB830bEa4f3070a4123Ed34 \\
--title "PIP-82: Set fee manager address for arbitrum" \\
--summary "Registers the fee manager address for arbitrum-main" \\
--deposit 10000000ugrain \\
--fees 1000ugrain \\
--gas-adjustment 1.1 \\
--gas auto \\
--from="$ADDRESS" \\
--yes
# 02. Base
palomad tx gov submit-legacy-proposal evm set-fee-manager-address \\
base-main \\
0xde43baC3dDC0dFd71117ADe93a92a2Aa079377BB \\
--title "PIP-82: Set fee manager address for base" \\
--summary "Registers the fee manager address for base-main" \\
--deposit 10000000ugrain \\
--fees 1000ugrain \\
--gas-adjustment 1.1 \\
--gas auto \\
--from="$ADDRESS" \\
--yes
# 03. BNB
palomad tx gov submit-legacy-proposal evm set-fee-manager-address \\
bnb-main \\
0x60192927fA8c0e6aa5D1BeCDe6b043817778A04A \\
--title "PIP-82: Set fee manager address for bnb" \\
--summary "Registers the fee manager address for bnb-main" \\
--deposit 10000000ugrain \\
--fees 1000ugrain \\
--gas-adjustment 1.1 \\
--gas auto \\
--from="$ADDRESS" \\
--yes
# 04. BLAST
palomad tx gov submit-legacy-proposal evm set-fee-manager-address \\
blast-main \\
0x621fa57c7229d207D1D9b6DeEB6c25B936D86DB8 \\
--title "PIP-82: Set fee manager address for blast" \\
--summary "Registers the fee manager address for blast-main" \\
--deposit 10000000ugrain \\
--fees 1000ugrain \\
--gas-adjustment 1.1 \\
--gas auto \\
--from="$ADDRESS" \\
--yes
# 05. Ethereum
palomad tx gov submit-legacy-proposal evm set-fee-manager-address \\
eth-main \\
0x1067082fD0b74BfDdFd5794E5AC0F24ED941dcc9 \\
--title "PIP-82: Set fee manager address for eth" \\
--summary "Registers the fee manager address for eth-main" \\
--deposit 10000000ugrain \\
--fees 1000ugrain \\
--gas-adjustment 1.1 \\
--gas auto \\
--from="$ADDRESS" \\
--yes
# 06. Gnosis
palomad tx gov submit-legacy-proposal evm set-fee-manager-address \\
gnosis-main \\
0xCb48C27E69ACFC2466941F71ff9e8530d53B5581 \\
--title "PIP-82: Set fee manager address for gnosis" \\
--summary "Registers the fee manager address for gnosis-main" \\
--deposit 10000000ugrain \\
--fees 1000ugrain \\
--gas-adjustment 1.1 \\
--gas auto \\
--from="$ADDRESS" \\
--yes
# 07. Polygon
palomad tx gov submit-legacy-proposal evm set-fee-manager-address \\
matic-main \\
0x8A3b188e5b8F3AC0437cfb85db4Ca1Ee41225eED \\
--title "PIP-82: Set fee manager address for matic" \\
--summary "Registers the fee manager address for matic-main" \\
--deposit 10000000ugrain \\
--fees 1000ugrain \\
--gas-adjustment 1.1 \\
--gas auto \\
--from="$ADDRESS" \\
--yes
# 08. Optimism
palomad tx gov submit-legacy-proposal evm set-fee-manager-address \\
op-main \\
0x0b15Cd4f536c0c198bccfA69fD6eb5e8192D5FD9 \\
--title "PIP-82: Set fee manager address for op" \\
--summary "Registers the fee manager address for op-main" \\
--deposit 10000000ugrain \\
--fees 1000ugrain \\
--gas-adjustment 1.1 \\
--gas auto \\
--from="$ADDRESS" \\
--yes
If the proposal passes, the Fee Manager
will be deployed to all existing and future supported EVM target chains.
Rationale
Compass EVM fee manager holds the fees paid by users for relay messages