This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Log] (augur~5a11b65b.4b0b5a17b0971858e35d.js, line 1) | |
******************************************* | |
DEBUGGING INFO | |
******************************************* | |
BUILD INFORMATION | |
commit -- 0909806e493bf78f99df53993a9160bea0ae280a | |
-- https://github.com/AugurProject/augur/commit/0909806e493bf78f99df53993a9160bea0ae280a | |
network -- mainnet | |
------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Log] (augur~5a11b65b.4b0b5a17b0971858e35d.js, line 1) | |
******************************************* | |
DEBUGGING INFO | |
******************************************* | |
BUILD INFORMATION | |
commit -- 0909806e493bf78f99df53993a9160bea0ae280a | |
-- https://github.com/AugurProject/augur/commit/0909806e493bf78f99df53993a9160bea0ae280a | |
network -- mainnet | |
------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Log] (augur~5a11b65b.4b0b5a17b0971858e35d.js, line 1) | |
******************************************* | |
DEBUGGING INFO | |
******************************************* | |
BUILD INFORMATION | |
commit -- 0909806e493bf78f99df53993a9160bea0ae280a | |
-- https://github.com/AugurProject/augur/commit/0909806e493bf78f99df53993a9160bea0ae280a | |
network -- mainnet | |
------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint no-console: ["error", { allow: ["log"] }] */ | |
/* eslint max-nested-callbacks: ["error", 5] */ | |
'use strict' | |
// would publish every 24 hr and also publish on connection to a new peer | |
const domReady = require('detect-dom-ready') | |
const createNode = require('./create-node') | |
const FloodSub = require('libp2p-floodsub') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const PeerInfo = require('peer-info') | |
const Node = require('./browser-bundle') | |
function createNode (callback) { | |
PeerInfo.create((err, peerInfo) => { | |
if (err) { | |
return callback(err) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const WebRTCStar = require('libp2p-webrtc-star') | |
const WebSockets = require('libp2p-websockets') | |
const FloodSub = require('libp2p-floodsub') | |
const WebSocketStar = require('libp2p-websocket-star') | |
const Mplex = require('libp2p-mplex') | |
const SPDY = require('libp2p-spdy') | |
const SECIO = require('libp2p-secio') | |
const Bootstrap = require('libp2p-bootstrap') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### INVALID FILTER: | |
Get 0x bids (remove all bids where gas fees are > 1% of the trade's value, we should do this for all books on augur in v2) | |
valid_revenue = best_bid_quantity*range*(1-reporter_fee-creator_fee)*e^(-.15*time_til_market_finalizes_in_years) - gasToDoATrade - gasToClaimWinnings | |
valid_cost = best_bid_quantity * (max - best_bid) | |
valid_profit = valid_revenue - valid_cost | |
if valid_profit >= 0: | |
show_market | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getLiquidityTokens(marketId, outcome, spreadPercent) { | |
// we adjust for fees by ask / (1 + totalFee%) and bid / (1 - totalFee%) | |
// also the share price should be converted to non display prices so a scalar from -100 to 200, -100 would be 0, 200 would be 300. | |
const orderBook = feeAdjust(sharePrice(select * | |
from orders where marketId and outcome)); | |
// also add orders to the book for infinite liquidity (so maybe just whatever the biggest js value is) at the min and max, for bids we add it at the min, for asks we add it at the max | |
let liquidityTokens = 0 eth; // ie. proceeds from selling complete sets | |
let liquidityTokenCost = 0 eth; // ie. cost for complete sets | |
const sellIncrementQuantity = numCompleteSetsForNEthTokens( | |
SELL_INCREMENT_COST |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Whenever user does a trade of trade(outcome, price, amount) (regardless if due to getting filled or them doing a taker order): | |
# amount owned is display amount, raw is raw amount | |
# prior means prior to a trade | |
Goto (goto considered harmful but screw it this is pseudocode) outcome in UI: | |
if(amount > 0): | |
if(amount_owned >= 0): | |
amount_of_shares_closed = 0 | |
prior_shares_remaining = amount_owned |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.11; | |
import './StandardToken.sol'; | |
import './Ownable.sol'; | |
import './ERC20Basic.sol'; | |
/** | |
* @title Mintable token |