1. Tribute Router — appreesh_hook
Splits each tribute from sender to recipient plus vault and raffle cuts. Interface is Anchor + anchor_spl::token_interface so the same code rides with Token-2022 or classic SPL.
Core PDA & accounts
- Config PDA (AppreeshConfig) — one per mint.
- authority: Pubkey — governance or steward.
- mint: Pubkey — SPL or Token-2022 mint used for tributes.
- vault: Pubkey — token account receiving the vault cut.
- raffle_pot: Pubkey — token account receiving the raffle cut.
- fee_bps: u16 — fee in basis points (max 2000 = 20%).
- max_pct: u16 — cap vs balance (max 10_000 = 100%).
- min_tribute: u64 — fee floor in base units.
- rebate_bps: u16 — portion of fee rebated to sender.
- raffle_cut_bps: u16 — portion routed to raffle pot.
- small_gift_threshold: u64 — tributes at or below skip fees.
- opt_out_enabled: bool — allows fee opt-out when enabled.
Instruction set
- initialize — create config.
- tribute — split tribute using vault and raffle logic.
- gift — optional direct transfer bypassing fees.
- update_config — authority updates parameters.