{"id":18263751,"url":"https://github.com/yearn/veyfi","last_synced_at":"2025-10-10T07:36:39.717Z","repository":{"id":37038694,"uuid":"452711970","full_name":"yearn/veYFI","owner":"yearn","description":"Voting YFI","archived":false,"fork":false,"pushed_at":"2024-04-09T11:25:08.000Z","size":533,"stargazers_count":75,"open_issues_count":8,"forks_count":37,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-20T19:07:26.537Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/yearn.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,"publiccode":null,"codemeta":null}},"created_at":"2022-01-27T14:20:46.000Z","updated_at":"2024-04-11T12:02:53.000Z","dependencies_parsed_at":"2024-11-05T11:25:11.374Z","dependency_job_id":null,"html_url":"https://github.com/yearn/veYFI","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yearn%2FveYFI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yearn%2FveYFI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yearn%2FveYFI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yearn%2FveYFI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yearn","download_url":"https://codeload.github.com/yearn/veYFI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247246352,"owners_count":20907781,"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-11-05T11:12:30.346Z","updated_at":"2025-10-10T07:36:34.695Z","avatar_url":"https://github.com/yearn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## veYFI\n\nveYFI is locking similar to the ve-style program of Curve. \n\n### Max lock\n\nYFI can be locked up to 4 years into veYFI, which is non-transferable. They are at least locked for a week.\n\n### veYFI balance\n\nThe duration of the lock gives the amount of veYFI relative to the amount locked, locking for four years gives you a veYFI balance equal to the amount of YFI locked. Locking for 2 years gives you a veYFI balance of 50% of the YFI locked.\nThe balance decay overtime and can be pushed back to max value by increasing the lock back to the max lock duration.\n\n\n### veYFI early exit\nIt’s possible to exit the lock early, in exchange for paying a penalty that gets distributed to the account that have veYFI locked. The penalty for exiting early is the following: \n```\n    min(75%, lock_duration_left / 4 years * 100%)\n```\nSo at most you are paying a 75% penalty that starts decreasing when your lock duration goes beyond 3 years.\n\n## Gauges\n\nGauges allow vault depositors to stake their vault tokens and earn dYFI rewards according to the amount of dYFI to be distributed and their veYFI weight.\n\n### Gauges boosting\n\nGauge rewards are boosted with a max boost of 10x. The max boost is a variable that can be adjusted by the team.\n\nThe boost mechanism will calculate your earning weight by taking the smaller amount of two values:\n- The first value is the amount of liquidity you are providing. This amount is your maximum earning weight.\n- The second value is 10% of first value + 90% the amount deposited in gauge multiplied by the ratio of your `veYFI Balance/veYFI Total Supply`.\n```\nmin(AmountDeposited, (AmountDeposited /10) + (TotalDepositedInTheGauge * VeYFIBalance / VeYFITotalSupply * 0.9))\n```\nWhen a user interacts with the gauge, the boosted amount is snapshotted until the next interaction.\nThe rewards that are not distributed because the balance isn't fully boosted are distributed back to veYFI holders.\n\n### Gauge YFI distribution\n\nEvery two weeks veYFI holders can vote on dYFI distribution to gauges.\n\n## veYFIRewardPool\n\nUsers who lock veYFI can claim YFI from the veYFI exited early and the non-distributed gauge rewards due to the lack of boost.\nYou will be able to start claiming from the veFYI reward pool two or three weeks from the Thursday after which you lock before you can claim.\n\n\n## dYFIRewardPool\n\nUsers who lock veYFI can claim dYFI from the dYFI that aren't distributed due to the lack of boost.\n\n## Redemption\n\nRedemption is the contract used to redeem dYFI for YFI using ETH. YFI/ETH price is fetched from curve and chainlink oracles. YFI is sold at a discounted rate based on the ratio between the total YFI supply and the veYFI supply.\n\n## Setup\n\nInstall ape framework. See [ape quickstart guide](https://docs.apeworx.io/ape/stable/userguides/quickstart.html)\n\nInstall dependencies\n```bash\nnpm install\n```\n\nInstall [Foundry](https://github.com/foundry-rs/foundry) for running tests\n```bash\ncurl -L https://foundry.paradigm.xyz | bash\n```\n\n```bash\nfoundryup\n```\n\n## Compile\n\nInstall ape plugins\n```bash\nape plugins install .\n```\n\n```bash\nape compile\n```\n\n## Test\n\n```bash\nape test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyearn%2Fveyfi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyearn%2Fveyfi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyearn%2Fveyfi/lists"}