{"id":20001962,"url":"https://github.com/pooltogether/swappable-yield-source","last_synced_at":"2025-10-10T03:05:35.521Z","repository":{"id":47516663,"uuid":"375048298","full_name":"pooltogether/swappable-yield-source","owner":"pooltogether","description":"Wraps any PoolTogether Yield Source and adds the ability to swap between any PoolTogether Yield Source","archived":false,"fork":false,"pushed_at":"2021-08-31T23:59:26.000Z","size":1510,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-04T15:40:16.975Z","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/pooltogether.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":"2021-06-08T14:56:13.000Z","updated_at":"2024-05-23T04:48:19.000Z","dependencies_parsed_at":"2022-09-02T13:30:30.156Z","dependency_job_id":null,"html_url":"https://github.com/pooltogether/swappable-yield-source","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pooltogether/swappable-yield-source","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fswappable-yield-source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fswappable-yield-source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fswappable-yield-source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fswappable-yield-source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pooltogether","download_url":"https://codeload.github.com/pooltogether/swappable-yield-source/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fswappable-yield-source/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002550,"owners_count":26083417,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-13T05:19:16.682Z","updated_at":"2025-10-10T03:05:35.491Z","avatar_url":"https://github.com/pooltogether.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pooltogether/pooltogether--brand-assets\"\u003e\n    \u003cimg src=\"https://github.com/pooltogether/pooltogether--brand-assets/blob/977e03604c49c63314450b5d432fe57d34747c66/logo/pooltogether-logo--purple-gradient.png?raw=true\" alt=\"PoolTogether Brand\" style=\"max-width:100%;\" width=\"200\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n# PoolTogether Swappable Yield Source\n\n[![Mainnet fork](https://github.com/pooltogether/swappable-yield-source/actions/workflows/fork.yml/badge.svg)](https://github.com/pooltogether/swappable-yield-source/actions/workflows/fork.yml)\n[![Coveralls](https://github.com/pooltogether/swappable-yield-source/actions/workflows/coveralls.yml/badge.svg)](https://github.com/pooltogether/swappable-yield-source/actions/workflows/coveralls.yml)\n[![Coverage Status](https://coveralls.io/repos/github/pooltogether/swappable-yield-source/badge.svg?branch=main)](https://coveralls.io/github/pooltogether/swappable-yield-source?branch=main)\n[![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/)\n\nWraps any [PoolTogether Yield Source](https://docs.pooltogether.com/protocol/yield-sources) and adds the ability to swap between any PoolTogether Yield Source.\n\n# Usage\n\n## Deployment\n\nFollow [Installation](#installation) instructions.\n\nThe Swappable Yield Source needs to be initialized with a PoolTogether Yield Source.\n\nYield Source addresses are available in `Constants.ts`.\n\nTo initialize the Swappable Yield Source with the Yield Source you want to use, you need to modify the following line in `deploy/deploy.ts`:\nhttps://github.com/pooltogether/swappable-yield-source/blob/71b6810f821ff8eadc2b11238524054c3f5b836f/deploy/deploy.ts#L104\n\n\nTo deploy, run:\n`yarn deploy \u003cNETWORK_NAME\u003e`\n\n## Development\n\nClone this repository and enter the directory.\n\n### Installation\n\nInstall dependencies:\n\n```\nyarn\n```\n\nThis project uses [Yarn 2](https://yarnpkg.com), dependencies should get installed pretty quickly.\n\n### Env\n\nWe use [direnv](https://direnv.net) to manage environment variables. You'll likely need to install it.\n\nCopy `.envrc.example` and write down the env variables needed to run this project.\n```\ncp .envrc.example .envrc\n```\n\nOnce your env variables are setup, load them with:\n```\ndirenv allow\n```\n\n### Test\n\nWe use the [Hardhat](https://hardhat.org) ecosystem to test and deploy our contracts.\n\nFirst, you will need to deploy contracts in local.\n\nStart the hardhat node by running: `yarn start-fork`\n\nThen to deploy contracts locally, run: `yarn deploy-fork`\n\nTo run unit tests:\n\n```\nyarn test\n```\n\nTo run [solhint](https://protofire.github.io/solhint/) and tests:\n\n```\nyarn verify\n```\n\nTo run coverage:\n\n```\nyarn coverage\n```\n\n### Mainnet fork\n\nBefore deploying, you can make sure your implementation works by deploying a Yield Source Prize Pool and swapping the Yield Source on a fork of Mainnet.\n\nStart Mainnet fork in a terminal window with the command:\n\n```\nyarn start-fork\n```\n\nIn another window, start the scripts to deploy and create a Aave Yield Source Prize Pool, deposit Dai into it, swap to another Yield Source, award the prize and withdraw.\n\n```\nyarn run-fork\n```\n\nYou can also run these commands concurrently with:\n\n```\nyarn mainnet-fork\n```\n\n### Deploy\n\nDeployment script can be found in `deploy/deploy.ts`. To deploy, simply run:\n```\nyarn deploy \u003cNETWORK_NAME\u003e\n```\n\nOnce deployment is done, you can verify your contracts on [Etherscan](https://etherscan.io) by typing:\n\n```\nyarn etherscan-verify \u003cNETWORK_NAME\u003e\n```\n\n### Code quality\n\n[Prettier](https://prettier.io) is used to format TypeScript code. Use it by running:\n\n```\nyarn format\n```\n\n[Solhint](https://protofire.github.io/solhint/) is used to lint Solidity files. Run it with:\n```\nyarn hint\n```\n\n[TypeChain](https://github.com/ethereum-ts/Typechain) is used to generates types for scripts and tests. Generate types by running:\n```\nyarn typechain\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Fswappable-yield-source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpooltogether%2Fswappable-yield-source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Fswappable-yield-source/lists"}