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.
Screenshots



Problem Statement
PROBLEMSWhat 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 immutableRequires massive data on-chain (e.g. 10,000+ sanction addresses)SOLUTIONSBackground / ContextMolecule Protocol: Smart Contract ACL (Access Control List) MiddlewareUse 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 anytimePublish once, use by all smart contracts, no (huge) duplicate on-chain dataWhatβs Implemented for the Hackathon?Mass data publishing on-chainAllow list implementation for subscription payments
Solution
(1) MASS DATA PUBLISHING: Layer 1 vs. Layer 2 benchmarkEthereum max batch size: 25. 10,000 sanction list => 400 tranctions $$$$$Layer 2: size > 500. Deployed on Scroll, Base (Optimism), Polygon, FilecoinSee 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 PAYMENTTo 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 walletsTo avoid confusion, each user can only own 1 token, and the tokenID will be irrelevantExpiry needs to be trackedSanctioned wallet addresses are not allowed. Gated by using Molecule AML with US and EU sanction lists checkedThe subscription contract is implemented as a Molecule smart contract so it can be composable with other controllers
Hackathon
Scaling Ethereum 2023
2023
Prizes
- π
π§° FVM β Best Tooling
- π
π Scroll β Just Deploy!
- π
π Scroll β Best use of Blockspace
Contributors
- AjmalAhamedKodakkat
4 contributions
- calvinmd
3 contributions
- ultraviolet10
1 contributions