Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

HackerSamuraiDAO/2022-ETHSeoul-submission

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SHIELD SWAP

MEV Resistant Flashloanable DEX Aggregator

Live Demo

https://2022-eth-seoul-submission.vercel.app/

the graph diagram

Technical Integration

Pool info aggregator for pathfinder

code

generated example

https://github.com/fortoon21/Shieldswap/blob/c335665a3f99eb632d48bf190a028daea13b4f18/packages/aggregator/data/v2/quickswap/poolInfos.json

The graph

Diagram

the graph diagram

Used subgraph

https://thegraph.com/hosted-service/subgraph/0xfind/uniswap-v3-mumbai

  • Success to integarte uniswap v3 in mumbai
  • subgraph for quickswap mumbai and sushiswap mumbai is not available, we can add subgraph for those later

How we use The Graph

The graph is used for aggregating pool info. We are aggregating all pool informaion from event, but we can have better performance using The Graph.

Line of integration

https://github.com/fortoon21/JK_bridge/blob/c335665a3f99eb632d48bf190a028daea13b4f18/packages/aggregator/lib/viewer.ts#L218-L221

https://github.com/fortoon21/JK_bridge/blob/c335665a3f99eb632d48bf190a028daea13b4f18/packages/aggregator/lib/thegraph.ts#L5-L10

Polygon

Deployed Contracts

Route Proxy
Success tx

https://mumbai.polygonscan.com/tx/0x48754e8114f4a19e784910e732c0550944a30cb6a2e0d0dd6509becccdd998a5

Token Viewer
Token Viewer
Token Viewer
Others

All contract information is kept at https://github.com/fortoon21/Shieldswap/blob/ed969d0a5831a18f1e0c0deca6d79b54b6c132d0/packages/aggregator/address.json

How we use Polygon

We are aggregating pool info from quickswap, sushiswap, uniswap V3 deployed in Polygon Mumbai, then provider aggregated swap to user.

We deployed multicall viewer contract and swap contract in Polygon Mumbai.

Development

Frontend

cd packages/frontend
yarn                    // for the first time
yarn dev

Aggregator

cd packages/aggregator
yarn                    // for the first time
yarn test

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 53.8%
  • Solidity 45.4%
  • Other 0.8%