Skip to content

Commit

Permalink
add paper
Browse files Browse the repository at this point in the history
  • Loading branch information
pdaian committed Jul 18, 2018
1 parent 28198a3 commit 940f3c8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
Binary file added paper.pdf
Binary file not shown.
25 changes: 14 additions & 11 deletions truffle/contracts/ProtocolGasFutures.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,23 @@ contract ProtocolGasFutures {
// Assume average block time is 15 seconds
issueToken(height+5760, gasLimit); // 24 hours
issueToken(height+40320, gasLimit); // 7 days
issueToken(height+175200, gasLimit); // ~ month
issueToken(height+175200, gasLimit); // 1 month
issueToken(height+2102400, gasLimit); // 365 days
}

function settle() public returns (bool) {
uint[] ids_to_settle = ids[block.number];
for (uint i = 0; i < ids_to_settle.length; i++) {
bool executed = token.settle(ids_to_settle[i]);
if (!executed)
return false;
}

return true;
}



function setDex(Dex _dex) public {
dex = _dex;
}
Expand All @@ -62,14 +75,4 @@ contract ProtocolGasFutures {

}

function settle() public returns (bool) {
uint[] ids_to_settle = ids[block.number];
for (uint i = 0; i < ids_to_settle.length; i++) {
bool executed = token.settle(ids_to_settle[i]);
if (!executed)
return false;
}

return true;
}
}

0 comments on commit 940f3c8

Please sign in to comment.