Emit perp fees settled on update_funding. Required to have a full picture of total perp market fees. (#530)

This commit is contained in:
Nicholas Clarke 2023-04-06 22:09:50 -07:00 committed by GitHub
parent 9a77f8d64d
commit 0ba41e3471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 0 deletions

View File

@ -7659,6 +7659,11 @@
"type": "i128",
"index": false
},
{
"name": "feesSettled",
"type": "i128",
"index": false
},
{
"name": "openInterest",
"type": "i64",

View File

@ -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,
}

View File

@ -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(),
});

View File

@ -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",