Coder Social home page Coder Social logo

ichi-governance's People

Contributors

37aces avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ryukish 3mp8r3

ichi-governance's Issues

get amount of ichi a wallet has staked in our farm for ICHI LP

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);

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.