bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 4쪽 중 3쪽
nd-block-proposer-selection-method" id="or-reward-distribution-and-block-proposer-selection-method"></a>
**1. $M Validators & Delegators**
* **Base Rewards:** Receive 75% of the total block rewards.
* **$M Validators:** Stake a fixed amount of $M (7 millions $M) as register amount.
* **Reward Distribution:** Rewards are distributed based on the ratio of $M held by $M Delegators and $M Validators.
* **Commission:** $M Delegators pay a 10% commission of their rewards to the Validators.
**2. Meme Delegators**
* **Base Rewards:** Receive 24% of the total block rewards.
* **Equal Distribution:** Rewards allocated to each node are distributed equally.
* **Node Calculation:** Rewards are calculated per node.
* **Market Cap Ratio:** The reward ratio of each meme coin is set close to its market cap ratio.
* **Example:** If Meme Coin A has a market cap twice as large as Meme Coin B, the delegating reward for Meme Coin A is twice that of Meme Coin B. Price changes are not considered, and price differences are resolved through weighted quantities of meme coins (e.g., if Meme Coin A is $0.1 and Meme Coin B is $1, then 10 of A equals 1 of B).
* Reward ratios can be adjusted to accommodate the addition of new meme coins.
* **Commission:** 15% of the rewards are returned as a fee to the validators.
**3. Additional Rewards**
Receive 1% of the total block rewards. Validator set(Validator, Delegator, Meme Delegator) receive additional rewards if the validator they support is selected as the block proposer. - Additional Reward Ratio: Reward Ratio calculation is same with base Reward distribution
**4. Others**
This number of this lists can be adjusted:
* Base Rewards between $M Validators\&Delegators and Meme Delegators
* Required staking $M for Validator
* Commission ratio for $M Delegator & Meme Delegator
* The whitelist of MEME used in the delegating.
* Reward Ratio of each Memes
* Number of Validator
### | Block Proposer Selection Algorithm <a href="#or-block-proposer-selection-algorithm" id="or-block-proposer-selection-algorithm"></a>
**1. Block Generation Cycle**
* In each block generation cycle, a block proposer is selected from the pool of $M Validators.
**2. Selection Method**
$M Validator Pool:
* Randomly select one from the $M Validator pool.
* Adjust the probability based on:
* Past performance.
* Age: participation time after proposer.
**3. Reward Structure and Incentives**
* The selected block proposer proposes a block and receives the corresponding rewards.
* Delegators supporting the selected block proposer receive additional rewards to encourage participation.
* Additional Rewards: Delegators receive an additional 1% of base rewards if the validator they support is selected as the block proposer.
# Running a node
This document contains step-by-step instructions for running a gmeme node in MemeCore Network.
#### Hardware Requirements <a href="#hardware-requirements" id="hardware-requirements"></a>
The following are the minimum hardware requirements:
* CPU with 2+ cores
* 4GB RAM
* 200GB free storage space
* 8 MBit/sec download Internet service
#### 1. Building Gmeme Binary <a href="#id-1.-building-gmeme-binary" id="id-1.-building-gmeme-binary"></a>
**Build the source**
Get memecore-gmeme source.Running a node
```
https://github.com/memecore-foundation/Go-MemeCore
```
Building `gmeme` requires both a Go (version 1.19 or later) and a C compiler. Feel free to install them with the package manager of your choice.
Once the dependencies are installed, run
```
make gmeme
```
or, build the full suite of utilities:
```
make all
```
#### 2. Starting a MEME Node: <a href="#id-2.-starting-a-meme-node" id="id-2.-starting-a-meme-node"></a>
**Mainnet:**
```
./build/bin/gmeme --datadir ./nodes/node1
```
**Insectarium Testnet:**
```
./build/bin/gmeme --insectarium --datadir ./nodes/node1
```
**Common Additional Parameters:**
* `--http` - Enable the HTTP-RPC server
* `--http.api` - APIs offered over the HTTP-RPC interface (e.g., eth,net,web3)
* `--http.addr` - HTTP-RPC server listening interface (default: "localhost")
* `--http.port` - HTTP-RPC server listening port (default: 8545)
* `--ws` - Enable the WS-RPC server
* `--ws.port` - WS-RPC server listening port (default: 8546)
#### 3. Initializing Node Account <a href="#id-3.-initializing-node-account" id="id-3.-initializing-node-account"></a>
You can create a new account or import an existing account for your node operation, if you need. **RPC nodes don't need node account.**
**Create a new account**
Create your node account with the following command. A password is required to be entered during the process. The resulting account is placed in the specified `--datadir` under the `keystore` path.
```
./gmeme --datadir ./nodes/node1 account new
```
**Import your existing account**
Import your existing account with the private key and remember to replace the `./your/privateKey.txt` parameter.
```
./gmeme account import --datadir ./nodes/node1 ./your/privateKey.txt
```
#### 4. Running RPC Node <a href="#id-4.-running-rpc-node" id="id-4.-running-rpc-node"></a>
A RPC node is a network member that does not participate in the consensus process. This node can be used to interact with the MemeCore Network, including: creating accounts, transferring funds, deploying and interacting with contracts, and querying node APIs.
You may need to change the `P2P/HTTP/RPC/WS` ports to avoid conflicts. Please note that the port configuration for the JSON-RPC interface should be set to httpport, not rpcport. You can refer to <https://geth.ethereum.org/docs/fundamentals/command-line-options> for more details about start options.
***Note: gmeme is backwards compatible with geth. For any information not covered in gmeme documentation, you can refer to geth documentation.***
This script expects node DB directory to be `./node/node1`.
**Mainnet:**
```
./build/bin/gmeme \
--syncmode=full \
--gcmode archive \
--datadir ./nodes/node1 \
--port 30303 \
--http.api eth,net,web3 \
--http \
--http.port 8545 \
--http.addr 0.0.0.0 \
--http.vhosts "*" \
--ws \
--ws.port 8546 \
--ws.addr 0.0.0.0 \
--ws.api eth,net,web3
```
**Insectarium Testnet:**
```
./build/bin/gmeme \
--insectarium \
--syncmode=full \
--gcmode archive \
--datadir ./nodes/node1 \
--port 30303 \
--http.api eth,net,web3 \
--http \
--http.port 8545 \
--http.addr 0.0.0.0 \
--http.vhosts "*" \
--ws \
--ws.port 8546 \
--ws.addr 0.0.0.0 \
--ws.api eth,net,web3
```
***Note: To run on the Insectarium Testnet, simply add the --insectarium flag when executing gmeme. For mainnet, run it without this flag.***
#### 5. Running Validator Node <a href="#id-5.-running-validator-node" id="id-5.-running-validator-node"></a>
A validator node participates in the PoSA consensus. If you want to register as a candidate for PoSA validators, you need to run a miner node.
You may need to change the `P2P/HTTP/RPC/WS` ports to avoid conflicts. Please note that the port configuration for the JSON-RPC interface should be set to httpport, not rpcport. You can refer to <https://geth.ethereum.org/docs/fundamentals/command-line-options> for more details about start options.
This script expects node DB directory to be `./node/node1`.
**Mainnet:**
Copy
```
./build/bin/gmeme \
--syncmode=full \
--gcmode archive \
--datadir ./nodes/node1 \
--port 30303 \
--http.api eth,net,web3 \
--http \
--http.port 8545 \
--http.addr 127.0.0.1 \
--http.vhosts "*" \
--ws \
--ws.port 8546 \
--ws.addr 127.0.0.1 \
--ws.api eth,net,web3 \
--mine \
--miner.etherbase=<Your Validator Account Address> \
--unlock <Your Validator Account Address> \
--password <Your Validator Account Password File>
```
**Insectarium Testnet:**
Copy
```
./build/bin/gmeme \
--insectarium \
--syncmode=full \
--gcmode archive \
--datadir ./nodes/node1 \
--port 30303 \
--http.api eth,net,web3 \
--http \
--http.port 8545 \
--http.addr 127.0.0.1 \
--http.vhosts "*" \
--ws \
--ws.port 8546 \
--ws.addr 127.0.0.1 \
--ws.api eth,net,web3 \
--mine \
--miner.etherbase=<Your Validator Account Address> \
--unlock <Your Validator Account Address> \
--password <Your Validator Account Password File>
```
After launch geth client, you need to register your validator account to our system contract (`0x1234000000000000000000000000000000000002`) with 7,000,000 M. (**Validator registering is locked yet**.)
*<mark style="color:red;">**NOTE: The description of the password file is only an example, and you should use other technical methods to manage it securely.**</mark>*
# Setting Up a Wallet
The MemeCore network can be added to any EVM-compatible wallet service. The following list are some of the wallet available in the market:
1. [OKX Wallet](https://www.okx.com/web3)
2. [Uniswap Wallet](https://wallet.uniswap.org/)
3. [Metamask](https://metamask.io/)
4. [Coin98](https://coin98.com/)
5. [SafePal](https://www.safepal.com/en/)
6. [Token Pocket](https://www.tokenpocket.pro/)
For network details refer to the following section
# Bridging Stablecoins to MemeCore
MemeCore now supports stablecoins bridging via [Meson Finance](https://meson.fi).\
This enables seamless cross-chain transfer of stable assets into the MemeCore ecosystem.
***
## Supported Bridge
* **Meson Finance**
* A fast and efficient cross-chain bridge using HTLC-based atomic swaps
* Audited and integrated with multiple major chains
***
## Supported Assets (Inbound)
You can bridge the following **stablecoins** to MemeCore via Meson:
* **USDC**
* **USDT**
These assets are supported on **all chains** where Meson is live.
***
## Bridged Asset Format on MemeCore
Regardless of which stablecoin you bridge into MemeCore (`USDT` or`USDC`),\
it will be received as:
> **`USDC.e`** on MemeCore
This unified format simplifies liquidity management and dApp integration across the ecosystem.
***
## ⚠️ Important Notes
* `USDC.e` follows Circle's contract standard for bridged USDC tokens. Its value is backed by bridges' locking mechanisms on the source chain.
* Ensure you're using the **official Meson interface** to avoid phishing or loss of funds.
* MemeCore does not control Meson contracts or bridging operations. Please use at your own discretion.
***
## 📘 Getting Started
1. Visit <https://meson.fi>
2. Connect your wallet and select the source chain and asset (`USDT` or`USDC`)
3. Set the destination chain as **MemeCore**
4. Confirm the swap and wait for the asset to arrive as `USDC.e`
# Quickstart
# Basic Environment Setup
* Browser: Latest browsers such as Chrome is recommended.
* Wallet App: 
* An EVM-compatible wallet like MetaMask is required.
* [Download MetaMask](https://metamask.io/download)
* After creating an account, make sure to back up your seed phrase.
* Development Tools: Install and use Foundry.
* Recommended IDE:
* Install[ Visual Studio Code (VS Code)](https://code.visualstudio.com/download).
* Add the [Solidity extension](https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity) and configure it for seamless Foundry usage, enabling auto-completion, compilation, debugging, and linting.
* [Foundry - Integrating with VSCode](https://getfoundry.sh/config/vscode/#integrating-with-vscode)
# Add the MemeCore network to your wallet
> The following examples are based on MemeCore’s **testnet**, the Insectarium network.
>
> If you wish to connect to the MemeCore mainnet, please refer to the [mainnet network information](/memecore/connect-to-memecore).
## **Add MemeCore Testnet(Insectarium) to MetaMask**
Follow this quick guide to add **Insectarium** Testnet to your MetaMask wallet.
1. Open MetaMask and click "Networks" menu.
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FQfWlPW9VfuCDLLAbhtD8%2Fwallet01.png?alt=media&token=c915cf37-c8fe-4fcb-8559-6168bee2df09" alt="" width="311"><figcaption></figcaption></figure>
2. Click on the "Add a Custom Network" button.
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FKRyeCnrtth1W0Ig36XRn%2Fwallet02.png?alt=media&token=11986759-f075-4c88-8e16-5bc12e8bd1ad" alt="" width="311"><figcaption></figcaption></figure>
3. Add the Network name, add a RPC URL by clicking the "Add RPC URL" button.
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FEm8LKUrPpQJpcUbVHPmr%2Fwallet03.png?alt=media&token=742e52c6-0ea0-4867-ae24-e8b38cee5c56" alt="" width="311"><figcaption></figcaption></figure>
4. Enter the RPC details.
```
https://rpc.insectarium.memecore.net
```
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FEj8Ssi1hXi3RD48mLef8%2Fwallet04.png?alt=media&token=5f2e6e65-3224-432c-b188-5b7f22cf7fef" alt="" width="311"><figcaption></figcaption></figure>
5. Enter the Chain ID, Currency Symbol, add the Block Explorer URL by clicking the "Add a block explorer URL" button.
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2Fx2HpphGxuHPvFuDoXPYb%2Fwallet05.png?alt=media&token=e65b1e49-76e2-493b-8eb7-9eecd0c1185f" alt="" width="311"><figcaption></figcaption></figure>
6. Enter the Block Explorer URL
```
https://insectarium.blockscout.memecore.com
```
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FYRdgvWNvWYtFKsXlU26Y%2Fwallet06.png?alt=media&token=68a8b0c5-f148-4e2f-82c8-ea359cf6787c" alt="" width="311"><figcaption></figcaption></figure>
7. Finally you can click on the "Save" button.
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FF8zIE4DMIt4WHNXWFhds%2Fwallet07.png?alt=media&token=4a729268-f444-435c-a24e-b0a4b06ba4d0" alt="" width="311"><figcaption></figcaption></figure>
8. You should see a success message.
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FuOUoW1FrEOMkDUtw454R%2Fwallet08.png?alt=media&token=52f96092-d737-4d47-9397-f33d2fffe64e" alt="" width="311"><figcaption></figcaption></figure>
9. You can now see and use the Memecore Testnet(Insectarium) network in your MetaMask wallet.
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FovJGo7znJ6nFsTMCuPId%2Fwallet09.png?alt=media&token=179b2888-2a50-4881-8a27-4d8af112273a" alt="" width="311"><figcaption></figcaption></figure>
10. You should be able to see your Memecore Testnet(Insectarium) assets.
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2Fq66B1eOGRp9SkfP0Bd7D%2Fwallet10.png?alt=media&token=8d75d7de-9015-4bcf-b052-4f39e5a5ae12" alt="" width="311"><figcaption></figcaption></figure>
# Receive Test Tokens from Faucet
After adding our network to your wallet, it’s time to receive test tokens for sending tokens and [deploying smart contracts](/developer-guide/deploying-smart-contracts).
First, visit the [Memecore testnet(Insectarium) faucet](https://faucet.memecore.com/insectarium).
Enter your EOA address (your personal wallet address) in the input field and complete the reCAPTCHA.
Click the “Receive Insectarium $M” button to receive 450M tokens.
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FJiOnfgWZAaNcZLvM9flm%2Fimage.png?alt=media&token=6a3c7e9d-41d4-4fad-b27c-b6980e13c2a1" alt=""><figcaption></figcaption></figure>
If the token transfer is successful, the explorer transaction details URL generated from the corresponding tx hash will be displayed.
Clicking this link will take you to the transaction details page.
<figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FQHQQEVCuNJVh1w76l2I7%2Fimage.png?alt=media&token=28f22434-df8c-4728-aa90-a73dd1ecfca1" alt=""><figcaption></figcaption></figure>
Now you can view the tokens received in your wallet, send them to others, and check your token transfer history by searching your wallet address on the [Insectarium Explorer](https://insectarium.blockscout.memecore.com/).
<div><figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2F7jtiZOHxhbzZ3dc7CgOQ%2Fimage.png?alt=media&token=5cebae58-957a-4a35-8697-bcf8cdfe2aaa" alt="" width="311"><figcaption></figcaption></figure> <figure><img src="https://3533620658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZTiINrWVLnWlkEgfpXQj%2Fuploads%2FTjPX02ZLxxgeJMQmRhEd%2Fimage.png?alt=media&token=14b086fe-ee81-4b04-9b8b-9f2be865e20c" alt="" width="563"><figcaption></figcaption></figure></div>
# Deploying Smart Contracts
### 1. Create Foundry Project & Write Contracts
Install Foundry:
```
curl -L <https://foundry.paradigm.xyz> | bash
foundryup
```
Initialize a new project:
```
forge init memecore-contract-demo
cd memecore-contract-demo
```
Open the folder in your preferred IDE (e.g. VS Code), and create `src/Counter.sol`:
```solidity
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
contract Counter {
uint256 public number;
function setNumber(uint256 newNumber) public {
number = newNumber;
}
function increment() public {
number++;
}
}
```
Compile:
```
forge build
```
Test code example `test/Counter.t.sol`: 
```solidity
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "forge-std/Test.sol";
import "../src/Counter.sol";
contract CounterTest is Test {
Counter public counter;
function setUp() public {
counter = new Counter();
counter.setNumber(0);
}
function testIncrement() public {
counter.increment();
assertEq(counter.number(), 1);
}
function testSetNumber(uint256 x) public {
counter.setNumber(x);
assertEq(counter.number(), x);
}
}
```
Run tests:
```powershell
forge test
```
### 2. **Deploying Contracts and Checking Results**
> The following examples are based on MemeCore’s **testnet**, the Insectarium network.
#### Requirements
* Your EOA (e.g. MetaMask) wallet must have M tokens and your private key is needed (for signing transactions and paying fees).
* If you are connecting to a testnet, you can obtain tokens from the [testnet faucet](/developer-guide/quickstart/receive-test-tokens-from-faucet); *If you are connecting to the mainnet, you will need to prepare the necessary funds separately.*
* Keep your private key secure and never expose it.
#### Deploying Contracts
Deployment command:
```
forge create --rpc-url <YOUR_RPC_URL>
--private-key <YOUR_PRIVATE_KEY>
src/Example.sol:Example
```
For example:
```
forge create --rpc-url https://rpc.insectarium.memecore.net
--private-key 0x5e2b...b9b6b6
src/Counter.sol:Counter
```
{% hint style="info" %}
If you are connecting to the mainnet, please refer to the Mainnet RPC URL in the [Memecore Network Information](/memecore/connect-to-memecore).
{% endhint %}
If a constructor takes arguments:
```
forge create --rpc-url <YOUR_RPC_URL>
--constructor-args "Arg1" "Arg2"
--private-key <YOUR_PRIVATE_KEY>
src/Example.sol:Example
```
#### **Checking Results**
* After running the deployment command, the contract address and transaction hash will be displayed in the console upon success.
* You can search for the contract address on the Block Explorer (e.g. [Insectarium Explorer](https://insectarium.blockscout.memecore.프로젝트로 돌아가기