Skip to content

test: add flash loan repayment coverage#464

Open
Gezziy wants to merge 1 commit into
ceejaylaboratory:mainfrom
Gezziy:rust-test-unit
Open

test: add flash loan repayment coverage#464
Gezziy wants to merge 1 commit into
ceejaylaboratory:mainfrom
Gezziy:rust-test-unit

Conversation

@Gezziy
Copy link
Copy Markdown

@Gezziy Gezziy commented May 28, 2026

closes #405
##Summary
Adds focused Rust unit coverage for flash loan success and failure paths.
Covers single-asset repayment, custom fee behavior, principal-only underpayment, batch repayment, partial batch repayment, and duplicate-token fee accounting.
Hardens flash loan fee and repayment calculations with shared checked helpers.
Fixes duplicate-token batch repayment verification by aggregating required repayment per token.
Keeps Kani verification gating clean for normal Rust test/build runs.

##Reason
This prepares the flash loan contract for testnet readiness by verifying repayment invariants and fee enforcement across single and batch loan flows.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 28, 2026

@Gezziy 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.

[Smart Contracts] Rust Unit Tests for Flash Loan

2 participants