Skip to content

decipherhub/corner-store

Repository files navigation

Corner Store

Corner Store is a Solidity SDK and reference execution system for DEX-level compliance of tokenized assets. The SDK models market access with reusable Element, Recipe, Manifest, and Operator boundaries. The Corner Store reference DEX proves the model across AMM, RFQ, and future Order Book adapters.

The SDK has two extension axes: policies are registered through Element/Recipe/Manifest, while execution venues or external DEX integrations are registered through a generic Router/Adapter boundary. Concrete Corner Store adapters and deployment configuration are reference implementations.

The repository currently contains the architecture and development plan, a vendored Uniswap v3 deployment tool, the Foundry product scaffold, and initial reference execution adapters including AMM and RFQ settlement paths.

Main Use Cases

  • 제3의 DEX가 재사용할 수 있는 compliance interface와 registry 모델을 제공한다.
  • Router를 수정하지 않고 정책과 execution Adapter를 등록·교체한다.
  • 자산 Manifest와 거래 context로 applicable Recipe를 식별한다.
  • 여러 Recipe의 Element를 cumulative AND로 실행 전에 평가한다.
  • 허용된 venue adapter로 거래를 전달한다.
  • ERC-3643 token transfer enforcement와 Corner Store 거래 정책의 실패를 원자적으로 처리한다.
  • Corner Store DEX로 SDK의 testnet 실행 흐름을 증명한다.

Repository Guide

Product Documentation

Tech Stack

  • Contracts: Solidity + Foundry
  • Tests: Forge
  • Local chain: Anvil
  • RFQ reference service: TypeScript
  • Vendored deployment tooling: TypeScript, Yarn, ethers v5

Local Setup

Required tools:

  • Foundry (forge, anvil)
  • Node.js and npm for services/rfq
  • Yarn for tools/deploy-v3

Install or refresh the vendored tool dependencies when needed:

cd tools/deploy-v3
yarn install --frozen-lockfile

Development Commands

The product contracts use Foundry. The current scaffold contains the Compliance Core, Execution Integration Kit, AMM reference adapter, RFQ v1 reference settlement adapter, and related fixtures/tests.

Build

forge build

Test

forge test --offline

Format

forge fmt

Local Node

anvil

RFQ Reference Service

services/rfq is a minimal quote signer reference for RFQ v1. It builds the same EIP-712 typed data that RFQAdapter verifies, assigns expiry and nonce, and returns a signed quote. It is not a production dealer, pricing engine, inventory manager, custody service, websocket feed, orderbook, or compliance decision engine.

cd services/rfq
npm ci
npm test

Check All

scripts/check.sh

The vendored Uniswap deployment tool has its own commands and scope:

cd tools/deploy-v3
yarn test

Read tools/deploy-v3/CORNER_STORE_PROFILE.md before changing the deployment profile.

Runtime Notes

  • 제품 runtime과 자동 E2E 환경은 아직 구성되지 않았다.
  • tools/deploy-v3는 제품 배포 orchestrator가 아니라 독립 vendored module이다.
  • 현재 작업 상태와 다음 feature는 PROGRESS.mdFEATURES.md를 기준으로 한다.

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors