PIP-87: Re-Deploy Compass-EVM v2.1 Fee-Manager On Base

Proposal: PIP-87- Re-Deploy Compass-EVM v2.1 Fee-Manager On Base chain

Status: Proposed

Author(s): @BoweryKing

Type: EVM Proposal

Discussions-to: Governance - Paloma

Created: 08/23/2024

Simple Summary

The original Fee Manager deployment on Base deployed an empty contract. This is a vote to redeploy the Fee Manager contract to Base.

Abstract

The original Fee Manager deployment on Base deployed an empty contract. This is a vote to redeploy the Fee Manager contract to Base.

Motivation

The Paloma LightNode sale will be conducted on Base and this vote ensures that there is a fee-manager contract on Base.

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

  1. rewards_community_balance: public(uint256) # stores the balance attributed to the community wallet. These are the fees that are distributed to Paloma stakers.
  2. rewards_security_balance: public(uint256) # stores the balance attributed to the security wallet. These fees are distributed to validators for valset update security features.
  3. 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.
  4. 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.
  5. total_funds: public(uint256) # stores the balance of total user funds
  6. total_claims: public(uint256) # stores the balance of total claimable rewards

The DEX Details for swapping from target chain denom to GRAINs

  1. def bridge_community_fee_to_paloma(amount: uint256, dex: address, payload: Bytes[1028], min_grain: uint256) → uint256:

    1. bridge community fee to paloma address
    2. amount: community fee ETH amount
    3. dex: address of the DEX to use for exchanging the token
    4. payload: the function payload to exchange ETH to grain for the dex
    5. min_grain: expected grain amount getting from dex to prevent front-running(high slippage / sandwich attack)
  2. Run the governance command to deploy the smart contract to all evm chains.

# Base
palomad tx gov submit-legacy-proposal evm set-fee-manager-address \
base-main \
0x14dBCf69DadA3e5A9aFC54a24fdd1467c2bbd346 \
--title "PIP-87: Re-set Compass-EVM fee manager address for base" \
--summary "Re-set the Compass-EVM v2.1 fee manager address for base-main due to prior failure" \
--deposit 10000000ugrain \
--chain-id tumbler \
--fees 1000ugrain \
--gas-adjustment 1.1 \
--gas auto \
--node [node] \
--from [address] \
--yes

If the proposal passes, the Fee Manager will be re-deployed to the Base EVM L2 blockchain

Rationale

Compass EVM fee manager holds the fees paid by users for relay messages