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:
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.
Liquidity providers earn 0.01%–1.00% swap fees proportional to their pool share, plus continuous $RAMYEON token rewards from the MasterChef staking contract.
Commit-reveal limit orders (no frontrunning), real-time portfolio tracking, contract-level error messages, and a liquidity manager built for precision.
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
The singleton that holds all pools, executes swaps, and manages concentrated liquidity positions. One contract to rule them all — Uniswap V4 architecture.
Per-pool pause controller. Admin can pause any pool independently while keeping withdrawals open — your funds are never trapped.
Convenience layer for swaps, liquidity, and pool initialization. Handles token approvals, ETH wrapping, and slippage protection in one call.
LP staking rewards. Stake your Kitchen LP tokens to earn $RAMYEON. Per-pool reward rates, harvest anytime — compound or cash out.
Commit-reveal limit order system. Your order hash is committed first, then revealed — preventing frontrunning on every placement.
What happens during a swap?
3. Fees & Rewards
| Tier | Fee | Best for |
|---|---|---|
| Stable | 0.01% | Stablecoin pairs (USDC/USDT) |
| Standard | 0.30% | Most token pairs |
| Exotic | 1.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.
- →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
How to Swap
- Navigate to Trade. Swap tab is selected by default.
- Pick the token you're spending: ETH, USDC, USDT, WETH, RAMYEON, or paste any ERC-20 address to import.
- Enter amount or hit Max to use your full balance.
- Choose the output token. The quote is computed live from the pool state — no mock data, no estimates.
- Review the breakdown: expected output, exchange rate, price impact, minimum guaranteed output, and the fee tier.
- Adjust slippage tolerance in Settings (default 0.5%) if needed.
- Click Swap. First trade per token requires a one-time Router approval.
- 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
Placing a Limit Order
- Go to Trade, switch to the Limit tab.
- Choose Buy or Sell direction.
- Select the token pair and enter trade size.
- Set your target price. The UI shows the current market price and how far your limit is (as a percentage).
- Pick an expiry — 1 hour, 1 day, 7 days, or custom date.
- 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:
- 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.
- Wait 1 minute — the commit must mature (COMMIT_MATURITY = 60s). Same-block sandwiching is impossible.
- 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).
- 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
Finding Pools
- Go to Pools in the nav bar.
- Browse all active pools with live on-chain data: TVL, 24h volume, 24h fees, and APR.
- Click a pool for detailed info: reserves, emissions, and your position if you've deposited.
- Click Manage to open the liquidity manager for that pool.
Adding Liquidity
- Open the pool page (e.g. /pools/usdc-ramyeon-030).
- Make sure the Add tab is selected.
- Enter an amount for either token. The other side auto-calculates to match the pool's ratio.
- Review your estimated pool share, LP tokens received, and current exchange rate.
- Click Add Liquidity → approve tokens → confirm the transaction.
Removing Liquidity
- Open the pool where you have a position.
- Select the Remove tab.
- Use the slider or presets (25%, 50%, 75%, 100%) to choose how much to withdraw.
- Review the token amounts you'll receive.
- Click Remove Liquidity and confirm.
Claiming $RAMYEON Rewards
- Open a pool where you hold LP.
- Select the Claim tab.
- See your accumulated $RAMYEON rewards.
- 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:
- Open the pool detail page and find the Liquidity Manager widget.
- Click the Fees tab (next to Add / Remove / Claim).
- The UI reads Kitchen.feesOwed(poolId, you, lo, hi, salt) live and shows accrued fee0 + fee1.
- Click Collect Fees — the Router calls collectFees(ta, tb, fee, lo, hi, to, req0, req1), which invokes Kitchen.collectSeasoning() internally.
- 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.
- Select tokens — pick Token A and Token B from the token picker modal
- 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.
- Set initial price — enter the starting exchange rate. This sets the sqrtPriceX96 value that the pool initializes at.
- 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.
Six official pairs tracked by Ramyeon. These pools live inside the Kitchen V4 singleton and are discoverable via potCount() and allPots(i).
| Pair | Fee | Type |
|---|---|---|
| WETH / USDC | 0.30% | Standard |
| WETH / USDT | 0.30% | Standard |
| WETH / RAMYEON | 0.30% | Standard |
| USDC / USDT | 0.30% | Stable |
| USDC / RAMYEON | 0.30% | Standard |
| USDT / RAMYEON | 0.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
- ·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
- ·Every token in your wallet with real-time balances
- ·USD values via live CoinGecko price feeds
- ·One-click trade links for each token
- ·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
- Go to Portfolio → click Send.
- Pick token: ETH, USDC, USDT, WETH, or RAMYEON.
- Enter amount or click Max for full balance.
- Paste the recipient's Giwa address (0x... 42 chars).
- Click Send → confirm in wallet.
- Go to Portfolio → click Receive.
- Your Giwa address and QR code appear.
- Copy the address or share the QR.
- Only accept transfers on Giwa network. Tokens sent from other networks will be permanently lost.
9. 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.
- Go to Bridge.
- Make sure Deposit is selected.
- Choose token: ETH, USDC, USDT, WETH, or RAMYEON.
- Enter amount → click Initiate Deposit.
- Confirm on Ethereum Sepolia in your wallet.
- 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
- Go to Bridge, select Withdraw.
- Pick token and amount.
- 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.
- Return to Bridge after 7 days.
- Find your pending withdrawal in history.
- 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
Testnet token claims
Connect your wallet to the Faucet to claim free testnet tokens for developing and testing on Giwa Sepolia.
- Connect your wallet and ensure you are on Giwa Sepolia (Chain ID 91342)
- Select a token: RAMYEON, USDC, or USDT
- Click Claim and sign the transaction
- 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.
| Contract | Address | Role | Status |
|---|---|---|---|
| $RAMYEON Token | 0x0C59a781C32179De7b328C763F6E3a65145A5D2E | Token (capped 1B) | Verified ✓ |
| RamyeonKitchen | 0x8F3BFAB286d49FEf38B1D577327614A178255A42 | Core CL AMM | Verified ✓ |
| RamyeonHook | 0x90335bE7529A6A4e350a5e10Bc60eA6026D9A517 | Pause controller | Verified ✓ |
| RamyeonRouter | 0x74964cE7673aF5e36650a78925eF89AEE10989bF | Swap + LP router | Verified ✓ |
| RamyeonOrderBook | 0x1afB2fc6B6536A653AAC6E7225142bC717F16c9D | Limit orders | Verified ✓ |
| RamyeonMasterChef | 0x43d9B3BcE1f23AB41B276aDecD1794c4EDAC98B0 | LP staking rewards | Verified ✓ |
| RamyeonCashier | 0x29A778A7F618C98C0bF6572d9B1edBd08BaC1876 | Testnet faucet | Verified ✓ |
| WETH9 | 0x92395687E8C1B191fa1eB58F669a187970aeF349 | Wrapped ETH | Verified ✓ |
| MockUSDC | 0xEceCc7Bce8d0fEbAdD497cB9D8Ea939333972432 | Test stablecoin | Verified ✓ |
| MockUSDT | 0xD5f6B052243A05a529AD126f59bd17ED99b7837a | Test stablecoin | Verified ✓ |
Router API Reference
initPoolCreate and initialize a new concentrated-liquidity pool in the Kitchen singletonexactInputSingleERC-20 to ERC-20 token swap with slippage protectionexactInputSingleETHNative ETH to ERC-20 token swap (single transaction, no pre-wrapping)addLiquidityAdd concentrated liquidity at a tick rangeremoveLiquidityRemove liquidity and withdraw underlying assetscollectFeesCollect earned trading fees for a position11. 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
// 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:
Pass exactField=input or exactField=output to fix which side has the exact amount. The other side auto-calculates.
12. Troubleshooting
Your wallet is on a different network. Switch to Giwa Sepolia (Chain ID 91342). Add the network in wallet settings first if needed.
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.
The Router needs permission to spend your tokens. Re-initiate the swap — the approval prompt appears automatically.
The pool doesn't have enough liquidity for a trade this size. Try a smaller amount or split into multiple trades.
Your wallet extension might have a stuck pending request. Check your browser's extension bar. If stuck, close and reopen the extension.
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)
| Contract | Address | Role | Status |
|---|---|---|---|
| RamyeonKitchen (PoolManager) | 0x8F3BFAB286d49FEf38B1D577327614A178255A42 | V4 singleton | Verified ✓ |
| RamyeonHook | 0x90335bE7529A6A4e350a5e10Bc60eA6026D9A517 | Per-pool pause | Verified ✓ |
| RamyeonRouter | 0x74964cE7673aF5e36650a78925eF89AEE10989bF | Swap + LP router | Verified ✓ |
| RamyeonMasterChef | 0x43d9B3BcE1f23AB41B276aDecD1794c4EDAC98B0 | Staking rewards | Verified ✓ |
| RamyeonOrderBook | 0x1afB2fc6B6536A653AAC6E7225142bC717F16c9D | Limit orders | Verified ✓ |
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
pendingRmnshown 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 recursiveenter()calls —AlreadyLocked. - Swap slippage:
amountOutMinenforced by Router —TooLittleReceivedreverts if output is too low. - Limit-order sandwich: Filler must
commit(hash)≥ 1 min beforefill— no prior commit →NotCommitted. Commits burn after use (no replay). - Access control:
setHookis owner-only; ownership transfer is two-step (acceptOwnershiprequired). - PoolKey ordering:
stir()enforcescurrency0 < currency1— no reversed-pair tricks. - Router input leak:
_swapCbrefunds unconsumed input when a swap hits the price limit on a thin pool — the flash lock always settles.
13. Security
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.
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".
- 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.
Ramyeon Protocol v1 · Giwa Sepolia · 2026