Emit perp fees settled on update_funding. Required to have a full picture of total perp market fees. (#530)
This commit is contained in:
parent
9a77f8d64d
commit
0ba41e3471
|
@ -7659,6 +7659,11 @@
|
|||
"type": "i128",
|
||||
"index": false
|
||||
},
|
||||
{
|
||||
"name": "feesSettled",
|
||||
"type": "i128",
|
||||
"index": false
|
||||
},
|
||||
{
|
||||
"name": "openInterest",
|
||||
"type": "i64",
|
||||
|
|
|
@ -146,6 +146,7 @@ pub struct PerpUpdateFundingLog {
|
|||
pub price: i128,
|
||||
pub stable_price: i128,
|
||||
pub fees_accrued: i128,
|
||||
pub fees_settled: i128,
|
||||
pub open_interest: i64,
|
||||
pub instantaneous_funding_rate: i128,
|
||||
}
|
||||
|
|
|
@ -317,6 +317,7 @@ impl PerpMarket {
|
|||
price: oracle_price.to_bits(),
|
||||
stable_price: self.stable_price().to_bits(),
|
||||
fees_accrued: self.fees_accrued.to_bits(),
|
||||
fees_settled: self.fees_settled.to_bits(),
|
||||
open_interest: self.open_interest,
|
||||
instantaneous_funding_rate: funding_rate.to_bits(),
|
||||
});
|
||||
|
|
|
@ -7659,6 +7659,11 @@ export type MangoV4 = {
|
|||
"type": "i128",
|
||||
"index": false
|
||||
},
|
||||
{
|
||||
"name": "feesSettled",
|
||||
"type": "i128",
|
||||
"index": false
|
||||
},
|
||||
{
|
||||
"name": "openInterest",
|
||||
"type": "i64",
|
||||
|
@ -16344,6 +16349,11 @@ export const IDL: MangoV4 = {
|
|||
"type": "i128",
|
||||
"index": false
|
||||
},
|
||||
{
|
||||
"name": "feesSettled",
|
||||
"type": "i128",
|
||||
"index": false
|
||||
},
|
||||
{
|
||||
"name": "openInterest",
|
||||
"type": "i64",
|
||||
|
|
Loading…
Reference in New Issue