Skip to content

release_0.1.11#188

Open
codewithgun wants to merge 5 commits intomainfrom
release_0.1.11
Open

release_0.1.11#188
codewithgun wants to merge 5 commits intomainfrom
release_0.1.11

Conversation

@codewithgun
Copy link
Copy Markdown
Contributor

No description provided.

@codewithgun codewithgun changed the title chore: initial commit for release release_0.1.11 Apr 7, 2026
bangyro and others added 4 commits April 9, 2026 09:11
* feat: implement claim_protocol_fee2

* refactor: move test into dedicated file

* fix: test

* feat: get protocol claim amount along with surplus

* feat: address comments
- consistent account order
- remove unnecessary drop
- remove event_cpi
* chore: bump anchor to v1

* fix: rebase

* chore: update changelog

* chore: formatter remove trailing new line

* fix: comments

* fix: use UncheckedAccount

* fix: deprecated build warning

* fix: rebase

* fix: cargo fmt

* fix: use official anchor despite of emit_cpi warning
@0xSoju2
Copy link
Copy Markdown
Collaborator

0xSoju2 commented Apr 16, 2026

Vault review note (severity: Medium)

Potential transfer-fee accounting divergence in claim_protocol_fee2:

  • In programs/dynamic-bonding-curve/src/instructions/operator/ix_claim_protocol_fee2.rs, amount is deducted from protocol-fee state, then transferred with transfer_checked via transfer_token_from_pool_authority.
  • Unlike cp-amm, this path does not pre-check transfer-fee-excluded amount for Token-2022 transfer-fee mints.

Why it matters:

  • On edge amounts, protocol state can account a claim amount while receiver net amount can be effectively zero/non-intuitive under transfer-fee mechanics.

Suggested fix:

  1. compute transfer-fee-excluded amount from selected mint + amount,
  2. require excluded amount > 0,
  3. then proceed with transfer.

This keeps claim semantics aligned with cp-amm and avoids zero-net-transfer edge cases.

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.

3 participants