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

Added VELO and AERO LP revenue #1377

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

halfdoctor
Copy link
Contributor

Revenue from Protocol owned LP positions in Velodrome and Aerodrome added to Optimism and Base respectively.

TO DO: Backfill past reward data on BASE
TO DO: Query Velodrome and Aerodrome for more accurate estimations on rewards.

@llamatester
Copy link

The sonne-finance adapter exports:


Fees for 2/4/2024
_______________________________________

OPTIMISM 👇
Backfill start time: 1/10/2022
Timestamp: 1712102399 (2024-04-02T23:59:59.000Z)
Daily fees: 12.51 k
└─ Methodology: Fees are calculated from borrowers' interest payments, which are determined by the Annual Percentage Yield (APY) associated with the borrowed asset.
Daily revenue: 1.44 k
└─ Methodology: Revenue is derived as a percentage of collected fees, determined by the reserve factor associated with each asset.
Daily holders revenue: 2.58 k
└─ Methodology: All revenue and VELO/AERO LP rewards are allocated entirely to $SONNE stakers.


BASE 👇
Backfill start time: 31/8/2023
Timestamp: 1712102399 (2024-04-02T23:59:59.000Z)
Daily fees: 2.46 k
└─ Methodology: Fees are calculated from borrowers' interest payments, which are determined by the Annual Percentage Yield (APY) associated with the borrowed asset.
Daily revenue: 338
└─ Methodology: Revenue is derived as a percentage of collected fees, determined by the reserve factor associated with each asset.
Daily holders revenue: 1.65 k
└─ Methodology: All revenue and VELO/AERO LP rewards are allocated entirely to $SONNE stakers.




Done in 11.41s.

@dtmkeng
Copy link
Contributor

dtmkeng commented Apr 3, 2024

is it duplicate at AERO protocol if count reward from aero lp ?

@halfdoctor
Copy link
Contributor Author

is it duplicate at AERO protocol if count reward from aero lp ?

I am not 100% clear what you are asking. But I would like to clarify.

Aerodrome uses swap fees and bribes as revenue. Aerodrome emits AERO to LPs.

SONNE has a protocol owned LP position in Aerodrome(BASE) that gathers AERO rewards.
These rewards are 100% distributed to stakers(holders). That is what I have included in the above code.
This is similar to SONNE owned LP position on Velodrome(Optimism).
There is a better description here as well, https://docs.sonne.finance/tokenomics/staking-and-revenue-sharing

@dtmkeng
Copy link
Contributor

dtmkeng commented Apr 4, 2024

is it duplicate at AERO protocol if count reward from aero lp ?

I am not 100% clear what you are asking. But I would like to clarify.

Aerodrome uses swap fees and bribes as revenue. Aerodrome emits AERO to LPs.

SONNE has a protocol owned LP position in Aerodrome(BASE) that gathers AERO rewards. These rewards are 100% distributed to stakers(holders). That is what I have included in the above code. This is similar to SONNE owned LP position on Velodrome(Optimism). There is a better description here as well, https://docs.sonne.finance/tokenomics/staking-and-revenue-sharing

yes Aerodrome is count your lp for thier value too

@halfdoctor
Copy link
Contributor Author

halfdoctor commented Apr 4, 2024

No this is not a duplicate.

  1. Aerodrome only counts Bribes( fees/aerodrome/bribes.ts) and swap fees (fees/aerodrome/index.ts) as Revenue.
  2. Aerodrome does count SONNE-finance partly owned LP(USDC/SONNE) as LP TVL(dexs/aerodrome/index.ts). But that doesn't matter. In the above code sonne-finance is not counting that for TVL.
  3. Sonne-finance has a protocol owned LP position(USDC/SONNE) on Aerodrome, and are getting weekly reward AERO emissions. This is part of SONNE revenue. This is what we are adding in above code. This is not counted before by Aerodrome, so there is no duplication.
  4. Please note that LP AERO emission rewards go to LPs. Sonne-finance being an LP has a right to claim those AERO rewards and these are the rewards being added. (see description in Aerodrome docs as well.)
  5. This is the same model for velodrome as well.

@0xngmi
Copy link
Member

0xngmi commented Apr 4, 2024

This makes sense but when users look at sonne fees and revenue they expect to see the revenue from protocol usage, not revenue from farming token emissions of another protocol using treasury funds

Thats why we won't include it in revenue, but this revenue can be returned under dailyTreasuryFarmingRevenue and then users will be able to choose whether to include it

@llamatester
Copy link

The sonne-finance adapter exports:


Fees for 4/4/2024
_______________________________________

OPTIMISM 👇
Backfill start time: 1/10/2022
Timestamp: 1712275199 (2024-04-04T23:59:59.000Z)
Daily fees: 13.19 k
└─ Methodology: Fees are calculated from borrowers' interest payments, which are determined by the Annual Percentage Yield (APY) associated with the borrowed asset.
Daily revenue: 1.52 k
└─ Methodology: Revenue is derived as a percentage of collected fees, determined by the reserve factor associated with each asset. Revenue is allocated entirely to stakers.
Daily treasury farming revenue: 1.39 k
└─ Methodology: Protocol owned LP farming rewards (VELO/AERO) are allocated entirely to $SONNE stakers.


BASE 👇
Backfill start time: 31/8/2023
Timestamp: 1712275199 (2024-04-04T23:59:59.000Z)
Daily fees: 2.87 k
└─ Methodology: Fees are calculated from borrowers' interest payments, which are determined by the Annual Percentage Yield (APY) associated with the borrowed asset.
Daily revenue: 397
└─ Methodology: Revenue is derived as a percentage of collected fees, determined by the reserve factor associated with each asset. Revenue is allocated entirely to stakers.
Daily treasury farming revenue: 1.66 k
└─ Methodology: Protocol owned LP farming rewards (VELO/AERO) are allocated entirely to $SONNE stakers.




Done in 97.08s.

@halfdoctor
Copy link
Contributor Author

This makes sense but when users look at sonne fees and revenue they expect to see the revenue from protocol usage, not revenue from farming token emissions of another protocol using treasury funds

Thats why we won't include it in revenue, but this revenue can be returned under dailyTreasuryFarmingRevenue and then users will be able to choose whether to include it

Thank you for the clarification.
I agree with that method and have accordingly modified the code.
Please note that I had to add to adapters/types.ts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants