0age
@0age
open-sourced another building block on the path to cross-chain swaps: a reference implementation of a minimalistic server-based allocator for The Compact it's called Smallocator š¤ https://github.com/Uniswap/smallocator if you're wondering "what the hell is an allocator" then read on ā
1 reply
9 recasts
57 reactions
0age
@0age
so the way that The Compact works is that you deposit into resource locks when you do, you choose an allocator for that lock then when you create a compact (e.g. a request to take some action) they make sure you're not double-spending & "attest" that the compact's good to go
1 reply
0 recast
6 reactions
0age
@0age
arguably the most straightforward allocator would be a purely onchain contract to fill a cross-chain swap, you'd call this contract, it'd check your balance and your pending compacts, and reserve the tokens for you for a little while but this is slow, pricey, and not private
1 reply
0 recast
2 reactions
0age
@0age
another approach is to run it in a server like Smallocator granted, fillers and solvers are counting on the server not to let users double-spend but it's fast & basically free it also delays revealing info about the cross-chain swap or other action to help avoid getting š„Ŗ'd
1 reply
0 recast
2 reactions
0age
@0age
this codebase is meant to serve as a reference if you want to learn more about allocators you can click around on the frontend (link on the readme) as well as with the API (the "main course") it's also a good starting point if you're looking into running an allocator yourself!
1 reply
0 recast
2 reactions
0age
@0age
Smallocator features: š Secure session-based authentication using EIP-4361 āļø EIP-712 Compact message validation & signing on demand from session-gated accounts š¤« No witness data or signature provided, sponsor intents stay secret (only typestring & witness hash is supplied)
1 reply
0 recast
2 reactions
0age
@0age
š GraphQL integration with The Compact Indexer for multi-chain indexing š¾ Persistent storage using PGLite to track attested compacts and used nonces š Comprehensive validation pipeline to ensure resource locks never end up in an overallocated state
1 reply
0 recast
2 reactions
0age
@0age
one final caveat here: this is really not meant for production use at all if you're working on chain abstraction & curious about how The Compact works i highly encourage you to give Smallocator a whirl much more to come; this is just another small step š¤
0 reply
0 recast
2 reactions