BlockPo / BlockPo-to-Tradelayer

Incubation Repo for the TradeLayer protocol, 0.2.0
http://www.tradelayer.org
Other
8 stars 8 forks source link

RPC for Insurance Cache #237

Closed patrickdugan closed 1 year ago

patrickdugan commented 4 years ago

Parameters: contractid

Returns JSON:

{ contractid: contractid, collateralid: collateralid, collateralInInsuranceCache: 0, contractShortfall: 0.025 //the contract is undercapitalized by 2.5%, 0 is fully capitalized, avgLiqPrice: 7150.5 //the rounded value of the average price of all the liquidation orders unfilled cumulativePayIn: 12345 InsurancePayOuts: [ {block: 1434321, amount: 4321 }, { block: 1437850, amount: 8024 } ] }

patrickdugan commented 3 years ago

We should be able to support this RPC functionality now even prior to the implementation of to the injection mechanism of paying out from insurance.

patrickdugan commented 2 years ago

We're going to keep this open until we can inventory the needed RPCs in testing but we should be close here.