Skip to content

Commit e4cb48f

Browse files
committed
update maple syrup revenue
1 parent 23aec1a commit e4cb48f

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

fees/maple-finance.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ const contract_open_term_loan_manager_eth = '0xe3aac29001c769fafcef0df072ca396e3
1818

1919
const CLAIMED_FUNDS_DISTRIBUTED_EVENT = 'event ClaimedFundsDistributed(address indexed loan_, uint256 principal_, uint256 netInterest_, uint256 delegateManagementFee_, uint256 delegateServiceFee_, uint256 platformManagementFee_, uint256 platformServiceFee_)';
2020

21+
function getHoldersRevenueShare(date: number): number {
22+
if (date < 1761955200) { // 2025-11-01
23+
return 0
24+
} else {
25+
return 0.25;
26+
}
27+
}
28+
2129
const fetchFees = async (options: FetchOptions) => {
2230
const { getLogs } = options
2331
const dailyFees = options.createBalances();
@@ -91,13 +99,18 @@ const fetchFees = async (options: FetchOptions) => {
9199
dailyRevenue.add(b.contract_address, b.value)
92100
}
93101
});
102+
103+
const holdersShare = getHoldersRevenueShare(options.startOfDay);
104+
const dailyHoldersRevenue = dailyRevenue.clone(holdersShare);
105+
const dailyProtocolRevenue = dailyRevenue.clone(1 - holdersShare);
94106

95107
return {
96108
dailyFees,
97109
dailyUserFees: dailyFees,
98110
dailyRevenue,
99-
dailyProtocolRevenue: dailyRevenue,
100-
dailySupplySideRevenue
111+
dailySupplySideRevenue,
112+
dailyProtocolRevenue,
113+
dailyHoldersRevenue,
101114
}
102115
}
103116

@@ -115,6 +128,7 @@ const adapters: SimpleAdapter = {
115128
Revenue: "Total revenue flowing to Maple protocol treasuries, including fees from loan management, delegate fees, and platform fees collected from various pool strategies.",
116129
ProtocolRevenue: "Total revenue flowing to Maple protocol treasuries.",
117130
SupplySideRevenue: "Interest earned by liquidity providers/depositors in Maple pools from net interest distributions on loans.",
131+
HoldersRevenue: "Maple use 25% from protocol revenue to buy back SYRUP tokens from MIP-019.",
118132
}
119133
}
120134
export default adapters;

0 commit comments

Comments
 (0)