Skip to content

[Core] Implement deposit function - #850

Open
Trovic1 wants to merge 1 commit into
BCPathway:mainfrom
Trovic1:feature/720-implement-deposit-function
Open

[Core] Implement deposit function#850
Trovic1 wants to merge 1 commit into
BCPathway:mainfrom
Trovic1:feature/720-implement-deposit-function

Conversation

@Trovic1

@Trovic1 Trovic1 commented Aug 27, 2026

Copy link
Copy Markdown

closes #720

…hway#720)

Add vault-style deposit() to WrapperContract that mints shares based on
the current exchange rate (ERC-4626 semantics):

- First deposit bootstraps at 1:1 (assets == shares)
- Subsequent deposits use shares = assets * total_shares / total_assets
- Protected by reentrancy guard and paused/initialized guards
- Emits new Deposit event (emit_deposit in events.rs)
- Full unit tests: happy path (first deposit, post-reward proportional),
  and error paths (zero amount, negative amount, paused, not-initialized)

closes BCPathway#720
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@Trovic1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Core] Implement deposit function

1 participant