{"id":17809772,"url":"https://github.com/zeroxbrock/unisuapp","last_synced_at":"2025-08-13T13:30:43.419Z","repository":{"id":230309126,"uuid":"779072492","full_name":"zeroXbrock/unisuapp","owner":"zeroXbrock","description":"Uniswap trades via intents on SUAVE.","archived":false,"fork":false,"pushed_at":"2024-04-11T20:50:15.000Z","size":42,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-27T15:55:11.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeroXbrock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-29T01:27:14.000Z","updated_at":"2024-09-28T02:12:59.000Z","dependencies_parsed_at":"2024-03-29T02:40:20.728Z","dependency_job_id":"6bb06750-bf78-46c7-80b7-997699c25be8","html_url":"https://github.com/zeroXbrock/unisuapp","commit_stats":null,"previous_names":["zeroxbrock/unisuapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroXbrock%2Funisuapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroXbrock%2Funisuapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroXbrock%2Funisuapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroXbrock%2Funisuapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeroXbrock","download_url":"https://codeload.github.com/zeroXbrock/unisuapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229763571,"owners_count":18120480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T15:21:44.024Z","updated_at":"2024-12-14T22:41:07.295Z","avatar_url":"https://github.com/zeroXbrock.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uniswap-v2-intents-goerli\n\nA SUAPP featuring a simple intent-based public mempool and solver-driven intent execution. The example is limited to Uniswap V2, but the protocol can easily be extended to other exchanges. Solvers' bundles are sent only when their bundle passes simulation.\n\nThis example sends the user's private key over the wire via confidentialInputs. This is not a sound design; it's just simpler for the sake of demonstration. The key is only ever seen by the MEVM, and is used to sign transactions on behalf of the user. That said, it's strongly recommended to use a burner account if you want to run this yourself.\n\n\u003e This example connects to the live SUAVE Rigil Testnet, and Goerli. To run this example, make sure you have at least 0.1 testnet ETH in both networks.\n\n**System Dependencies:**\n\n- [bun](https://bun.sh)\n- [foundry](https://getfoundry.sh)\n- you'll also need accounts on eth-goerli and suave-rigil, each with 0.1+ ether\n\n## instructions\n\nTo install dependencies:\n\n```bash\nbun install\nforge build\n```\n\nSetup .env:\n\n```bash\ncp .env.example .env\n\n# populate GOERLI_KEY and SUAVE_KEY in .env\n# other var(s) optional\nvim .env\n```\n\nRun the example:\n\n```bash\nbun run index.ts\n```\n\n_To deploy new contracts before running:_\n\n```bash\nDEPLOY=true bun run index.ts\n```\n\n_Alternatively, deploy a new contract with forge:_\n\n```bash\n# load .env into shell to make $SUAVE_KEY available\nsource .env\n# deploy Intents contract\nforge create --legacy --private-key $SUAVE_KEY --rpc-url https://rpc.rigil.suave.flashbots.net src/Intents.sol:Intents\n```\n\nThis project was created using `bun init` in bun v1.0.23. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.\n\n## notes\n\n*Some notes on intents and ideas to improve the current design:*\n\n- generate the user's private key in a smart contract and store the private key in confidential storage, so it never leaves the MEVM+CStore\n  - user or solver provides a signed transaction to fund the new account, which is placed at the front of the bundle\n- check for inclusion onchain\n  - check for a tx receipt from a reliable source to prove inclusion\n\n    RPC URL will have to exist somewhere on suave chain. May be worthwhile to write an API registry contract there so that SUAPPS don't have to re-deploy contracts when an address changes. Naturally, since we want to update the registry over time, someone/something will control the registry. To make sure you don't get rekt, you either have to (A) trust the controller not to act maliciously, or (B) implement multi-sig/governance ownership on the contract, and trust the elected governors not to collude.\n  - consider using merkle proofs instead of tx receipts for larger-scale inclusion checks\n- add a reimbursement mechanism to pay solvers\n  - write an L1 contract that uses EIP712 signatures to reimburse the solver.\n\n    The signature is passed with confidentialInputs and is not revealed except when landed in a bundle.\n    This allows us to program the recipient (solver) into the reimbursement function without requiring the recipient address to be encoded in the EIP712 struct, which is important because the user doesn't know who the solver is going to be ahead of time.\n  - use inclusion proof to trigger solver reimbursement\n    - It may not be possible to send bundles and check for inclusion atomically at the moment. This may change with pending parallelization developments on SUAVE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroxbrock%2Funisuapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroxbrock%2Funisuapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroxbrock%2Funisuapp/lists"}