DEV Community

flat cash
flat cash

Posted on

Guide: How to verify FLAT Protocol contracts on Etherscan

Guide: How to Verify FLAT Protocol Contracts on Etherscan

As a DeFi analyst, I believe in the principle of "trust, but verify." This guide empowers you to independently inspect FLAT Protocol's core smart contracts on Etherscan, ensuring transparency and understanding the protocol's mechanics without needing to delve into complex Solidity code.

1. FLAT Protocol Contract Addresses

The FLAT Protocol consists of several key smart contracts. Here are their addresses on the Ethereum mainnet, along with direct Etherscan links:

  • FLAT Token: 0x6AD27352CEb1B55A1Cbf885cEfC2Ed5A9183aE99 (View on Etherscan)
  • CPIOracle v4: 0x6C7B097af674F8e2daaeADcE05Eb7725083ecF7a (View on Etherscan)
  • FlatSale v3: 0x01ddC49b9C366D5c40C57d002BA08fD0eA669189 (View on Etherscan)
  • SAVE (Vault): 0x9f0DD6e940478293964aE778e4C720B720cf9cAe (View on Etherscan)
  • FlatReserve: (Information not found in provided search results. Please refer to official FLAT Protocol documentation for this address.)

2. How to Find Contracts on Etherscan

You can find any contract on Etherscan by pasting its address into the search bar at the top of the Etherscan website (etherscan.io). Once you navigate to a contract's page, you'll see various tabs. The "Contract" tab is where you'll perform most of your verification.

3. What to Look For: Verified Source Code, No Proxy Pattern, No Owner Functions

Verified Source Code

On the "Contract" tab, look for a green checkmark next to "Contract" and the word "Verified (Exact Match)". This indicates that the deployed bytecode on the blockchain precisely matches the provided source code, ensuring transparency.

No Proxy Pattern

A proxy contract is an intermediary that delegates calls to an "implementation" contract, allowing for upgradeability. While useful for some protocols, FLAT Protocol's core contracts are designed to be immutable. If a contract were a proxy, Etherscan would typically display a "Read as Proxy" or "Write as Proxy" tab and details about the implementation address. For the core FLAT contracts designed as immutable, you should not see these indicators. For instance, the FLAT token contract is explicitly stated as "Tier 1 — Fully Immutable: No owner, no admin, no pause, no proxy. Pure bytecode." Similarly, BearerSwap V4, a related component, is described as having "no proxy pattern" and "no upgrade mechanism".

No Owner Functions (for Immutable Contracts)

For contracts designated as "Fully Immutable" (Tier 1), such as the FLAT token and SAVE vault, you should not find functions in the "Write Contract" tab that allow a single owner or administrator to alter core logic or seize funds. While some contracts, like CPIOracle, have an owner that can submit data, and FlatSale has a guardian that can pause (time-limited), fully immutable contracts should lack such control. To check for owner functions, navigate to the "Contract" tab and then select "Write Contract". Review the available functions. If a contract claims to be immutable, you should not see functions like transferOwnership, pause, or upgradeTo.

4. How to Read the Contract State

The "Read Contract" tab allows you to query public variables and view functions of a smart contract without executing a transaction.

  • totalSupply: For the FLAT token contract, locate the totalSupply function. Clicking this will display the total number of FLAT tokens in existence.
  • Balances: You can check the balance of any address for a specific token. For the FLAT token, find a function like balanceOf and input an Ethereum address to see its FLAT token holdings.
  • **Oracle Pric

Top comments (0)