{"id":17685823,"url":"https://github.com/sepandhaghighi/boardroom","last_synced_at":"2025-05-13T00:03:21.180Z","repository":{"id":47210216,"uuid":"402349497","full_name":"sepandhaghighi/boardroom","owner":"sepandhaghighi","description":"Boardroom API in Python","archived":false,"fork":false,"pushed_at":"2021-09-08T09:23:32.000Z","size":194,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T00:36:00.890Z","etag":null,"topics":["boardroom","gitcoin","python3","reputation","reputation-api","web3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"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/sepandhaghighi.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}},"created_at":"2021-09-02T08:39:49.000Z","updated_at":"2025-02-19T18:12:40.000Z","dependencies_parsed_at":"2022-09-19T05:21:27.965Z","dependency_job_id":null,"html_url":"https://github.com/sepandhaghighi/boardroom","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sepandhaghighi%2Fboardroom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sepandhaghighi%2Fboardroom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sepandhaghighi%2Fboardroom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sepandhaghighi%2Fboardroom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sepandhaghighi","download_url":"https://codeload.github.com/sepandhaghighi/boardroom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843203,"owners_count":21972872,"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":["boardroom","gitcoin","python3","reputation","reputation-api","web3"],"created_at":"2024-10-24T10:29:09.534Z","updated_at":"2025-05-13T00:03:21.150Z","avatar_url":"https://github.com/sepandhaghighi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Boardroom\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://www.python.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/built%20with-Python3-green.svg\" alt=\"built with Python3\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://badge.fury.io/py/boardroom\"\u003e\u003cimg src=\"https://badge.fury.io/py/boardroom.svg\" alt=\"PyPI version\" height=\"18\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n----------\n\n## Overview\nThis package will help you to work with Boardroom API in Python.\n\n## Installation\t\t\n\n### Source code\n- Download [Version 0.1](https://github.com/sepandhaghighi/boardroom/archive/v0.1.zip) or [Latest Source ](https://github.com/sepandhaghighi/boardroom/archive/dev.zip)\n- Run `pip install -r requirements.txt` or `pip3 install -r requirements.txt` (Need root access)\n- Run `python3 setup.py install` or `python setup.py install` (Need root access)\t\t\t\t\n\n### PyPI\n\n\n- Check [Python Packaging User Guide](https://packaging.python.org/installing/)     \n- Run `pip install boardroom==0.1` or `pip3 install boardroom==0.1` (Need root access)\n\n### Easy install\n\n- Run `easy_install --upgrade boardroom` (Need root access)\n\n## Usage\n\t\n### Proposal\n\n#### Initializing\n```pycon\n\u003e\u003e\u003e from boardroom import Proposal\n\u003e\u003e\u003e proposal_1 = Proposal(ref_id = \"cHJvcG9zYWw6c3VzaGk6ZGVmYXVsdDpxbXM3a3ljNGtyNmUxZ3NzY3NrNW1wb2VkZmt0dzhvaHFyY2FoM2prN213NzVr\")\n\u003e\u003e\u003e proposal_1.ref_id\n'cHJvcG9zYWw6c3VzaGk6ZGVmYXVsdDpxbXM3a3ljNGtyNmUxZ3NzY3NrNW1wb2VkZmt0dzhvaHFyY2FoM2prN213NzVr'\n\u003e\u003e\u003e proposal_1.title\n'Buy MemePad - https://memepad.co/ - LaunchPad for Meme coins'\n```\n\n#### Update Data\n```pycon \n\u003e\u003e\u003e proposal_1.update_data()\n\u003e\u003e\u003e proposal_1.update_data(retry=5)\n\u003e\u003e\u003e proposal_1.last_update_data # Last data update timestamp\n1630932971.748473\n```\n\n#### Update Votes\n```pycon\n\u003e\u003e\u003e proposal_1.update_votes()\n\u003e\u003e\u003e len(proposal_1.votes)\n266\n\u003e\u003e\u003e votes_address = list(proposal_1.votes.keys())\n\u003e\u003e\u003e votes_address[:5]\n['0x9172E788cd829D75E913E53452B49bb43D32bAD4', '0x58a04F65195807bE04317068Bc68c03927E2d064', '0x98071fc469cF2fDCE21C4A9d06DB0BcA1A22a07A', '0x8513d7bA8e43b0Bf27E71CAAA3BE1c66e12871Db', '0x1C35500ed22286Ca91239CFA584C4b8efCB638C5']\n\u003e\u003e\u003e proposal_1.votes['0x9172E788cd829D75E913E53452B49bb43D32bAD4']\n{'choice': 0, 'power': 1.2708462}\n\u003e\u003e\u003e proposal_1.update_votes(limit=10)\n\u003e\u003e\u003e len(proposal_1.votes)\n10\n\u003e\u003e\u003e proposal_1.update_votes(limit=10,retry=5)\n\u003e\u003e\u003e proposal_1.last_update_votes\n1630933297.228164\n```\n\n#### Update Data + Votes\n```pycon\n\u003e\u003e\u003e proposal_1.update()\n\u003e\u003e\u003e proposal_1.update(limit=3)\n\u003e\u003e\u003e proposal_1.update(limit=3,retry=4)\n```\n\n### Protocol\n\n#### Initializing\n```pycon\n\u003e\u003e\u003e from boardroom import Protocol\n\u003e\u003e\u003e protocol_1 = Protocol(cname = \"aave\")\n\u003e\u003e\u003e protocol_1.total_proposals\n31\n\u003e\u003e\u003e protocol_1.unique_voters\n754\n```\n\n#### Update Data\n```pycon \n\u003e\u003e\u003e protocol_1.update_data()\n\u003e\u003e\u003e protocol_1.update_data(retry=5)\n\u003e\u003e\u003e protocol_1.last_update_data\n1630958815.165922\n```\n\n#### Update Proposals\n```pycon\n\u003e\u003e\u003e protocol_1.update_proposals()\n\u003e\u003e\u003e len(protocol_1.proposals)\n31\n\u003e\u003e\u003e proposals = list(protocol_1.proposals.keys())\n\u003e\u003e\u003e proposals[:5]\n['cHJvcG9zYWw6YWF2ZTpkZWZhdWx0OjIz', 'cHJvcG9zYWw6YWF2ZTpkZWZhdWx0OjI4', 'cHJvcG9zYWw6YWF2ZTpkZWZhdWx0OjY=', 'cHJvcG9zYWw6YWF2ZTpkZWZhdWx0OjE=', 'cHJvcG9zYWw6YWF2ZTpkZWZhdWx0Ojc=']\n\u003e\u003e\u003e protocol_1.proposals[\"cHJvcG9zYWw6YWF2ZTpkZWZhdWx0OjIz\"]\n{'total_votes': 24, 'proposer': '0x32a9d6A550C3D89284D5700F7d7758dBc6f0fB2C', 'state': 'executed', 'content': '\\n\\n## Simple Summary\\n\\nThis proposes raising the maximum AMPL interest rate to better balance incentives between the borrow and deposit sides of the market.\\n\\n## Motivation\\n\\nFollowing [API-12](https://governance.aave.com/t/proposal-add-support-for-ampl/854/8), [AMPL borrowing \u0026 depositing](https://app.aave.com/reserve-overview/AMPL-0xd46ba6d942050d489dbd938a2c909a5d5039a1610xb53c1a33016b2dc2ff3653530bff1848a515c8c5) went live on the AAVE v2 market [date=2021-07-24 time=20:22:00 timezone=\"UTC\"].\\n\\nSince then, there has been a near 100% utilization rate of deposited assets. This suggests the maximum cap of the interest rate curve is not able to reach a high enough value to effectively balance incentives between the borrow side and depositing side of the marketplace.\\n\\n![Deposit and Borrow APY on AAVE, 7/24/21](../assets/AIP-26/apys.png \"Deposit and Borrow APY on AAVE, 7/24/21\")\\n\\nWhile the AMPL spot market is currently in a relatively extreme condition, the AAVE borrowing market should be able to perform efficiently in all market scenarios.\\n\\n## Specification\\n\\nWe suggest the following parameters for AAVE\\'s default [interest rate model](https://docs.aave.com/risk/liquidity-risk/borrow-interest-rate#interest-rate-model):\\n\\n- Optimal utilization = 75%\\n- Slope1 = 2%\\n- Slope2 = 10,000%\\n\\nThis leads to a piecewise linear curve with two parts and three defining points:\\n\\n- Borrow Interest(0) = 0% APY\\n- Borrow Interest(75) = 2% APY\\n- Borrow Interest(100) = 10002 % APY\\n\\n## Rationale\\n\\nA higher cap of the borrow interest rate will allow the marketplace to have a more sustainable equilibrium.\\n\\nSince this will result in overall higher fees coming into the system, in tandem we also suggest lowering the reserve factor from 20% to 10% to incentivize more depositors. This would be submitted as a separate AIP to decouple these two decisions.\\n\\nWe believe a nonlinear interest curve is healthiest long-term and could likely be used by many other assets as well, however this work can be discussed more in the future.\\n\\n## Implementation\\n\\nA deployment of the existing implementation of the Interest Strategy will be used, with the following parameters:\\n\\n    optimalUtilizationRate: new BigNumber(0.75).multipliedBy(oneRay).toFixed(),\\n    baseVariableBorrowRate: new BigNumber(0).multipliedBy(oneRay).toFixed(),\\n    variableRateSlope1: new BigNumber(0.02).multipliedBy(oneRay).toFixed(),\\n    variableRateSlope2: new BigNumber(100).multipliedBy(oneRay).toFixed(),\\n\\n[https://etherscan.io/address/0x509859687725398587147Dd7A2c88d7316f92b02#readContract](https://etherscan.io/address/0x509859687725398587147Dd7A2c88d7316f92b02#readContract)\\n\\n## Copyright\\n\\nCopyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).\\n', 'end_time': 1628359654, 'title': 'Raise Maximum Interest Rate on AMPL Market', 'start_time': 1628102256, 'choices': ['NAY', 'YAE'], 'results': {1: 374539.62}}\n\u003e\u003e\u003e protocol_1.update_proposals(limit=5)\n\u003e\u003e\u003e len(protocol_1.proposals)\n5\n\u003e\u003e\u003e protocol_1.update_proposals(limit=5,retry=4)\n\u003e\u003e\u003e protocol_1.last_update_proposals\n1630960429.839166\n```\n\n#### Update Voters\n```pycon\n\u003e\u003e\u003e protocol_1.update_voters()\n\u003e\u003e\u003e len(protocol_1.voters)\n754\n\u003e\u003e\u003e voters = list(protocol_1.voters.keys())\n\u003e\u003e\u003e voters[:5]\n['0xD34A7095B8aAd4A4A125a2bFaB003A030f319Fc3', '0x865Ba550Cc0E6f3bC82171C42c5a6Ed4Ab975c64', '0x0d64aDd7AA3a19392A8afA3a07dAaF0f7098776D', '0xC2634B9d0A0cFb756cDed34656E09828072A8a9B', '0xCBB08e918e828Bfd46A0E32E3365E80D7502c7D9']\n\u003e\u003e\u003e protocol_1.voters[\"0xD34A7095B8aAd4A4A125a2bFaB003A030f319Fc3\"]\n{'protocols': [{'totalVotesCast': 1, 'protocol': 'aave', 'lastCastPower': 70.10188, 'totalPowerCast': 70.10188, 'firstVoteCast': 1610181292, 'lastVoteCast': 1610181292}, {'totalVotesCast': 2, 'protocol': 'compound', 'lastCastPower': 1.4661654, 'totalPowerCast': 2.9323308, 'firstVoteCast': 1607418487, 'lastVoteCast': 1607418506}, {'totalVotesCast': 1, 'protocol': 'mantraDao', 'lastCastPower': 80937260000, 'totalPowerCast': 80937260000, 'firstVoteCast': 1613545446, 'lastVoteCast': 1613545446}, {'totalVotesCast': 6, 'protocol': 'rarible', 'lastCastPower': 304.63812, 'totalPowerCast': 1814.8164, 'firstVoteCast': 1600495879, 'lastVoteCast': 1608289668}, {'totalVotesCast': 2, 'protocol': 'uniswap', 'lastCastPower': 200, 'totalPowerCast': 400, 'firstVoteCast': 1602922561, 'lastVoteCast': 1603569382}], 'first_voteCast': 1610181292, 'total_votesCast': 1, 'last_voteCast': 1610181292}\n\u003e\u003e\u003e protocol_1.update_voters(limit=5)\n\u003e\u003e\u003e len(protocol_1.voters)\n5\n\u003e\u003e\u003e protocol_1.update_voters(limit=5,retry=4)\n\u003e\u003e\u003e protocol_1.last_update_voters\n1630960558.200357\n```\n\n#### Update Data + Proposals + Voters\n```pycon\n\u003e\u003e\u003e protocol_1.update()\n\u003e\u003e\u003e protocol_1.update(limit=3)\n\u003e\u003e\u003e protocol_1.update(limit=3,retry=4)\n```\n\n### Voter\n\n#### Initializing\n```pycon\n\u003e\u003e\u003e from boardroom import Voter\n\u003e\u003e\u003e voter_1 = Voter(address=\"0xd409ceA9dD8dB30504168063953cE1Fa20748cab\")\n\u003e\u003e\u003e voter_1.last_vote_cast\n1625066741\n\u003e\u003e\u003e voter_1.protocols\n[{'lastCastPower': 147811.42, 'firstVoteCast': 1625066741, 'protocol': 'sushi', 'lastVoteCast': 1625066741, 'totalPowerCast': 147811.42, 'totalVotesCast': 1}]\n```\n\n#### Update Data\n```pycon \n\u003e\u003e\u003e voter_1.update_data()\n\u003e\u003e\u003e voter_1.update_data(retry=4)\n\u003e\u003e\u003e voter_1.last_update_data\n1630960776.79719\n```\n\n#### Update Votes\n```pycon\n\u003e\u003e\u003e voter_1.update_votes()\n\u003e\u003e\u003e len(voter_1.votes)\n1\n\u003e\u003e\u003e voter_1.votes\n{'dm90ZTpzdXNoaTpkZWZhdWx0OnFtczdreWM0a3I2ZTFnc3Njc2s1bXBvZWRma3R3OG9ocXJjYWgzams3bXc3NWs6MHhkNDA5Y2VhOWRkOGRiMzA1MDQxNjgwNjM5NTNjZTFmYTIwNzQ4Y2Fi': {'proposal_refId': 'cHJvcG9zYWw6c3VzaGk6ZGVmYXVsdDpxbXM3a3ljNGtyNmUxZ3NzY3NrNW1wb2VkZmt0dzhvaHFyY2FoM2prN213NzVr', 'protocol': 'sushi', 'power': 147811.42, 'choice': 0, 'proposal_info': {'currentState': 'active', 'startTime': {'timestamp': 1623031200}, 'choices': ['YES', 'YES'], 'endTimestamp': 1684980000, 'events': [], 'title': 'Buy MemePad - https://memepad.co/ - LaunchPad for Meme coins', 'endTime': {'timestamp': 1684980000}, 'startTimestamp': 1623031200}, 'proposal_id': 'QmS7kYC4KR6E1gssCsK5MPoeDfktW8oHqRCaH3jK7mW75K', 'adapter': 'default', 'address': '0xd409ceA9dD8dB30504168063953cE1Fa20748cab'}}\n\u003e\u003e\u003e voter_1.last_update_votes\n1630960887.87681\n\u003e\u003e\u003e voter_1.update_votes(limit=5)\n\u003e\u003e\u003e voter_1.update_votes(limit=5,retry=4)\n\u003e\u003e\u003e len(voter_1.votes)\n1\n```\n\n#### Update Data + Votes\n```pycon\n\u003e\u003e\u003e voter_1.update()\n\u003e\u003e\u003e voter_1.update(limit=4)\n\u003e\u003e\u003e voter_1.update(limit=4,retry=5)\n```\n\n#### Reputation\n```pycon\n\u003e\u003e\u003e voter_1.reputation(\"aave\")\n0\n\u003e\u003e\u003e voter_1.reputation(\"sushi\")\n0\n\u003e\u003e\u003e voter_2 = Voter(address=\"0xb577935e2E630579e926C1d2201E2C6a8603D70b\")\n\u003e\u003e\u003e voter_2.reputation(\"aave\")\n1\n\u003e\u003e\u003e voter_3 = Voter(address=\"0xA7499Aa6464c078EeB940da2fc95C6aCd010c3Cc\")\n\u003e\u003e\u003e voter_3.update_votes()\n\u003e\u003e\u003e voter_3.reputation(\"aave\")\n3.9997581478173947\n```\n[How is the reputation score calculated?](https://github.com/sepandhaghighi/boardroom/blob/master/REPUTATION.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsepandhaghighi%2Fboardroom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsepandhaghighi%2Fboardroom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsepandhaghighi%2Fboardroom/lists"}