Skip to content

Commit

Permalink
Bonzo Fee Dimensions Updates
Browse files Browse the repository at this point in the history
Updated the source API endpoint
to point to permanent data source.

Fixed a few typos in the methodology
descriptions.

Additional code tweakd suggested
per codde review
  • Loading branch information
bugbytesinc committed Jan 6, 2025
1 parent 26ac63d commit c14e3d9
Showing 1 changed file with 9 additions and 9 deletions.
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

0 comments on commit c14e3d9

Please sign in to comment.