결제
Monad
Monad는 결제, 토큰화, 온체인 자본시장을 구동하는 기관급 블록체인입니다.






































결제, 토큰화 자산, DeFi가 연중무휴 운영되는 하나의 공유 EVM 네트워크에 모여 있습니다. 스테이블코인, 온체인 자산, 그리고 이를 거래하는 시장 모두 동일한 컨트랙트와 지갑에서 접근할 수 있습니다.
import { NextResponse } from "next/server";
import { withX402, type RouteConfig } from "@x402/next";
import { x402ResourceServer, HTTPFacilitatorClient } from "@x402/core/server";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import type { Network } from "@x402/core/types";
// Monad Testnet configuration
const MONAD_NETWORK: Network = "eip155:10143";
const MONAD_USDC_TESTNET = "0x534b2f3A21130d7a60830c2Df862319e593943A3";
// Monad Facilitator URL
const FACILITATOR_URL = "https://x402-facilitator.molandak.org";
if (!process.env.PAY_TO_ADDRESS) {
throw new Error("PAY_TO_ADDRESS environment variable is required");
}
const PAY_TO = process.env.PAY_TO_ADDRESS;
// Create facilitator client for Monad
const facilitatorClient = new HTTPFacilitatorClient({ url: FACILITATOR_URL });
// Create and configure x402 resource server
const server = new x402ResourceServer(facilitatorClient);
// Monad testnet USDC is not in @x402/evm's built-in asset table, so register
// it here. Mainnet (eip155:143) is built in since 2.22.0 and needs no parser.
const monadScheme = new ExactEvmScheme();
monadScheme.registerMoneyParser(async (amount: number, network: string) => {
if (network === MONAD_NETWORK) {
// Convert decimal amount to USDC smallest units (6 decimals).
// `Math.floor(amount * 1_000_000)` is safe up to ~9 billion USDC
// (~9 quadrillion atomic units) — bounded by JS Number's 2^53 precision.
// For tokens with 18 decimals or very large balances, use `BigInt` to avoid
// precision loss, e.g.:
// BigInt(Math.round(amount * 1e6)).toString() // USDC, 6 decimals
// (BigInt(Math.round(amount * 1e9)) * 1_000_000_000n).toString() // 18d, ≤9 fractional digits
const tokenAmount = Math.floor(amount * 1_000_000).toString();
return {
amount: tokenAmount,
asset: MONAD_USDC_TESTNET, // Raw address for EIP-712 verifyingContract
extra: {
name: "USDC",
version: "2",
},
};
}
return null; // Use default parser for other networks
});
import { NextResponse } from "next/server";
import { withX402, type RouteConfig } from "@x402/next";
import { x402ResourceServer, HTTPFacilitatorClient } from "@x402/core/server";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import type { Network } from "@x402/core/types";
// Monad Testnet configuration
const MONAD_NETWORK: Network = "eip155:10143";
const MONAD_USDC_TESTNET = "0x534b2f3A21130d7a60830c2Df862319e593943A3";
// Monad Facilitator URL
const FACILITATOR_URL = "https://x402-facilitator.molandak.org";
if (!process.env.PAY_TO_ADDRESS) {
throw new Error("PAY_TO_ADDRESS environment variable is required");
}
const PAY_TO = process.env.PAY_TO_ADDRESS;
// Create facilitator client for Monad
const facilitatorClient = new HTTPFacilitatorClient({ url: FACILITATOR_URL });
// Create and configure x402 resource server
const server = new x402ResourceServer(facilitatorClient);
// Monad testnet USDC is not in @x402/evm's built-in asset table, so register
// it here. Mainnet (eip155:143) is built in since 2.22.0 and needs no parser.
const monadScheme = new ExactEvmScheme();
monadScheme.registerMoneyParser(async (amount: number, network: string) => {
if (network === MONAD_NETWORK) {
// Convert decimal amount to USDC smallest units (6 decimals).
// `Math.floor(amount * 1_000_000)` is safe up to ~9 billion USDC
// (~9 quadrillion atomic units) — bounded by JS Number's 2^53 precision.
// For tokens with 18 decimals or very large balances, use `BigInt` to avoid
// precision loss, e.g.:
// BigInt(Math.round(amount * 1e6)).toString() // USDC, 6 decimals
// (BigInt(Math.round(amount * 1e9)) * 1_000_000_000n).toString() // 18d, ≤9 fractional digits
const tokenAmount = Math.floor(amount * 1_000_000).toString();
return {
amount: tokenAmount,
asset: MONAD_USDC_TESTNET, // Raw address for EIP-712 verifyingContract
extra: {
name: "USDC",
version: "2",
},
};
}
return null; // Use default parser for other networks
});
import { NextResponse } from "next/server";
import { withX402, type RouteConfig } from "@x402/next";
import { x402ResourceServer, HTTPFacilitatorClient } from "@x402/core/server";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import type { Network } from "@x402/core/types";
// Monad Testnet configuration
const MONAD_NETWORK: Network = "eip155:10143";
const MONAD_USDC_TESTNET = "0x534b2f3A21130d7a60830c2Df862319e593943A3";
// Monad Facilitator URL
const FACILITATOR_URL = "https://x402-facilitator.molandak.org";
if (!process.env.PAY_TO_ADDRESS) {
throw new Error("PAY_TO_ADDRESS environment variable is required");
}
const PAY_TO = process.env.PAY_TO_ADDRESS;
// Create facilitator client for Monad
const facilitatorClient = new HTTPFacilitatorClient({ url: FACILITATOR_URL });
// Create and configure x402 resource server
const server = new x402ResourceServer(facilitatorClient);
// Monad testnet USDC is not in @x402/evm's built-in asset table, so register
// it here. Mainnet (eip155:143) is built in since 2.22.0 and needs no parser.
const monadScheme = new ExactEvmScheme();
monadScheme.registerMoneyParser(async (amount: number, network: string) => {
if (network === MONAD_NETWORK) {
// Convert decimal amount to USDC smallest units (6 decimals).
// `Math.floor(amount * 1_000_000)` is safe up to ~9 billion USDC
// (~9 quadrillion atomic units) — bounded by JS Number's 2^53 precision.
// For tokens with 18 decimals or very large balances, use `BigInt` to avoid
// precision loss, e.g.:
// BigInt(Math.round(amount * 1e6)).toString() // USDC, 6 decimals
// (BigInt(Math.round(amount * 1e9)) * 1_000_000_000n).toString() // 18d, ≤9 fractional digits
const tokenAmount = Math.floor(amount * 1_000_000).toString();
return {
amount: tokenAmount,
asset: MONAD_USDC_TESTNET, // Raw address for EIP-712 verifyingContract
extra: {
name: "USDC",
version: "2",
},
};
}
return null; // Use default parser for other networks
});
import { NextResponse } from "next/server";
import { withX402, type RouteConfig } from "@x402/next";
import { x402ResourceServer, HTTPFacilitatorClient } from "@x402/core/server";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import type { Network } from "@x402/core/types";
// Monad Testnet configuration
const MONAD_NETWORK: Network = "eip155:10143";
const MONAD_USDC_TESTNET = "0x534b2f3A21130d7a60830c2Df862319e593943A3";
// Monad Facilitator URL
const FACILITATOR_URL = "https://x402-facilitator.molandak.org";
if (!process.env.PAY_TO_ADDRESS) {
throw new Error("PAY_TO_ADDRESS environment variable is required");
}
const PAY_TO = process.env.PAY_TO_ADDRESS;
// Create facilitator client for Monad
const facilitatorClient = new HTTPFacilitatorClient({ url: FACILITATOR_URL });
// Create and configure x402 resource server
const server = new x402ResourceServer(facilitatorClient);
// Monad testnet USDC is not in @x402/evm's built-in asset table, so register
// it here. Mainnet (eip155:143) is built in since 2.22.0 and needs no parser.
const monadScheme = new ExactEvmScheme();
monadScheme.registerMoneyParser(async (amount: number, network: string) => {
if (network === MONAD_NETWORK) {
// Convert decimal amount to USDC smallest units (6 decimals).
// `Math.floor(amount * 1_000_000)` is safe up to ~9 billion USDC
// (~9 quadrillion atomic units) — bounded by JS Number's 2^53 precision.
// For tokens with 18 decimals or very large balances, use `BigInt` to avoid
// precision loss, e.g.:
// BigInt(Math.round(amount * 1e6)).toString() // USDC, 6 decimals
// (BigInt(Math.round(amount * 1e9)) * 1_000_000_000n).toString() // 18d, ≤9 fractional digits
const tokenAmount = Math.floor(amount * 1_000_000).toString();
return {
amount: tokenAmount,
asset: MONAD_USDC_TESTNET, // Raw address for EIP-712 verifyingContract
extra: {
name: "USDC",
version: "2",
},
};
}
return null; // Use default parser for other networks
});
import { NextResponse } from "next/server";
import { withX402, type RouteConfig } from "@x402/next";
import { x402ResourceServer, HTTPFacilitatorClient } from "@x402/core/server";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import type { Network } from "@x402/core/types";
// Monad Testnet configuration
const MONAD_NETWORK: Network = "eip155:10143";
const MONAD_USDC_TESTNET = "0x534b2f3A21130d7a60830c2Df862319e593943A3";
// Monad Facilitator URL
const FACILITATOR_URL = "https://x402-facilitator.molandak.org";
if (!process.env.PAY_TO_ADDRESS) {
throw new Error("PAY_TO_ADDRESS environment variable is required");
}
const PAY_TO = process.env.PAY_TO_ADDRESS;
// Create facilitator client for Monad
const facilitatorClient = new HTTPFacilitatorClient({ url: FACILITATOR_URL });
// Create and configure x402 resource server
const server = new x402ResourceServer(facilitatorClient);
// Monad testnet USDC is not in @x402/evm's built-in asset table, so register
// it here. Mainnet (eip155:143) is built in since 2.22.0 and needs no parser.
const monadScheme = new ExactEvmScheme();
monadScheme.registerMoneyParser(async (amount: number, network: string) => {
if (network === MONAD_NETWORK) {
// Convert decimal amount to USDC smallest units (6 decimals).
// `Math.floor(amount * 1_000_000)` is safe up to ~9 billion USDC
// (~9 quadrillion atomic units) — bounded by JS Number's 2^53 precision.
// For tokens with 18 decimals or very large balances, use `BigInt` to avoid
// precision loss, e.g.:
// BigInt(Math.round(amount * 1e6)).toString() // USDC, 6 decimals
// (BigInt(Math.round(amount * 1e9)) * 1_000_000_000n).toString() // 18d, ≤9 fractional digits
const tokenAmount = Math.floor(amount * 1_000_000).toString();
return {
amount: tokenAmount,
asset: MONAD_USDC_TESTNET, // Raw address for EIP-712 verifyingContract
extra: {
name: "USDC",
version: "2",
},
};
}
return null; // Use default parser for other networks
});
import { NextResponse } from "next/server";
import { withX402, type RouteConfig } from "@x402/next";
import { x402ResourceServer, HTTPFacilitatorClient } from "@x402/core/server";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import type { Network } from "@x402/core/types";
// Monad Testnet configuration
const MONAD_NETWORK: Network = "eip155:10143";
const MONAD_USDC_TESTNET = "0x534b2f3A21130d7a60830c2Df862319e593943A3";
// Monad Facilitator URL
const FACILITATOR_URL = "https://x402-facilitator.molandak.org";
if (!process.env.PAY_TO_ADDRESS) {
throw new Error("PAY_TO_ADDRESS environment variable is required");
}
const PAY_TO = process.env.PAY_TO_ADDRESS;
// Create facilitator client for Monad
const facilitatorClient = new HTTPFacilitatorClient({ url: FACILITATOR_URL });
// Create and configure x402 resource server
const server = new x402ResourceServer(facilitatorClient);
// Monad testnet USDC is not in @x402/evm's built-in asset table, so register
// it here. Mainnet (eip155:143) is built in since 2.22.0 and needs no parser.
const monadScheme = new ExactEvmScheme();
monadScheme.registerMoneyParser(async (amount: number, network: string) => {
if (network === MONAD_NETWORK) {
// Convert decimal amount to USDC smallest units (6 decimals).
// `Math.floor(amount * 1_000_000)` is safe up to ~9 billion USDC
// (~9 quadrillion atomic units) — bounded by JS Number's 2^53 precision.
// For tokens with 18 decimals or very large balances, use `BigInt` to avoid
// precision loss, e.g.:
// BigInt(Math.round(amount * 1e6)).toString() // USDC, 6 decimals
// (BigInt(Math.round(amount * 1e9)) * 1_000_000_000n).toString() // 18d, ≤9 fractional digits
const tokenAmount = Math.floor(amount * 1_000_000).toString();
return {
amount: tokenAmount,
asset: MONAD_USDC_TESTNET, // Raw address for EIP-712 verifyingContract
extra: {
name: "USDC",
version: "2",
},
};
}
return null; // Use default parser for other networks
});언제든 스테이블코인을 온체인으로 송금하세요. 네트워크 수수료는 1센트에도 못 미칩니다.
import { createPublicClient, http, parseAbi } from "viem";
import { monad } from "viem/chains";
const client = createPublicClient({ chain: monad, transport: http() });
const SPYx = "0x90A2a4c76b5D8c0bc892A69EA28Aa775a8f2dD48";
const account = "0x..."; // the holder to look up
const abi = parseAbi([
"function getCurrentMultiplier() view returns (uint256 currentMultiplier, uint256 periodsPassed, uint256 currentMultiplierNonce)",
"function sharesOf(address account) view returns (uint256)",
"function balanceOf(address account) view returns (uint256)",
]);
const [multiplier] = await client.readContract({
address: SPYx,
abi,
functionName: "getCurrentMultiplier",
});
// 1007474126658766000n on November 16, 2026, a multiplier of about 1.0075
const shares = await client.readContract({
address: SPYx,
abi,
functionName: "sharesOf",
args: [account],
});
const scheduleAbi = parseAbi([
"event MultiplierScheduled(uint256 newMultiplier, uint256 activationTime)",
"function newMultiplierActivationTime() view returns (uint256)",
]);
// The scheduling transaction for the October 30, 2026 change.
// The public RPC accepts at most 100 blocks per eth_getLogs call.
const logs = await client.getLogs({
address: SPYx,
event: scheduleAbi[0],
fromBlock: 117996000n,
toBlock: 117996099n,
});
// logs[0].args: { newMultiplier: 1005732155949979200n, activationTime: 1793404500n }
import { createPublicClient, http, parseAbi } from "viem";
import { monad } from "viem/chains";
const client = createPublicClient({ chain: monad, transport: http() });
const SPYx = "0x90A2a4c76b5D8c0bc892A69EA28Aa775a8f2dD48";
const account = "0x..."; // the holder to look up
const abi = parseAbi([
"function getCurrentMultiplier() view returns (uint256 currentMultiplier, uint256 periodsPassed, uint256 currentMultiplierNonce)",
"function sharesOf(address account) view returns (uint256)",
"function balanceOf(address account) view returns (uint256)",
]);
const [multiplier] = await client.readContract({
address: SPYx,
abi,
functionName: "getCurrentMultiplier",
});
// 1007474126658766000n on November 16, 2026, a multiplier of about 1.0075
const shares = await client.readContract({
address: SPYx,
abi,
functionName: "sharesOf",
args: [account],
});
const scheduleAbi = parseAbi([
"event MultiplierScheduled(uint256 newMultiplier, uint256 activationTime)",
"function newMultiplierActivationTime() view returns (uint256)",
]);
// The scheduling transaction for the October 30, 2026 change.
// The public RPC accepts at most 100 blocks per eth_getLogs call.
const logs = await client.getLogs({
address: SPYx,
event: scheduleAbi[0],
fromBlock: 117996000n,
toBlock: 117996099n,
});
// logs[0].args: { newMultiplier: 1005732155949979200n, activationTime: 1793404500n }
import { createPublicClient, http, parseAbi } from "viem";
import { monad } from "viem/chains";
const client = createPublicClient({ chain: monad, transport: http() });
const SPYx = "0x90A2a4c76b5D8c0bc892A69EA28Aa775a8f2dD48";
const account = "0x..."; // the holder to look up
const abi = parseAbi([
"function getCurrentMultiplier() view returns (uint256 currentMultiplier, uint256 periodsPassed, uint256 currentMultiplierNonce)",
"function sharesOf(address account) view returns (uint256)",
"function balanceOf(address account) view returns (uint256)",
]);
const [multiplier] = await client.readContract({
address: SPYx,
abi,
functionName: "getCurrentMultiplier",
});
// 1007474126658766000n on November 16, 2026, a multiplier of about 1.0075
const shares = await client.readContract({
address: SPYx,
abi,
functionName: "sharesOf",
args: [account],
});
const scheduleAbi = parseAbi([
"event MultiplierScheduled(uint256 newMultiplier, uint256 activationTime)",
"function newMultiplierActivationTime() view returns (uint256)",
]);
// The scheduling transaction for the October 30, 2026 change.
// The public RPC accepts at most 100 blocks per eth_getLogs call.
const logs = await client.getLogs({
address: SPYx,
event: scheduleAbi[0],
fromBlock: 117996000n,
toBlock: 117996099n,
});
// logs[0].args: { newMultiplier: 1005732155949979200n, activationTime: 1793404500n }
import { createPublicClient, http, parseAbi } from "viem";
import { monad } from "viem/chains";
const client = createPublicClient({ chain: monad, transport: http() });
const SPYx = "0x90A2a4c76b5D8c0bc892A69EA28Aa775a8f2dD48";
const account = "0x..."; // the holder to look up
const abi = parseAbi([
"function getCurrentMultiplier() view returns (uint256 currentMultiplier, uint256 periodsPassed, uint256 currentMultiplierNonce)",
"function sharesOf(address account) view returns (uint256)",
"function balanceOf(address account) view returns (uint256)",
]);
const [multiplier] = await client.readContract({
address: SPYx,
abi,
functionName: "getCurrentMultiplier",
});
// 1007474126658766000n on November 16, 2026, a multiplier of about 1.0075
const shares = await client.readContract({
address: SPYx,
abi,
functionName: "sharesOf",
args: [account],
});
const scheduleAbi = parseAbi([
"event MultiplierScheduled(uint256 newMultiplier, uint256 activationTime)",
"function newMultiplierActivationTime() view returns (uint256)",
]);
// The scheduling transaction for the October 30, 2026 change.
// The public RPC accepts at most 100 blocks per eth_getLogs call.
const logs = await client.getLogs({
address: SPYx,
event: scheduleAbi[0],
fromBlock: 117996000n,
toBlock: 117996099n,
});
// logs[0].args: { newMultiplier: 1005732155949979200n, activationTime: 1793404500n }
import { createPublicClient, http, parseAbi } from "viem";
import { monad } from "viem/chains";
const client = createPublicClient({ chain: monad, transport: http() });
const SPYx = "0x90A2a4c76b5D8c0bc892A69EA28Aa775a8f2dD48";
const account = "0x..."; // the holder to look up
const abi = parseAbi([
"function getCurrentMultiplier() view returns (uint256 currentMultiplier, uint256 periodsPassed, uint256 currentMultiplierNonce)",
"function sharesOf(address account) view returns (uint256)",
"function balanceOf(address account) view returns (uint256)",
]);
const [multiplier] = await client.readContract({
address: SPYx,
abi,
functionName: "getCurrentMultiplier",
});
// 1007474126658766000n on November 16, 2026, a multiplier of about 1.0075
const shares = await client.readContract({
address: SPYx,
abi,
functionName: "sharesOf",
args: [account],
});
const scheduleAbi = parseAbi([
"event MultiplierScheduled(uint256 newMultiplier, uint256 activationTime)",
"function newMultiplierActivationTime() view returns (uint256)",
]);
// The scheduling transaction for the October 30, 2026 change.
// The public RPC accepts at most 100 blocks per eth_getLogs call.
const logs = await client.getLogs({
address: SPYx,
event: scheduleAbi[0],
fromBlock: 117996000n,
toBlock: 117996099n,
});
// logs[0].args: { newMultiplier: 1005732155949979200n, activationTime: 1793404500n }
import { createPublicClient, http, parseAbi } from "viem";
import { monad } from "viem/chains";
const client = createPublicClient({ chain: monad, transport: http() });
const SPYx = "0x90A2a4c76b5D8c0bc892A69EA28Aa775a8f2dD48";
const account = "0x..."; // the holder to look up
const abi = parseAbi([
"function getCurrentMultiplier() view returns (uint256 currentMultiplier, uint256 periodsPassed, uint256 currentMultiplierNonce)",
"function sharesOf(address account) view returns (uint256)",
"function balanceOf(address account) view returns (uint256)",
]);
const [multiplier] = await client.readContract({
address: SPYx,
abi,
functionName: "getCurrentMultiplier",
});
// 1007474126658766000n on November 16, 2026, a multiplier of about 1.0075
const shares = await client.readContract({
address: SPYx,
abi,
functionName: "sharesOf",
args: [account],
});
const scheduleAbi = parseAbi([
"event MultiplierScheduled(uint256 newMultiplier, uint256 activationTime)",
"function newMultiplierActivationTime() view returns (uint256)",
]);
// The scheduling transaction for the October 30, 2026 change.
// The public RPC accepts at most 100 blocks per eth_getLogs call.
const logs = await client.getLogs({
address: SPYx,
event: scheduleAbi[0],
fromBlock: 117996000n,
toBlock: 117996099n,
});
// logs[0].args: { newMultiplier: 1005732155949979200n, activationTime: 1793404500n }토큰화된 국채, 주식, 실물자산(RWA)을 발행하고 600 ms 만에 온체인에서 정산하세요.
import {BaseHook} from "@openzeppelin/uniswap-hooks/src/base/BaseHook.sol";
function _beforeSwap(address, PoolKey calldata key, SwapParams calldata, bytes calldata)
internal
override
returns (bytes4, BeforeSwapDelta, uint24)
{
beforeSwapCount[key.toId()]++;
return (BaseHook.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0);
}
import { erc20Abi, erc4626Abi, parseUnits } from "viem";
const wSPYx = "0xE7E553Cd128F0011777323A0b44a7b96EA1CB540";
const amount = parseUnits("10", 18); // 10 SPYx
// walletClient is a viem wallet client for the depositor
await walletClient.writeContract({
address: SPYx,
abi: erc20Abi,
functionName: "approve",
args: [wSPYx, amount],
});
await walletClient.writeContract({
address: wSPYx,
abi: erc4626Abi,
functionName: "deposit",
args: [amount, walletClient.account.address],
});
import {BaseHook} from "@openzeppelin/uniswap-hooks/src/base/BaseHook.sol";
function _beforeSwap(address, PoolKey calldata key, SwapParams calldata, bytes calldata)
internal
override
returns (bytes4, BeforeSwapDelta, uint24)
{
beforeSwapCount[key.toId()]++;
return (BaseHook.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0);
}
import { erc20Abi, erc4626Abi, parseUnits } from "viem";
const wSPYx = "0xE7E553Cd128F0011777323A0b44a7b96EA1CB540";
const amount = parseUnits("10", 18); // 10 SPYx
// walletClient is a viem wallet client for the depositor
await walletClient.writeContract({
address: SPYx,
abi: erc20Abi,
functionName: "approve",
args: [wSPYx, amount],
});
await walletClient.writeContract({
address: wSPYx,
abi: erc4626Abi,
functionName: "deposit",
args: [amount, walletClient.account.address],
});
import {BaseHook} from "@openzeppelin/uniswap-hooks/src/base/BaseHook.sol";
function _beforeSwap(address, PoolKey calldata key, SwapParams calldata, bytes calldata)
internal
override
returns (bytes4, BeforeSwapDelta, uint24)
{
beforeSwapCount[key.toId()]++;
return (BaseHook.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0);
}
import { erc20Abi, erc4626Abi, parseUnits } from "viem";
const wSPYx = "0xE7E553Cd128F0011777323A0b44a7b96EA1CB540";
const amount = parseUnits("10", 18); // 10 SPYx
// walletClient is a viem wallet client for the depositor
await walletClient.writeContract({
address: SPYx,
abi: erc20Abi,
functionName: "approve",
args: [wSPYx, amount],
});
await walletClient.writeContract({
address: wSPYx,
abi: erc4626Abi,
functionName: "deposit",
args: [amount, walletClient.account.address],
});
import {BaseHook} from "@openzeppelin/uniswap-hooks/src/base/BaseHook.sol";
function _beforeSwap(address, PoolKey calldata key, SwapParams calldata, bytes calldata)
internal
override
returns (bytes4, BeforeSwapDelta, uint24)
{
beforeSwapCount[key.toId()]++;
return (BaseHook.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0);
}
import { erc20Abi, erc4626Abi, parseUnits } from "viem";
const wSPYx = "0xE7E553Cd128F0011777323A0b44a7b96EA1CB540";
const amount = parseUnits("10", 18); // 10 SPYx
// walletClient is a viem wallet client for the depositor
await walletClient.writeContract({
address: SPYx,
abi: erc20Abi,
functionName: "approve",
args: [wSPYx, amount],
});
await walletClient.writeContract({
address: wSPYx,
abi: erc4626Abi,
functionName: "deposit",
args: [amount, walletClient.account.address],
});
import {BaseHook} from "@openzeppelin/uniswap-hooks/src/base/BaseHook.sol";
function _beforeSwap(address, PoolKey calldata key, SwapParams calldata, bytes calldata)
internal
override
returns (bytes4, BeforeSwapDelta, uint24)
{
beforeSwapCount[key.toId()]++;
return (BaseHook.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0);
}
import { erc20Abi, erc4626Abi, parseUnits } from "viem";
const wSPYx = "0xE7E553Cd128F0011777323A0b44a7b96EA1CB540";
const amount = parseUnits("10", 18); // 10 SPYx
// walletClient is a viem wallet client for the depositor
await walletClient.writeContract({
address: SPYx,
abi: erc20Abi,
functionName: "approve",
args: [wSPYx, amount],
});
await walletClient.writeContract({
address: wSPYx,
abi: erc4626Abi,
functionName: "deposit",
args: [amount, walletClient.account.address],
});
import {BaseHook} from "@openzeppelin/uniswap-hooks/src/base/BaseHook.sol";
function _beforeSwap(address, PoolKey calldata key, SwapParams calldata, bytes calldata)
internal
override
returns (bytes4, BeforeSwapDelta, uint24)
{
beforeSwapCount[key.toId()]++;
return (BaseHook.beforeSwap.selector, BeforeSwapDeltaLibrary.ZERO_DELTA, 0);
}
import { erc20Abi, erc4626Abi, parseUnits } from "viem";
const wSPYx = "0xE7E553Cd128F0011777323A0b44a7b96EA1CB540";
const amount = parseUnits("10", 18); // 10 SPYx
// walletClient is a viem wallet client for the depositor
await walletClient.writeContract({
address: SPYx,
abi: erc20Abi,
functionName: "approve",
args: [wSPYx, amount],
});
await walletClient.writeContract({
address: wSPYx,
abi: erc4626Abi,
functionName: "deposit",
args: [amount, walletClient.account.address],
});Aave부터 Uniswap까지, 서로 연결된 프로토콜 전반에서 예치, 대출, 거래, 수익 창출이 가능합니다.
Monad는 기본 레이어에서 실행과 합의를 새롭게 설계하여, 애플리케이션이 기존에 사용하던 컨트랙트와 도구 그대로 실시간 성능을 누릴 수 있도록 합니다.
블록 생성 시간
300 ms
300 ms마다 새 블록이 생성되어 실시간 애플리케이션에 걸맞은 빠른 응답성을 유지합니다.
완결성
600 ms
트랜잭션은 600 ms 만에 온체인 완결성에 도달하며, 이후에는 되돌릴 수 없습니다.
트랜잭션 비용
1센트 미만
네트워크 수수료가 1센트에도 못 미쳐, 잦은 소액 거래도 부담 없이 처리할 수 있습니다.
호환성
EVM 완전 호환
이더리움과 바이트코드 수준에서 호환됩니다. 이더리움용으로 만들어진 컨트랙트, 지갑, 도구가 Monad에서 그대로 작동합니다.














