Contract Overview
Balance:
0 Ether
EtherValue:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash |
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|
0x90c257fd77a26fc819ca84addaeb8e6fcb0b00ad660c70b58f4daf563faab236 | 11772277 | 34 days 23 hrs ago | Stabilize Finance: Deployer | IN | Contract Creation | 0 Ether | 0.033565932 |
[ Download CSV Export ]
Contract Name:
StabilizeGovernanceCalculator
Compiler Version
v0.6.6+commit.6c089d02
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-02-01 */ // This governance contract calculcates total STBZ held by a particular address // It first gets the STBZ tokens held in wallet // Then STBZ held in staking pool // Then LP tokens held in wallet to calculate STBZ held by user // Finally LP tokens held in operator contract pool pragma solidity ^0.6.6; interface Operator { function poolBalance(uint256, address) external view returns (uint256); } interface StakingPool { function poolBalance(address) external view returns (uint256); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); } contract StabilizeGovernanceCalculator { address constant operatorAddress = address(0xEe9156C93ebB836513968F92B4A67721f3cEa08a); address constant stbzAddress = address(0xB987D48Ed8f2C468D52D6405624EADBa5e76d723); address constant uniLpAddress = address(0xDB28312a8d26D59978D9B86cA185707B1A26725b); address constant stakingAddress = address(0x8c17bE13e034f7fa2a6496bC83B6010be6305204); function calculateTotalSTBZ(address _address) external view returns (uint256) { IERC20 stbz = IERC20(stbzAddress); uint256 mySTBZ = stbz.balanceOf(_address); // First get the token balance of STBZ in the wallet mySTBZ = mySTBZ + StakingPool(stakingAddress).poolBalance(_address); // Get STBZ being staked IERC20 lp = IERC20(uniLpAddress); uint256 myLP = lp.balanceOf(_address); // Get amount of LP in wallet myLP = myLP + Operator(operatorAddress).poolBalance(0, _address); // Now we have our LP balance and must calculate how much STBZ we have in it uint256 stbzInLP = stbz.balanceOf(uniLpAddress); stbzInLP = stbzInLP * myLP / lp.totalSupply(); return mySTBZ + stbzInLP; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"calculateTotalSTBZ","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506103ef806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063db1b258214610030575b600080fd5b6100566004803603602081101561004657600080fd5b50356001600160a01b0316610068565b60408051918252519081900360200190f35b604080516370a0823160e01b81526001600160a01b0383166004820152905160009173b987d48ed8f2c468d52d6405624eadba5e76d72391839183916370a0823191602480820192602092909190829003018186803b1580156100ca57600080fd5b505afa1580156100de573d6000803e3d6000fd5b505050506040513d60208110156100f457600080fd5b5051604080516303455daf60e51b81526001600160a01b03871660048201529051919250738c17be13e034f7fa2a6496bc83b6010be6305204916368abb5e091602480820192602092909190829003018186803b15801561015457600080fd5b505afa158015610168573d6000803e3d6000fd5b505050506040513d602081101561017e57600080fd5b5051604080516370a0823160e01b81526001600160a01b03871660048201529051929091019173db28312a8d26d59978d9b86ca185707b1a26725b9160009183916370a08231916024808301926020929190829003018186803b1580156101e457600080fd5b505afa1580156101f8573d6000803e3d6000fd5b505050506040513d602081101561020e57600080fd5b50516040805163351e7cb360e01b8152600060048201526001600160a01b0389166024820152905191925073ee9156c93ebb836513968f92b4a67721f3cea08a9163351e7cb391604480820192602092909190829003018186803b15801561027557600080fd5b505afa158015610289573d6000803e3d6000fd5b505050506040513d602081101561029f57600080fd5b5051604080516370a0823160e01b815273db28312a8d26d59978d9b86ca185707b1a26725b6004820152905192909101916000916001600160a01b038716916370a0823191602480820192602092909190829003018186803b15801561030457600080fd5b505afa158015610318573d6000803e3d6000fd5b505050506040513d602081101561032e57600080fd5b5051604080516318160ddd60e01b815290519192506001600160a01b038516916318160ddd91600480820192602092909190829003018186803b15801561037457600080fd5b505afa158015610388573d6000803e3d6000fd5b505050506040513d602081101561039e57600080fd5b5051818302816103aa57fe5b0493909301969550505050505056fea2646970667358221220e9f5dddea918fbfb55ca78eb28221085b816ec7d6a611be240dd208221d9784964736f6c63430006060033
Deployed ByteCode Sourcemap
674:1196:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;674:1196:0;;;;;;;;;;;;;;;;12:1:-1;9;2:12;1096:769:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1096:769:0;-1:-1:-1;;;;;1096:769:0;;:::i;:::-;;;;;;;;;;;;;;;;;1246:24;;;-1:-1:-1;;;1246:24:0;;-1:-1:-1;;;;;1246:24:0;;;;;;;;1165:7;;858:42;;1165:7;;858:42;;1246:14;;:24;;;;;;;;;;;;;;;858:42;1246:24;;;2:2:-1;;;;27:1;24;17:12;2:2;1246:24:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1246:24:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1246:24:0;1352:49;;;-1:-1:-1;;;1352:49:0;;-1:-1:-1;;;;;1352:49:0;;;;;;;;1246:24;;-1:-1:-1;1040:42:0;;1352:39;;:49;;;;;1246:24;;1352:49;;;;;;;;1040:42;1352:49;;;2:2:-1;;;;27:1;24;17:12;2:2;1352:49:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1352:49:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1352:49:0;1495:22;;;-1:-1:-1;;;1495:22:0;;-1:-1:-1;;;;;1495:22:0;;;;;;;;1343:58;;;;;948:42;;1437:9;;948:42;;1495:12;;:22;;;;;1352:49;;1495:22;;;;;;;948:42;1495:22;;;2:2:-1;;;;27:1;24;17:12;2:2;1495:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1495:22:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1495:22:0;1572:50;;;-1:-1:-1;;;1572:50:0;;1610:1;1572:50;;;;-1:-1:-1;;;;;1572:50:0;;;;;;;;1495:22;;-1:-1:-1;769:42:0;;1572:37;;:50;;;;;1495:22;;1572:50;;;;;;;;769:42;1572:50;;;2:2:-1;;;;27:1;24;17:12;2:2;1572:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1572:50:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1572:50:0;1738:28;;;-1:-1:-1;;;1738:28:0;;948:42;1738:28;;;;;;1565:57;;;;;1719:16;;-1:-1:-1;;;;;1738:14:0;;;;;:28;;;;;1572:50;;1738:28;;;;;;;;:14;:28;;;2:2:-1;;;;27:1;24;17:12;2:2;1738:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1738:28:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1738:28:0;1806:16;;;-1:-1:-1;;;1806:16:0;;;;1738:28;;-1:-1:-1;;;;;;1806:14:0;;;;;:16;;;;;1738:28;;1806:16;;;;;;;;:14;:16;;;2:2:-1;;;;27:1;24;17:12;2:2;1806:16:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1806:16:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1806:16:0;1788:15;;;1806:16;1788:34;;;;;1840:17;;;;;1096:769;-1:-1:-1;;;;;;1096:769:0:o
Swarm Source
ipfs://e9f5dddea918fbfb55ca78eb28221085b816ec7d6a611be240dd208221d97849
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.