Skip to content

Instantly share code, notes, and snippets.

@osarrouy
Last active August 28, 2019 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save osarrouy/8952d6a8750db8e63b1d1ad67c4e53a1 to your computer and use it in GitHub Desktop.
Save osarrouy/8952d6a8750db8e63b1d1ad67c4e53a1 to your computer and use it in GitHub Desktop.
Fundraising React State | After Reducer
{
"constants": {
"PPM": BigNumber
},
"contracts": {
"marketMaker": address,
"formula": address,
"tap": address,
"reserve": address
},
"collaterals": {
"dai": {
"address": String,
"symbol": String,
"decimals": Number,
"reserveRatio": BigNumber,
"virtualSupply": BigNumber,
"virtualBalance": BigNumber,
"actualBalance": BigNumber || "this one needs to fetched from frontend for now ...",
"toBeClaimed": BigNumber,
"realBalance": BigNumber || "= actualBalance + toBeClaimed"
"overallBalance": BigNumber || "=realBalance + virtualBalance",
"tap" : {
"rate": BigNumber,
"floor": BigNumber
},
"slippage": BigNumber,
},
"ant": {
}
},
"bondedToken": {
"address": String,
"symbol": String,
"decimals": Number,
"totalSupply": BigNumber,
"toBeMinted": BigNumber,
"realSupply": BigNumber || "= totalSupply + toBeMinted"
"overallSupply": {
"dai": BigNumber || "=realSupply + virtualBalance(dai)",
"ant": BigNumber || "=realSupply + virtualBalance(ant)",
},
},
},
"batches": {
"id": Number,
"timestamp": Date,
"collateral": address || String,
"supply": BigNumber,
"balance": BigNumber,
"reserveRatio": BigNumber,
"totalBuySpend": BigNumber,
"totalBuyReturn": BigNumber,
"totalSellSpend": BigNumber,
"totalSellReturn": BigNumber,
"buyPrice": BigNumber,
"sellPrice": BigNumber,
},
"orders": {
"transactionHash": String,
"timestamp": Date,
"batchId:" Number,
"collateral": address || String,
"user": String,
"type": String || "BUY or SELL",
"state": String || "PENDING or OVER or RETURNED",
"amount": BigNumber || "always expressed in number of bonds",
"value": BigNumber || "always expressed in number of collaterals",
"price": BigNumber || "derived in app-reducer from batch parameters"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment