Skip to content

feat: implement yield-bearing token support with proportional distribution#91

Merged
JerryIdoko merged 2 commits intoVesting-Vault:mainfrom
rocknwa:feature/yield-bearing-token
Feb 25, 2026
Merged

feat: implement yield-bearing token support with proportional distribution#91
JerryIdoko merged 2 commits intoVesting-Vault:mainfrom
rocknwa:feature/yield-bearing-token

Conversation

@rocknwa
Copy link
Copy Markdown
Contributor

@rocknwa rocknwa commented Feb 25, 2026

Summary

Added full support for yield-bearing tokens in the vesting contract.

Key Changes

  • Yield is now calculated only on the vault-owned portion of the contract balance (current_balance - admin_balance).
  • Beneficiaries receive their principal + proportional share of any yield on every claim (including partial and auto-claim).
  • Multiple vaults share yield fairly.
  • Rescue functionality remains fully functional for non-yield tokens and is correctly blocked for the main yield token.
  • Updated claim logic in 3 places + added comprehensive tests.

Testing

  • cargo test30/30 passing
  • New yield tests verify proportional distribution, partial claims, multiple vaults, and rescue protection.

Closes #60
image

rocknwa and others added 2 commits February 25, 2026 16:21
…ution

- Added vault_portion logic in claim_tokens, claim_as_delegate & auto_claim
- Yield now distributed only to beneficiaries (admin balance excluded)
- Rescue still works for non-yield tokens, blocked for main token
- Added 4 new yield demonstration tests
- All 30 tests now passing

Closes Vesting-Vault#60
@JerryIdoko JerryIdoko merged commit fc82e49 into Vesting-Vault:main Feb 25, 2026
1 check failed
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.

#34 Issue 34: [Logic] Handle Yield-Bearing Tokens

2 participants