{"id":16979343,"url":"https://github.com/yuichiroaoki/aavev2-liquidation-example","last_synced_at":"2025-04-12T01:42:34.232Z","repository":{"id":63106827,"uuid":"556134368","full_name":"yuichiroaoki/aaveV2-liquidation-example","owner":"yuichiroaoki","description":"Aave V2 Liquidation Example on Ethereum Mainnet","archived":false,"fork":false,"pushed_at":"2022-10-23T10:50:59.000Z","size":12,"stargazers_count":30,"open_issues_count":1,"forks_count":13,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-25T21:22:30.844Z","etag":null,"topics":["blockchain","cryptocurrency","ethereum","flashloan","foundry","liquidation","mev","solidity"],"latest_commit_sha":null,"homepage":"https://yuichiroaoki.medium.com/aave-v2-liquidation-example-162de8436ff5","language":"Solidity","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/yuichiroaoki.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}},"created_at":"2022-10-23T05:59:51.000Z","updated_at":"2024-10-03T15:32:10.000Z","dependencies_parsed_at":"2022-11-13T01:01:05.513Z","dependency_job_id":null,"html_url":"https://github.com/yuichiroaoki/aaveV2-liquidation-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuichiroaoki%2FaaveV2-liquidation-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuichiroaoki%2FaaveV2-liquidation-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuichiroaoki%2FaaveV2-liquidation-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuichiroaoki%2FaaveV2-liquidation-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuichiroaoki","download_url":"https://codeload.github.com/yuichiroaoki/aaveV2-liquidation-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505798,"owners_count":21115353,"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":["blockchain","cryptocurrency","ethereum","flashloan","foundry","liquidation","mev","solidity"],"created_at":"2024-10-14T01:45:31.906Z","updated_at":"2025-04-12T01:42:34.213Z","avatar_url":"https://github.com/yuichiroaoki.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aave V2 Liquidation Example\n\nThis repo demostrates how a liquidation strategy works on Aave V2 Ethereum Mainnet using foundry.\n\n## Installation and Setup\n\n### 1. Install [foundry](https://book.getfoundry.sh/getting-started/installation), if you haven't already.\n\n### 2. Clone This Repo\nRun the following command.\n```console\ngit clone https://github.com/yuichiroaoki/aaveV2-liquidation-example.git\n```\n\n## Demo\n\n### 1. Get Ethereum Mainnet RPC URL\nYou can get one from [Alchemy website](https://alchemy.com/?r=33851811-6ecf-40c3-a36d-d0452dda8634) for free.\n\n### 2. Compile Smart Contracts\nRun the following command.\n```console\nforge build\n```\n\n### 3. Execute a Liquidation Call 🔥\nReplace `\u003cyour alchemy rpc url\u003e` with the Ethereum Mainnet RPC URL you get from step 1 and run the following command. This will run test/Liquidation.t.sol, a test contract for src/Liquidation.sol on the Ethereum Mainnet fork network on your local machine.\n```bash\nforge test -vv --fork-url \u003cyour alchemy rpc url\u003e --fork-block-number 15780157 --mp test/Liquidation.t.sol\n```\n\nExpected Outputs\n```\nRunning 4 tests for test/Liquidation.t.sol:LiquidationTest\n[PASS] testCollateralAsset() (gas: 10099)\n[PASS] testDebtBalance() (gas: 10061)\n[PASS] testFlashloan() (gas: 727761)\nLogs:\n  Earned  25916384485813682 MKR\n\n[PASS] testHealthFactor() (gas: 157336)\nLogs:\n  health factor 999477489095341547\n\nTest result: ok. 4 passed; 0 failed; finished in 6.29ms\n```\n\n## References\n\n[AaveV2 Docs](https://docs.aave.com/developers/v/2.0/guides/liquidations) / [GitHub](https://github.com/aave/protocol-v2) \n\n### Transaction Details\n- https://etherscan.io/tx/0x6e808425bffd8aa53c9cb190251907d494fc6883ea32062d9cc80434a0b1cd84\n- https://eigenphi.io/ethereum/liquidation/tx/0x6e808425bffd8aa53c9cb190251907d494fc6883ea32062d9cc80434a0b1cd84\n- https://phalcon.blocksec.com/tx/eth/0x6e808425bffd8aa53c9cb190251907d494fc6883ea32062d9cc80434a0b1cd84","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuichiroaoki%2Faavev2-liquidation-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuichiroaoki%2Faavev2-liquidation-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuichiroaoki%2Faavev2-liquidation-example/lists"}