{"id":22873981,"url":"https://github.com/angleprotocol/angle-amo","last_synced_at":"2025-05-06T19:12:15.863Z","repository":{"id":110072977,"uuid":"541504857","full_name":"AngleProtocol/angle-amo","owner":"AngleProtocol","description":"🏦 Angle Algorithmic market operations (AMO)","archived":false,"fork":false,"pushed_at":"2023-11-05T11:55:05.000Z","size":451,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T19:12:11.324Z","etag":null,"topics":["ethereum","foundry","hardhat","solidity"],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AngleProtocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-26T09:26:01.000Z","updated_at":"2024-10-18T06:47:52.000Z","dependencies_parsed_at":"2024-12-13T14:43:19.860Z","dependency_job_id":null,"html_url":"https://github.com/AngleProtocol/angle-amo","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/AngleProtocol%2Fangle-amo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fangle-amo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fangle-amo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fangle-amo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AngleProtocol","download_url":"https://codeload.github.com/AngleProtocol/angle-amo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252752060,"owners_count":21798723,"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":["ethereum","foundry","hardhat","solidity"],"created_at":"2024-12-13T14:32:10.537Z","updated_at":"2025-05-06T19:12:15.857Z","avatar_url":"https://github.com/AngleProtocol.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"logo.svg\" alt=\"Angle Algorithmic Market Operations\" height=\"40px\"\u003e Angle Algorithmic Market Operations\n\n[![CI](https://github.com/AngleProtocol/AMO/workflows/CI/badge.svg)](https://github.com/AngleProtocol/AMO/actions?query=workflow%3ACI)\n[![Docs](https://img.shields.io/badge/docs-%F0%9F%93%84-blue)](https://docs.angle.money/other-aspects/amo)\n[![Developers](https://img.shields.io/badge/developers-%F0%9F%93%84-pink)](https://developers.angle.money)\n\n## Documentation\n\n[Algorithmic market operations (or AMOs)](https://docs.angle.money/stablecoins-side-modules/amo), also referred to as direct deposit modules, are operations performed by contracts to mint or burn stablecoins without collateral immediately backing these stablecoins. Stablecoins minted by AMOs are still controlled by the protocol, and if other people start controlling these stablecoins, then this new supply should be properly backed in one way or another.\n\nAMOs are conceived not to affect the peg of the stablecoin.\n\n### To Start With\n\nAngle is a decentralized stablecoin protocol, designed to be both over-collateralized and capital-efficient. For more information about the protocol, you can refer to [Angle Documentation](https://docs.angle.money).\n\nThe protocol is made of different modules, each with their own set of smart contracts. This repo contains the smart contracts for the Algorithmic Market Operations (AMOs) of the protocol that allow the protocol to mint stablecoins in some specific places in DeFi.\n\nThe first AMO deployed is on the Curve pool agEUR-EUROC. LP tokens from this AMO are staked on both Stake DAO and Convex.\n\nDocumentation to understand Angle Protocol's AMOs is available [here](https://docs.angle.money/other-aspects/amo).\n\n### Further Information\n\nFor a broader overview of the protocol and its different modules, you can also check [this overview page](https://developers.angle.money) of our developers documentation.\n\nOther Angle-related smart contracts can be found in the following repositories:\n\n- [Angle Core module contracts](https://github.com/AngleProtocol/angle-core)\n- [Angle Strategies](https://github.com/AngleProtocol/angle-strategies)\n- [Angle Borrowing module contracts](https://github.com/AngleProtocol/borrow-contracts)\n\nOtherwise, for more info about the protocol, check out [this portal](https://linktr.ee/angleprotocol) of resources.\n\n## Setup\n\nTo install all the packages needed to run the tests, run:\n`yarn`\n\n### Setup environment\n\nCreate a `.env` file from the template file `.env.example`.\nIf you don't define URI and mnemonics, default mnemonic will be used with a brand new local hardhat node.\n\n### Setup Development Toolbox\n\nTests and scripts on this repo are written use either Hardhat or Foundry development toolbox.\n\nTo setup Foundry on this repo, simply run:\n\n```shell\nyarn foundry:setup\n```\n\n### Compilation\n\nWith Hardhat:\n\n```shell\nyarn compile\n```\n\nWith Foundry:\n\n```shell\nforge build\n```\n\n### Testing\n\n#### Hardhat\n\n```shell\nyarn test\n```\n\nDefaults with `hardhat` network, but another network can be specified with `--network NETWORK_NAME`.\n\nA single test file or a glob pattern can be appended to launch a reduced set of tests:\n\n```shell\nyarn test tests/vaultManager/*\n```\n\n#### Foundry\n\n```shell\nyarn test\n```\n\nA single test file or a glob pattern can be appended to launch a reduced set of tests:\n\n```shell\nforge test --match-contract MarketplaceTest --match-test testTransferOrder -vvv\n```\n\n### Scripts\n\nSome scripts require to fork mainnet. To do so, you must first ensure that the `ETH_NODE_URI_FORK` in `.env` is pointing to an archival node (note: Alchemy provides this functionnality for free but Infura doesn't).\n\nThen, uncomment `blockNumber` in the `hardhat` network definition inside `hardhat.config.ts` to boost node speed.\nThen run:\n\n```shell\nFORK=true yarn hardhat run PATH_TO_SCRIPT\n```\n\n### Coverage\n\nWe try to keep our contract's code coverage above 99% (on Foundry and on Hardhat). All contract code additions should be covered by tests (locally and in mainnet-fork) before being merged and deployed on mainnet.\n\nTo run code coverage with Hardhat tests:\n\n```shell\nyarn coverage\n```\n\nA subgroup of tests can be run by specifying `--testfiles \"path/to/tests/*.ts\"`.\n\nIf coverage runs out of memory, you can export this in your env and retry:\n\n```shell\nexport NODE_OPTIONS=--max_old_space_size=4096\n```\n\nWith Foundry, run:\n\n```shell\nyarn coverage:foundry\n```\n\n### Troubleshooting\n\nIf you have issues running tests or scripts, you can try to regenerate contracts typescript bindings by running\n\n```shell\nyarn generate-types-from-abis\n```\n\nYou can also delete `node_modules`, `cache`, and then re-install dependancies with `yarn install --frozen-lockfile`.\n\n## Bug Bounty\n\nAt Angle, we consider the security of our systems a top priority. But even putting top priority status and maximum effort, there is still possibility that vulnerabilities exist.\n\nWe have therefore setup a bug bounty program with the help of Immunefi. The Angle Protocol bug bounty program is focused around our smart contracts with a primary interest in the prevention of:\n\n- Thefts and freezing of principal of any amount\n- Thefts and freezing of unclaimed yield of any amount\n- Theft of governance funds\n- Governance activity disruption\n\nFor more details, please refer to the [official page of the bounty on Immunefi](https://immunefi.com/bounty/angleprotocol/).\n\n| Level    |                     |\n| :------- | :------------------ |\n| Critical | up to USD \\$500,000 |\n| High     | USD \\$20,000        |\n| Medium   | USD \\$2,500         |\n\nAll bug reports must include a Proof of Concept demonstrating how the vulnerability can be exploited to be eligible for a reward. This may be a smart contract itself or a transaction.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangleprotocol%2Fangle-amo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangleprotocol%2Fangle-amo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangleprotocol%2Fangle-amo/lists"}