Skip to content
KIMP

Contract interface

The Solidity gate KIMP uses to check GIWA Dojang Verified Address attestations, and a viem example that reads isVerified on GIWA Sepolia.

KIMP checks Verified Lane access with a single view call to DojangScroll. This page shows the exact gate contract, the modifier KimpMarket applies, and how to perform the same check from an application.

Solidity#

The interface matches GIWA's DojangScroll. DojangAttesterId is a user-defined value type over bytes32. KimpVerifiedGate is a standalone contract: the DojangScroll address and the Upbit Korea attester ID are immutable, set once at deployment. KimpMarket inherits VerifiedLane and calls the gate with the trader's address, so msg.sender in the modifier is always the trader, never the market.

Solidity
// SPDX-License-Identifier: MITpragma solidity ^0.8.24;type DojangAttesterId is bytes32;interface IDojangScroll {    function isVerified(address addr, DojangAttesterId attesterId) external view returns (bool);}/// The single place KIMP reads Dojang. Standalone, immutable.contract KimpVerifiedGate {    IDojangScroll public immutable dojangScroll;    DojangAttesterId public immutable upbitKorea;    constructor(IDojangScroll scroll, DojangAttesterId attester) {        dojangScroll = scroll;        upbitKorea = attester;    }    function isVerified(address account) external view returns (bool) {        return dojangScroll.isVerified(account, upbitKorea);    }}/// Inherited by KimpMarket. Applied to Verified Lane opens and increases.abstract contract VerifiedLane {    KimpVerifiedGate public gate; // replaceable only through the 48-hour timelock    error NotVerified(address account);    modifier onlyVerified(address account) {        if (!gate.isVerified(account)) revert NotVerified(account);        _;    }}

The modifier reverts with NotVerified(account) when the attestation is missing or revoked. It is applied only to the Verified Lane paths that add exposure. The full gate interface, including the leaderboard opt-in, is in Interfaces.

Where the check is applied#

FunctionModifier
open in the Verified LaneonlyVerified(msg.sender)
Increasing an existing Verified Lane positiononlyVerified(msg.sender)
closeNone
settleNone
liquidateNone

Because the attester ID and scroll address are immutable, changing them requires deploying a new gate and pointing the market's gate at it through governance and the 48-hour timelock.

Reading from TypeScript#

Applications can perform the same check off-chain with a single eth_call. The example uses viem against GIWA Sepolia. Because DojangAttesterId is a value type over bytes32, the ABI encodes it as bytes32.

TypeScript
import { createPublicClient, defineChain, http, parseAbi } from "viem";const giwaSepolia = defineChain({  id: 91342,  name: "GIWA Sepolia",  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },  rpcUrls: { default: { http: ["https://sepolia-rpc.giwa.io"] } },  testnet: true,});const DOJANG_SCROLL = "0xd5077b67dcb56caC8b270C7788FC3E6ee03F17B9";const UPBIT_KOREA_ATTESTER =  "0xd99b42e778498aa3c9c1f6a012359130252780511687a35982e8e52735453034";const client = createPublicClient({  chain: giwaSepolia,  transport: http("https://sepolia-rpc.giwa.io"),});const dojangScrollAbi = parseAbi([  "function isVerified(address, bytes32) external view returns (bool)",]);export async function isVerified(account: `0x${string}`): Promise<boolean> {  return client.readContract({    address: DOJANG_SCROLL,    abi: dojangScrollAbi,    functionName: "isVerified",    args: [account, UPBIT_KOREA_ATTESTER],  });}

At mainnet, the KIMP app runs this call on the /verified page and before submitting any Verified Lane order, so that a missing attestation is shown before a transaction is signed rather than as a revert.

Command line#

The same check with Foundry:

Bash
cast call 0xd5077b67dcb56caC8b270C7788FC3E6ee03F17B9 \  "isVerified(address,bytes32)(bool)" \  <address> \  0xd99b42e778498aa3c9c1f6a012359130252780511687a35982e8e52735453034 \  --rpc-url https://sepolia-rpc.giwa.io