Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bonzo/bonzo finance update #2286

Merged
merged 4 commits into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions fees/bonzo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import BigNumber from "bignumber.js";
import { httpGet } from "../../utils/fetchURL";

const fetch = async () => {
const res = await httpGet("https://bonzo-data-api-eceac9d8a2aa.herokuapp.com/stats");
const res = await httpGet("https://data.bonzo.finance/stats");
const timestamp = parseFloat(res.timestamp_end);
// Portion of intrest payments sent to the protocol over the 24hr period.
const total_protocol_fees = BigNumber(res.total_protocol_fees.usd_wad);
const total_protocol_fees = new BigNumber(res.total_protocol_fees.usd_wad);
// Total of earned intrest for liquidity providers over the 24hr period.
const total_intrest_earned = BigNumber(res.total_intrest_earned.usd_wad);
const total_intrest_earned = new BigNumber(res.total_intrest_earned.usd_wad);
// Total of just the premium paid back when flash loan borrowing, does not included ammount borrowed
const total_flash_loan_fees = BigNumber(res.total_flash_loan_fees.usd_wad);
const total_flash_loan_fees = new BigNumber(res.total_flash_loan_fees.usd_wad);
// Total of just the bonus portion given to liquidators
const total_liquidation_bonuses = BigNumber(res.total_liquidation_bonuses.usd_wad);
const total_liquidation_bonuses = new BigNumber(res.total_liquidation_bonuses.usd_wad);
/*
Other Metrics reported that are not presently exposed

Expand Down Expand Up @@ -44,10 +44,10 @@ const adapter = {
runAtCurrTime: true,
meta: {
methodology: {
Fees: 'Intrest and Flash Loan fees plus liquidation bonuses in USD',
UserFees: 'Intrest and Flash Loan fees plus liquidation bonuses in USD',
ProtocolRevenue: 'Portion of intrest rate fees and flash loan fees to Protocol Treasury in USD',
SupplySideRevenue: 'Portion of intrest rate fees to liquidity providers in USD'
Fees: 'Interest and Flash Loan fees plus liquidation bonuses in USD',
UserFees: 'Interest and Flash Loan fees plus liquidation bonuses in USD',
ProtocolRevenue: 'Portion of interest rate fees and flash loan fees to Protocol Treasury in USD',
SupplySideRevenue: 'Portion of interest rate fees to liquidity providers in USD'
}
}
}
Expand Down
Loading