Created
August 27, 2019 11:46
-
-
Save ps2-controller/aab3924cae72f611878d756ae7238111 to your computer and use it in GitHub Desktop.
Fixed-Fee-CDP Market sample code
This file contains 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
struct Offer { | |
// sorting information | |
uint next; // points to id of next higher offer | |
uint previous; // points to id of previous lower offer | |
// economic information | |
uint rate; // (minimum) fixed rate for which this offer is valid | |
uint amount; // amount of ether associated with this offer | |
address owner; | |
} | |
mapping(uint => Offer) public offers; // doubly linked list of sorted offer ids | |
uint public best; // head of offers | |
uint public worst; // tail of offers | |
uint nextId = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment