sherlock-audit / 2024-08-woofi-solana-deployment-judging

2 stars 2 forks source link

zigtur - An admin authority initializing RebateInfo will make claim_rebate_fee unusable #13

Open sherlock-admin3 opened 1 month ago

sherlock-admin3 commented 1 month ago

zigtur

High

An admin authority initializing RebateInfo will make claim_rebate_fee unusable

Summary

A ClaimRebateFee constraint enforces that rebate_info.authority == rebate_manager.authority. This will always be false when an admin authority initialized the rebate_info, leading the rebate_info.rebate_authority to not be able to claim their rebate fee.

Root Cause

In claim_rebate_fee.rs:26, there is an incorrect constraint.

Internal pre-conditions

  1. An admin authority needs to initialize the rebate_info through the create_rebate_info instruction. It is made possible through the constraint at create_rebate_info.rs#L17.

External pre-conditions

None.

Attack Path

No response

Impact

PoC

No response

Mitigation

This constraint should be deleted. Fixing it to check if the rebate_info.authority is an admin authority will lead to the same issue being triggered when admin authorities are updated.

toprince commented 1 month ago

Need further investigation.

sherlock-admin2 commented 1 month ago

The protocol team fixed this issue in the following PRs/commits: https://github.com/woonetwork/WOOFi_Solana/pull/28

gjaldon commented 3 weeks ago

Issue is fixed. This change fixes the issue by also allowing admin authorities to claim rebate fees.