Ramyeon Protocol v1 — Giwa Sepolia

Documentation

Ramyeon is a V4 DEX on Giwa. Concentrated liquidity means you earn fees in a price range you set. Flash accounting means one settlement per trade, not dozens of intermediate transfers. Hook-based pause means withdrawals always work. No sign-ups. No custody. Just your wallet and the Kitchen.

1. What is Ramyeon?

Ramyeon is a fully on-chain decentralised exchange (DEX) running on Giwa, an OP Stack Layer 2. Anyone with a wallet can swap tokens, provide liquidity, place limit orders, and earn rewards — no accounts, no KYC, no middlemen. Every action is a real blockchain transaction executed by smart contracts.

Three things that define Ramyeon:

⚡
V4 concentrated liquidity

Pick a price range for your liquidity instead of spreading it thin across all prices. 10–100× more capital efficient than flat-curve AMMs. Native ETH swaps in a single transaction.

💰
Dual income for LPs

Liquidity providers earn 0.01%–1.00% swap fees proportional to their pool share, plus continuous $RAMYEON token rewards from the MasterChef staking contract.

🔗
Pro-grade tools

Commit-reveal limit orders (no frontrunning), real-time portfolio tracking, contract-level error messages, and a liquidity manager built for precision.

Network
Giwa Sepolia (Testnet)
Chain ID 91342
Gas Token
ETH
Gas & base trading pair
Protocol Token
$RAMYEON
LP rewards, no pre-mine

2. How It Works

Ramyeon runs on Uniswap V4's concentrated-liquidity architecture. Instead of V2's x·y=k curve where liquidity sits idle at extreme prices, V4 LPs deposit into a specific tick range where trades actually happen. All pools live inside one Kitchen singleton (the PoolManager) — no per-pair contracts, no fragmented state.

Core Contracts

RamyeonKitchen (V4 PoolManager)

The singleton that holds all pools, executes swaps, and manages concentrated liquidity positions. One contract to rule them all — Uniswap V4 architecture.

addBroth · getState · allPots · potCount · lpTotalSupply · lpBalance · collectSeasoning
RamyeonHook

Per-pool pause controller. Admin can pause any pool independently while keeping withdrawals open — your funds are never trapped.

setPaused · paused
RamyeonRouter

Convenience layer for swaps, liquidity, and pool initialization. Handles token approvals, ETH wrapping, and slippage protection in one call.

exactInputSingle · exactInputSingleETH · initPool · addLiquidity · removeLiquidity · collectFees
RamyeonMasterChef

LP staking rewards. Stake your Kitchen LP tokens to earn $RAMYEON. Per-pool reward rates, harvest anytime — compound or cash out.

stake · unstake · harvest · harvestAll · pendingRmn · pausePot
RamyeonOrderBook

Commit-reveal limit order system. Your order hash is committed first, then revealed — preventing frontrunning on every placement.

commit · place · fill · cancel · batchCancel · getOpenOrders

What happens during a swap?

Under the hood (V4 flash accounting)
Router calls Kitchen.enter() with encoded swap instructions
Kitchen locks, tracks net token deltas in transient storage (EIP-1153)
Hook runs beforeSwap callback — checks per-pool pause state
Concentrated liquidity math: computes exact output from active tick using sqrtPrice
Hook runs afterSwap, Kitchen exits — transfers only net deltas to/from user in one settlement
No per-pair contracts. One Kitchen singleton. Flash accounting means no intermediate ERC-20 transfers — just one final net settlement per trade.

3. Fees & Rewards

Fee Structure
TierFeeBest for
Stable0.01%Stablecoin pairs (USDC/USDT)
Standard0.30%Most token pairs
Exotic1.00%Volatile or low-liquidity tokens

100% of swap fees go to liquidity providers. No protocol cut. No hidden spread. Your share is proportional to your LP position size.

$RAMYEON Rewards
  • →Earned continuously per second — no claiming deadline, no expiration
  • →Claim anytime — zero lock-up, zero vesting. You own your rewards the moment they accrue
  • →Emission rate per pool set by protocol governance
  • →No pre-mine, no VC allocation, no team reserve — 100% community-distributed

Total return = swap fees (driven by trading volume) + $RAMYEON rewards (per-second emission × pool share).

4. Swapping Tokens

TradeSwap tokens instantly against on-chain concentrated-liquidity pools

How to Swap

  1. Navigate to Trade. Swap tab is selected by default.
  2. Pick the token you're spending: ETH, USDC, USDT, WETH, RAMYEON, or paste any ERC-20 address to import.
  3. Enter amount or hit Max to use your full balance.
  4. Choose the output token. The quote is computed live from the pool state — no mock data, no estimates.
  5. Review the breakdown: expected output, exchange rate, price impact, minimum guaranteed output, and the fee tier.
  6. Adjust slippage tolerance in Settings (default 0.5%) if needed.
  7. Click Swap. First trade per token requires a one-time Router approval.
  8. Confirm in your wallet. You'll get a notification with a GiwaScan link to verify the tx on-chain.

Swapping ETH Directly

Select ETH as input and the Router wraps it to WETH, executes the trade through the V4 pool, and unwraps back to ETH — all atomically in one transaction. No manual wrapping.

5. Limit Orders

TradeSet a target price — your tokens are escrowed on-chain and filled atomically when the market hits your price

Placing a Limit Order

  1. Go to Trade, switch to the Limit tab.
  2. Choose Buy or Sell direction.
  3. Select the token pair and enter trade size.
  4. Set your target price. The UI shows the current market price and how far your limit is (as a percentage).
  5. Pick an expiry — 1 hour, 1 day, 7 days, or custom date.
  6. Click Place Order. Tokens are deposited into the LimitOrderBook contract. First-time users need one approval.

How Orders Get Filled

Limit orders use on-chain escrow: your tokens sit in the OrderBook contract until filled or cancelled.

All open orders appear in the right panel with live status. Cancel anytime via OrderBook.cancel — no penalty, no cooldown.

Filling & Cancelling Orders

Limit orders use a commit-reveal scheme to prevent frontrunning:

  1. Commit — a filler calls OrderBook.commit(hash) where hash = keccak256(filler, orderId, salt). This binds the filler's intent to a specific order before any MEV opportunity can be observed in the same block.
  2. Wait 1 minute — the commit must mature (COMMIT_MATURITY = 60s). Same-block sandwiching is impossible.
  3. Reveal + Fill — the filler calls OrderBook.fill(orderId, amountOut, salt). The contract verifies the salt matches the committed hash, then executes the swap. The commit is burned (one-shot, no replay).
  4. Cancel — the order trader can cancel any open order via OrderBook.cancel(orderId) from the Trade page. Refunded tokens return immediately.

No commit → NotCommitted revert. Too soon → CommitTooSoon. Stale commit (>1h) → CommitStale. The UI handles commit + fill in one flow via executeCommitFill — click once, wait a minute, click again.

6. Liquidity Pools

PoolsDeposit tokens into V4 concentrated-liquidity pools and earn fees + $RAMYEON

Finding Pools

  1. Go to Pools in the nav bar.
  2. Browse all active pools with live on-chain data: TVL, 24h volume, 24h fees, and APR.
  3. Click a pool for detailed info: reserves, emissions, and your position if you've deposited.
  4. Click Manage to open the liquidity manager for that pool.

Adding Liquidity

  1. Open the pool page (e.g. /pools/usdc-ramyeon-030).
  2. Make sure the Add tab is selected.
  3. Enter an amount for either token. The other side auto-calculates to match the pool's ratio.
  4. Review your estimated pool share, LP tokens received, and current exchange rate.
  5. Click Add Liquidity → approve tokens → confirm the transaction.

Removing Liquidity

  1. Open the pool where you have a position.
  2. Select the Remove tab.
  3. Use the slider or presets (25%, 50%, 75%, 100%) to choose how much to withdraw.
  4. Review the token amounts you'll receive.
  5. Click Remove Liquidity and confirm.

Claiming $RAMYEON Rewards

  1. Open a pool where you hold LP.
  2. Select the Claim tab.
  3. See your accumulated $RAMYEON rewards.
  4. Click Claim Rewards — tokens arrive in your wallet in one transaction.

Collecting Trading Fees

Trading fees accrue to your LP position automatically (Uniswap V4 fee growth). To collect them:

  1. Open the pool detail page and find the Liquidity Manager widget.
  2. Click the Fees tab (next to Add / Remove / Claim).
  3. The UI reads Kitchen.feesOwed(poolId, you, lo, hi, salt) live and shows accrued fee0 + fee1.
  4. Click Collect Fees — the Router calls collectFees(ta, tb, fee, lo, hi, to, req0, req1), which invokes Kitchen.collectSeasoning() internally.
  5. Fees transfer directly to your wallet — no lock, no waiting (surplus lives in the Kitchen from prior swaps).

If the UI shows "No fees accrued yet", your full-range position hasn't captured trading activity yet. Fees accrue per-position (keyed by keccak(chef, lo, hi, salt)); the default salt is bytes32(0).

Creating a pool

Create a new concentrated-liquidity pool for any token pair on Giwa Sepolia. Navigate to /pools/new or click the + Create Pool button on the Pools page.

  1. Select tokens — pick Token A and Token B from the token picker modal
  2. Set fee tier — choose 0.01% (stable/pegged pairs), 0.30% (standard), or 1.00% (volatile/exotic). Fee tier determines tick spacing and capital efficiency.
  3. Set initial price — enter the starting exchange rate. This sets the sqrtPriceX96 value that the pool initializes at.
  4. Confirm and deploy — sign the transaction. The Router calls Kitchen.enter(data) to initialize the pool in the V4 singleton.

Pool creation in V4 doesn't deploy a new contract — it registers the pool inside the Kitchen singleton. This means cheaper creation, shared infrastructure, and built-in hook support for every pool. The Router.initPool(ta, tb, fee, sqrtPriceX96) transaction handles everything in one call.

Official pools

Six official pairs tracked by Ramyeon. These pools live inside the Kitchen V4 singleton and are discoverable via potCount() and allPots(i).

PairFeeType
WETH / USDC0.30%Standard
WETH / USDT0.30%Standard
WETH / RAMYEON0.30%Standard
USDC / USDT0.30%Stable
USDC / RAMYEON0.30%Standard
USDT / RAMYEON0.30%Standard

V4 has no per-pair contracts — all 6 pools live inside the Kitchen singleton at 0x8F3B…5A42. Enumerate them with potCount() + allPots(i), then getState(poolId) for live sqrtPrice/tick/liquidity. A PoolId is keccak256(abi.encode(currency0, currency1, fee, tickSpacing, hooks)) — derive it from the PoolKey, don't guess it.

7. Portfolio

PortfolioYour entire DeFi position in one view: LP holdings, token balances, and transaction history
Overview
  • ·All LP positions with current value, pool share percentage, and accrued rewards
  • ·Token balances with live USD values from CoinGecko
  • ·Breakdown split across wallet, pools, and earned rewards
Tokens
  • ·Every token in your wallet with real-time balances
  • ·USD values via live CoinGecko price feeds
  • ·One-click trade links for each token
Transactions
  • ·Full transaction history pulled from the Giwa chain
  • ·Filter by type: swaps, sends, or receives
  • ·Status, USD value, and timestamp for every tx

8. Send & Receive

Sending Tokens
  1. Go to Portfolio → click Send.
  2. Pick token: ETH, USDC, USDT, WETH, or RAMYEON.
  3. Enter amount or click Max for full balance.
  4. Paste the recipient's Giwa address (0x... 42 chars).
  5. Click Send → confirm in wallet.
Receiving Tokens
  1. Go to Portfolio → click Receive.
  2. Your Giwa address and QR code appear.
  3. Copy the address or share the QR.
  4. Only accept transfers on Giwa network. Tokens sent from other networks will be permanently lost.

9. Bridge

BridgeMove assets between Ethereum Sepolia and Giwa via the native OP Stack bridge

Overview

Ramyeon runs on Giwa, an OP Stack L2 on Ethereum Sepolia. The native bridge handles deposits (Sepolia → Giwa) and withdrawals (Giwa → Sepolia) through the standard optimistic rollup mechanism.

Depositing (Sepolia → Giwa)

Send tokens or ETH to the bridge contract on Sepolia. Giwa automatically credits your wallet once the deposit is included in an L2 block.

How long does it take?: Usually 1–3 minutes, depending on Sepolia block times.

  1. Go to Bridge.
  2. Make sure Deposit is selected.
  3. Choose token: ETH, USDC, USDT, WETH, or RAMYEON.
  4. Enter amount → click Initiate Deposit.
  5. Confirm on Ethereum Sepolia in your wallet.
  6. Wait 1–3 minutes. Your Giwa balance updates automatically.

Withdrawing (Giwa → Sepolia)

Withdrawing from Giwa to Sepolia is a two-phase process: initiate on Giwa, then finalize on Sepolia after the 7-day challenge period.

Phase 1 — Initiate on Giwa

  1. Go to Bridge, select Withdraw.
  2. Pick token and amount.
  3. Click Initiate Withdrawal → confirm on Giwa.

Phase 2 — Finalize on Sepolia

After 7 days, submit a proof transaction on Sepolia. You'll need Sepolia ETH for gas.

  1. Return to Bridge after 7 days.
  2. Find your pending withdrawal in history.
  3. Click Finalize → confirm on Sepolia.

The 7-day challenge period is OP Stack's fraud proof window. Your funds are locked during this time. No action needed — come back after 7 days to finalize.

Which tokens can I bridge?

All tokens with active pools on Ramyeon. The Bridge page shows balances on both networks.

How the Bridge Works

Standard OP Stack bridge architecture. Both deposit and withdrawal transactions can be tracked on GiwaScan (L2) and Etherscan (Sepolia L1).

Faucet

FaucetClaim testnet tokens

Testnet token claims

Connect your wallet to the Faucet to claim free testnet tokens for developing and testing on Giwa Sepolia.

  1. Connect your wallet and ensure you are on Giwa Sepolia (Chain ID 91342)
  2. Select a token: RAMYEON, USDC, or USDT
  3. Click Claim and sign the transaction
  4. Receive 1,000 tokens immediately (1,000 RAMYEON + 1,000 USDC + 1,000 USDT in one claimAll call). Each token can be claimed once every 24 hours

Faucet contract

The Cashier contract (0x29A778A7F618C98C0bF6572d9B1edBd08BaC1876) holds testnet tokens managed by the protocol. Each token can be claimed once every 24 hours (1-day cooldown); a single claimAll call dispenses 1,000 RAMYEON + 1,000 USDC + 1,000 USDT in one transaction.

10. Contract Reference

All Ramyeon smart contracts on Giwa Sepolia (Chain ID 91342). Every address is verified on Blockscout. Click any address to view the source code and ABI.

ContractAddressRoleStatus
$RAMYEON Token0x0C59a781C32179De7b328C763F6E3a65145A5D2EToken (capped 1B)Verified ✓
RamyeonKitchen0x8F3BFAB286d49FEf38B1D577327614A178255A42Core CL AMMVerified ✓
RamyeonHook0x90335bE7529A6A4e350a5e10Bc60eA6026D9A517Pause controllerVerified ✓
RamyeonRouter0x74964cE7673aF5e36650a78925eF89AEE10989bFSwap + LP routerVerified ✓
RamyeonOrderBook0x1afB2fc6B6536A653AAC6E7225142bC717F16c9DLimit ordersVerified ✓
RamyeonMasterChef0x43d9B3BcE1f23AB41B276aDecD1794c4EDAC98B0LP staking rewardsVerified ✓
RamyeonCashier0x29A778A7F618C98C0bF6572d9B1edBd08BaC1876Testnet faucetVerified ✓
WETH90x92395687E8C1B191fa1eB58F669a187970aeF349Wrapped ETHVerified ✓
MockUSDC0xEceCc7Bce8d0fEbAdD497cB9D8Ea939333972432Test stablecoinVerified ✓
MockUSDT0xD5f6B052243A05a529AD126f59bd17ED99b7837aTest stablecoinVerified ✓

Router API Reference

initPoolCreate and initialize a new concentrated-liquidity pool in the Kitchen singleton
(tokenA, tokenB, fee, sqrtPriceX96) → tick
exactInputSingleERC-20 to ERC-20 token swap with slippage protection
(tokenIn, tokenOut, fee, recipient, amountIn, amountOutMin, deadline) → amountOut
exactInputSingleETHNative ETH to ERC-20 token swap (single transaction, no pre-wrapping)
(tokenOut, fee, recipient, amountOutMin, deadline) → amountOut
addLiquidityAdd concentrated liquidity at a tick range
(tokenA, tokenB, fee, tickLower, tickUpper, amountADesired, amountBDesired, amountAMin, amountBMin, to, deadline) → (amountA, amountB)
removeLiquidityRemove liquidity and withdraw underlying assets
(tokenA, tokenB, fee, tickLower, tickUpper, liquidity, amountAMin, amountBMin, to, deadline)
collectFeesCollect earned trading fees for a position
(tokenA, tokenB, fee, tickLower, tickUpper, recipient, amount0Requested, amount1Requested)

11. Developer Integration

Integrate with Ramyeon from your own smart contracts or frontend. The Router contract is the recommended entry point — it handles approvals, ETH wrapping, slippage protection, and pool initialization in one call.

Swap from a smart contract

Solidity
// Approve Router to spend your tokens
IERC20(usdc).approve(router, amountIn);

// Swap USDC → RAMYEON via V4 Kitchen (through Router)
IRamyeonRouter(router).exactInputSingle(
  usdc,        // token in
  ramyeon,     // token out
  fee,         // fee tier (30 = 0.30%)
  recipient,   // who gets the tokens
  amountIn,    // exact input amount
  amountOutMin,// min output (slippage protection)
  deadline     // unix timestamp
);

The Router handles the Kitchen.lock() / flash accounting under the hood. You just call exactInputSingle and wait for the receipt.

URL Deep Linking

Pre-configure a swap by passing token addresses in the URL:

/trade?inputCurrency=ETH&outputCurrency=0x0C59a781C32179De7b328C763F6E3a65145A5D2E
Parameters accept token symbols, contract addresses, or token names. Case-insensitive. Set exactField to input or output to pin which side has the exact amount.

Pass exactField=input or exactField=output to fix which side has the exact amount. The other side auto-calculates.

12. Troubleshooting

Wallet asks to switch networks

Your wallet is on a different network. Switch to Giwa Sepolia (Chain ID 91342). Add the network in wallet settings first if needed.

No pools showing up

Pools are read directly from the Kitchen V4 singleton via potCount() and allPots(). If you see zero pools, the Kitchen contract may not have any initialized pools yet — create one at /pools/new.

Error: ERC20 approval needed

The Router needs permission to spend your tokens. Re-initiate the swap — the approval prompt appears automatically.

Swap shows zero tokens to receive

The pool doesn't have enough liquidity for a trade this size. Try a smaller amount or split into multiple trades.

Wallet confirmation doesn't appear

Your wallet extension might have a stuck pending request. Check your browser's extension bar. If stuck, close and reopen the extension.

My balance shows zero

Confirm you're on Giwa Sepolia and your wallet is unlocked. If correct, check RPC at https://sepolia-rpc.giwa.io is reachable.

🥬 Kimchi Upgrade (V4 Concentrated Liquidity)

Ramyeon is fully V4 with Kimchi — concentrated liquidity, hook-based pool management, flash accounting via transient storage (Cancun EVM), and the Kitchen singleton architecture. All pools live in one contract; all trades share the same battle-tested math.

V4 Core Contracts (same as main deployment)

ContractAddressRoleStatus
RamyeonKitchen (PoolManager)0x8F3BFAB286d49FEf38B1D577327614A178255A42V4 singletonVerified ✓
RamyeonHook0x90335bE7529A6A4e350a5e10Bc60eA6026D9A517Per-pool pauseVerified ✓
RamyeonRouter0x74964cE7673aF5e36650a78925eF89AEE10989bFSwap + LP routerVerified ✓
RamyeonMasterChef0x43d9B3BcE1f23AB41B276aDecD1794c4EDAC98B0Staking rewardsVerified ✓
RamyeonOrderBook0x1afB2fc6B6536A653AAC6E7225142bC717F16c9DLimit ordersVerified ✓

V4 Architecture Highlights

  • Kitchen singleton — all pools share one contract. No per-pair deployment, no CREATE2, no isolated reserves.
  • Concentrated liquidity — provide liquidity in a specific price range. Capital efficiency 10–100× higher than V2 constant-product AMMs.
  • Hook-driven pause — the Hook contract can pause any pool individually via setPaused(PoolKey, bool). Withdrawals always work.
  • Flash accounting — swaps use transient storage (EIP-1153) for settlement. No token transfers mid-swap — only net deltas at the end.
  • No on-chain TWAP — spot sqrtPriceX96 is read via Kitchen.getState(poolId); consumers source manipulation-resistant prices from external feeds. (No fake oracle — honesty is the best policy.)
  • Per-pool reward rates — MasterChef supports independent reward rates per pool, staking/unstaking, and admin pause per pot. Live pendingRmn shown in the Portfolio UI.

On-Chain Pool Enumeration

// Read all pools from the Kitchen singleton
uint256 count = Kitchen.potCount();
for (uint256 i = 0; i < count; i++) {
    bytes32 poolId = Kitchen.allPots(i);
    (uint160 sqrtPrice, int24 tick, uint128 liquidity) = Kitchen.getState(poolId);
    bool isPaused = Hook.paused(poolId);
    // PoolKey is keccak256(abi.encode(currency0, currency1, fee, tickSpacing, hooks))

Exploit Mitigations (each backed by a testPoC* case)

  • Reserve drain: take() reverts outside the flash lock — no draining Kitchen balances without settling (NotUnlocked).
  • Donation inflation: Raw token transfers to the Kitchen grant zero LP shares — only addBroth() mints LP, so donations can't dilute existing LPs.
  • Reentrancy: Transient storage lock (Cancun tstore/tload) reverts recursive enter() calls — AlreadyLocked.
  • Swap slippage: amountOutMin enforced by Router — TooLittleReceived reverts if output is too low.
  • Limit-order sandwich: Filler must commit(hash) ≥ 1 min before fill — no prior commit → NotCommitted. Commits burn after use (no replay).
  • Access control: setHook is owner-only; ownership transfer is two-step (acceptOwnership required).
  • PoolKey ordering: stir() enforces currency0 < currency1 — no reversed-pair tricks.
  • Router input leak: _swapCb refunds unconsumed input when a swap hits the price limit on a thin pool — the flash lock always settles.

13. Security

⚠
Testnet Only — No Real Value

All contracts run on Giwa Sepolia testnet. There is no real money at risk. This is an early-stage protocol for testing, integration, and community feedback.

⚠
Not Audited Yet

These smart contracts haven't been audited by a third-party firm. Review the open-source code yourself before using. The protocol is provided "as is".

→
Tips for Staying Safe
  • Never share your private keys, seed phrase, or recovery words.
  • Verify all transaction details (amount, recipient, contract) in your wallet before signing.
  • Review and revoke unused token approvals periodically.
  • Follow official channels for updates and security notices.
← Back to Ramyeon

Ramyeon Protocol v1 · Giwa Sepolia · 2026