{"id":20442285,"url":"https://github.com/gacwr/fief-contracts-staking","last_synced_at":"2026-03-07T12:36:20.203Z","repository":{"id":112328495,"uuid":"565327204","full_name":"GACWR/fief-contracts-staking","owner":"GACWR","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-18T19:19:11.000Z","size":1485,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-05T07:46:52.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GACWR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-13T03:04:45.000Z","updated_at":"2022-10-10T16:59:41.000Z","dependencies_parsed_at":"2023-05-13T01:00:19.144Z","dependency_job_id":null,"html_url":"https://github.com/GACWR/fief-contracts-staking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GACWR/fief-contracts-staking","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GACWR%2Ffief-contracts-staking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GACWR%2Ffief-contracts-staking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GACWR%2Ffief-contracts-staking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GACWR%2Ffief-contracts-staking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GACWR","download_url":"https://codeload.github.com/GACWR/fief-contracts-staking/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GACWR%2Ffief-contracts-staking/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30213233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T12:15:00.571Z","status":"ssl_error","status_checked_at":"2026-03-07T12:15:00.217Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-15T09:39:01.601Z","updated_at":"2026-03-07T12:36:20.177Z","avatar_url":"https://github.com/GACWR.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# FIEF Finance\n\nThis repo contains the Vyper contracts used to allow users to stake $FIEF in exchange for $sFIEF. The contracts are forked from the [CurveDAO Contracts](https://github.com/curvefi/curve-dao-contracts) with slight modifications to the [VotingEscrow contract](https://github.com/curvefi/curve-dao-contracts/blob/master/contracts/VotingEscrow.vy).\n\nThe repo contains two contracts:\n\n1. [FeeDistributor.vy](./contracts/FeeDistributor.vy) - This contract is responsible for distributing $FIEF to stakers. It's functionality is unchanged and information on the functions can be found [here](https://curve.readthedocs.io/dao-fees.html#fee-distribution).\n2. [sFIEF.vy](./contracts/sFIEF.vy) - This contract allows users to create time locks of their $FIEF in exchange for a decaying amount of $sFIEF. The contract is based on the original curveDAO [veCRV contract](https://curve.readthedocs.io/dao-vecrv.html)\n\nThe sFIEF contract has the following modifications:\n\n- The maximum allowed staking time is set to 2 years\n- 0.05%(performance fee) of the staked $FIEF is sent to a specified address once a lock has expired and the staker withdraws\n- Admin is able to modify the performance fee \u0026 change the fee collector address\n\n## Setup\n\n1) **Deploy sFIEF**\n    - Command can be taken from comment in [2-deploy-sfief.ts](./tasks/2-deploy-sfief.ts) but take care to update the fee collector address and network. The fee collector should be set to the address the performance fee should be sent to.\n\n2) **Deploy FeeDistributor**\n    - Command can be taken from comment in [3-deploy-distributor.ts](./tasks/3-deploy-distributor.ts) parms should be set as follows:\n       - **vetoken**: Address of deployed sFIEF contract\n       - **starttime**: Epoch time for distribution to start. Value can be calculated using ethers, get the latest block then add the duration in the future to the latestBlock.timestamp.\n       - **distributiontoken**: Address of deployed FIEF contract\n       - **admin**: Address of owner of the distributor contract\n       - **emergency-return**: Address to send all funds to if the contract is destroyed.\n\n3) **Funding the distributor**\n    - The distributor needs to be funded every week. The distribution token\n    balance is distributed proportionally to each user based on their sFIEF\n    balance relative to the total sFIEF supply. The actual distribution occurrs\n    at the end of the week, so users that create locks should expect to recieve their\n    first payout at the end of the following epoch week. Funding is achieved by calling\n    the burn function, which can also be called by anyone and will transfer the total\n    balance of FIEF to the distributor.\n\n4) **Checkpoints**\n    - The token checkpint tracks the balance of FIEF within the distributor to\n    determine the amount to distribute in the given week. To create a checkpoint call the checkpoint_token function. The first call can only be called by admin but subsequent calls can be made by anyone.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgacwr%2Ffief-contracts-staking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgacwr%2Ffief-contracts-staking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgacwr%2Ffief-contracts-staking/lists"}