Closed RnkSngh closed 2 months ago
[!WARNING]
Rate limit exceeded
@RnkSngh has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 47 seconds before requesting another review.
How to resolve this issue?
After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.How do rate limits work?
CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://coderabbit.ai/docs/faq) for further information.Commits
Files that changed from the base of the PR and between 88919ebe4fd7857f743e80bc3cb5303756ce6326 and ab8e500b5122c8ec9c27d67b1e804449fdb7986b.
The updates include the introduction of a minimumFeeThreshold
modifier in the FeeVault
contract to enforce a minimum transaction fee of 1 gwei, preventing spam attacks. The IFeeVault
interface has been modified to change the error message from NoFeeSent()
to FeeThresholdNotMet()
. Additionally, the project version in package.json
has been incremented from 3.0.3
to 3.0.4
, and new tests have been added to ensure compliance with the fee requirements.
File | Change Summary |
---|---|
contracts/core/FeeVault.sol | Added minimumFeeThreshold modifier; updated depositSendPacketFee and depositOpenChannelFee functions to use this modifier. Updated documentation comments. |
contracts/interfaces/IFeeVault.sol | Changed error declaration from NoFeeSent() to FeeThresholdNotMet() . |
package.json | Updated version from 3.0.3 to 3.0.4 . |
test/FeeVault.t.sol | Added new import for IFeeVault ; modified gasFee1 to a minimum of 1 gwei ; added testRevert_BelowFeeThreshold function. |
sequenceDiagram
participant User
participant FeeVault
participant IFeeVault
User->>FeeVault: depositSendPacketFee(1 gwei)
FeeVault->>FeeVault: minimumFeeThreshold check
alt Fee meets threshold
FeeVault->>User: Transaction successful
else Fee below threshold
FeeVault->>User: revert with FeeThresholdNotMet()
end
🐇 "In the vault where fees do dwell,
A threshold set to guard us well.
One gwei must be sent with care,
To keep the spammers from our lair.
With tests to check and code refined,
A safer path for all aligned!" 🐇
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
PR to add fee Vault threshold to prevent indexer spam for fee deposited events, as was discussed in the Informal Systems audit
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests
Chores