project screenshot 1
project screenshot 2
project screenshot 3

SCALE: Smart Contract Access Logic for EVM

Access control may require vast amount of data. For example, sanction lists. L2s enables data publishing on-chain at scale.

SCALE: Smart Contract Access Logic for EVM

Created At

Scaling Ethereum 2023

Winner of

trophy

🧰 FVM β€” Best Tooling

trophy

πŸ“œ Scroll β€” Just Deploy!

trophy

πŸ˜‹ Scroll β€” Best use of Blockspace

Project Description

PROBLEMS

What Problems Are We Solving?

  • Compliance is done via UI only. Smart contracts are still ungated.
  • Data on-chain is expensive and is slow to publish.

Why Do These Problems Exist?

  • Changing data (e.g. growing sanction list), but the blockchain is immutable
  • Requires massive data on-chain (e.g. 10,000+ sanction addresses)

SOLUTIONS

Background / Context

  • Molecule Protocol: Smart Contract ACL (Access Control List) Middleware
  • Use case: Compliance! ETH Global 2020 (KYC), ETH Global 2022 (AML)

What Are The Solutions?

  • MP is future-proof: delegated ACL allows add or remove logic anytime
  • Publish once, use by all smart contracts, no (huge) duplicate on-chain data

What’s Implemented for the Hackathon?

  • Mass data publishing on-chain
  • Allow list implementation for subscription payments

How it's Made

(1) MASS DATA PUBLISHING: Layer 1 vs. Layer 2 benchmark

  • Ethereum max batch size: 25. 10,000 sanction list => 400 tranctions $$$$$
  • Layer 2: size > 500. Deployed on Scroll, Base (Optimism), Polygon, Filecoin

See the screencap for the benchmark of different layer 2 blockchains.

We deployed the sanction lists on different layer 2s--Scroll, Base (OP Stack), Polygon, and Filecoin EVM--and tested each chain's maximum batch transaction size.

(2) SUBSCRIPTION PAYMENT

To take advantage of the lower gas fees on layer 2s, we implemented a modified version of EIP-5643 (Subscription NFTs).

  • To allow subscribers to see their subscription, we decide to mint a standard ERC721 to subscriber wallets

  • To avoid confusion, each user can only own 1 token, and the tokenID will be irrelevant

  • Expiry needs to be tracked

  • Sanctioned wallet addresses are not allowed. Gated by using Molecule AML with US and EU sanction lists checked

  • The subscription contract is implemented as a Molecule smart contract so it can be composable with other controllers

background image mobile

Join the mailing list

Get the latest news and updates