Skip to content

Feature: Liquidity Mining #203

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

Open
wants to merge 18 commits into
base: upcoming
Choose a base branch
from
Open

Feature: Liquidity Mining #203

wants to merge 18 commits into from

Conversation

@vanitymnm vanitymnm added the liquidity mining Relates to liquidity mining featgure label Mar 7, 2025
@vanitymnm vanitymnm self-assigned this Mar 7, 2025
@vanitymnm vanitymnm changed the title [Liquidity Mining] Diff against mainnet Feature: Liquidity Mining Mar 14, 2025
* optimized reserve (un)packing

* obligation dynamically (un)packs
   
* fixed BPF tests
 
*  using account discriminator
* Improving Reserve pack, unpack in ixs

* Progress with realloc tests

* Adding tests for shares tracking

* Removing unused comment

* More tests

* Addressing clippy review

* Downgrading package lock

* All BPF tests pass

* Fixing repay tests in obligation

* CU units are reverted back to their original values

* Emit program logs on CI

* Adding Suilend test 'test_pool_reward_manager_basic'

* Adding Solend test 'test_pool_reward_manager_multiple_rewards'

* Adding more Suilend tests

* Copying remaining liq. mining tests from Suilend

* Increasing CU budget allowances

* Fixing ix mutable borrows
* Moving logic into respective modules and hiding accessors

* Making some accessors public for tests

* Increasing budget limit

* Adding a test to add pool reward

* Adding borrow position kind
…209)

* Adding test for cancelling reward

* Testing closing pool reward

* Removing outdated TODO

* Fixing clippy issues
* Adds tests for claiming a reward ix

* Fixing clippy complaint
@vanitymnm vanitymnm marked this pull request as ready for review April 10, 2025 14:33
* Edit reward instead of cancel

* Proptest for reward edit

* Renaming cancel to edit

* Adding BPF tests for extending reward period

* Fixing impression in existing tests

* Addressing clippy
@vanitymnm vanitymnm changed the base branch from mainnet to upcoming May 2, 2025 06:49
vanitymnm added 2 commits May 2, 2025 08:56
* Use reward vault as part of the authority PDA seed

* Fixing misleading comments

* Marking TODO as completed
Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 94.35749% with 292 lines in your changes missing coverage. Please review.

Project coverage is 87.08%. Comparing base (8674673) to head (4137879).
Report is 10 commits behind head on upcoming.

Files with missing lines Patch % Lines
.../src/processor/liquidity_mining/upgrade_reserve.rs 0.00% 70 Missing ⚠️
token-lending/cli/src/main.rs 0.00% 37 Missing ⚠️
...rc/processor/liquidity_mining/claim_user_reward.rs 84.23% 29 Missing ⚠️
...en-lending/program/src/processor/account_borrow.rs 78.57% 24 Missing ⚠️
token-lending/sdk/src/instruction.rs 93.16% 19 Missing ⚠️
.../src/state/liquidity_mining/pool_reward_manager.rs 95.09% 19 Missing ⚠️
token-lending/sdk/src/state/obligation.rs 89.41% 18 Missing ⚠️
.../src/processor/liquidity_mining/add_pool_reward.rs 88.52% 14 Missing ⚠️
...rc/processor/liquidity_mining/close_pool_reward.rs 89.47% 14 Missing ⚠️
...src/processor/liquidity_mining/edit_pool_reward.rs 89.16% 13 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff              @@
##           upcoming     #203      +/-   ##
============================================
+ Coverage     83.62%   87.08%   +3.46%     
============================================
  Files            50       72      +22     
  Lines         18704    28029    +9325     
============================================
+ Hits          15641    24410    +8769     
- Misses         3063     3619     +556     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Successfully merging this pull request may close these issues.

1 participant