ichi-governance's People
ichi-governance's Issues
get amount of ichi a wallet has staked in our farm for ICHI LP
farm contract - https://etherscan.io/address/0x275dfe03bc036257cd0a713ee819dbd4529739c8
call userinfo(uint256 pid, address wallet)
Here are the farm IDs which have ICHI LP
1 - 80/20 ICHI-ETH Balancer pool https://etherscan.io/address/0x58378f5F8Ca85144ebD8e1E5e2ad95B02D29d2BB
3 - ICHI-ETH Balancer Smart Pool https://etherscan.io/address/0x46935b2489d1468A580CcC3ccbA11D1eb7737199
4 - ICHI-ETH Sushi https://etherscan.io/address/0x9cD028B1287803250B1e226F0180EB725428d069
5 - ICHI-ETH Uniswap https://etherscan.io/address/0xd07D430Db20d2D7E0c4C11759256adBCC355B20C
6 - ICHI-BNT Bancor https://etherscan.io/address/0x563f6e19197A8567778180F66474E30122FD702A
get ichi staked in xichi for a wallet
xichi contract - https://etherscan.io/address/0x70605a6457B0A8fBf1EEE896911895296eAB467E
how it is done currently in ichiPowah can be reused.
uint256 xIchi_totalIchi = ichi.balanceOf(address(0x70605a6457B0A8fBf1EEE896911895296eAB467E));
uint256 xIchi_balance = stake.balanceOf(owner_wallet_address);
uint256 xIchi_total = stake.totalSupply();
// xICHI voting power is the users ICHI share in the stake
uint256 xIchi_powah = xIchi_totalIchi.mul(xIchi_balance).div(xIchi_total);
ability to add ways to count ichi in other farms
example would be 1inch farm.
1inch farm contract - https://etherscan.io/address/0x7ded1b278d244f707214759c45c1540834890e95
ichi-1inch LP - https://etherscan.io/address/0x1dce26f543e591c27717e25294aebbf59ad9f3a5
create a ichipowah hub
this is the root contract snapshot will point to. It will call all the satellite contracts which has totalSupply and balanceOf(address) as well.
it needs to support as public view functions
balanceOf(address) - returns number of votes per user by iterating all satellite contracts
totalSupply() - returns total votes in system by iterating all satellite contracts
needs to have an owner which can add/remove/update satellite contracts
values needed to add/remove/update - token address and contract address.
only question i have is do we handle multiplier in the hub or in the satellite contracts?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.