Bug: Rate limit blocks withdrawExecute after fee deduction reduces amount below minimum #100
Labels
No labels
agent:implement
agent:ready
backend
bug
cannot-reproduce
confirmed
desktop
docs
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
high-risk
in-review
invalid
mobile
needs-triage
P0-critical
P1-high
P2-medium
P3-low
qa
QA
question
ready
report
responsive
security
security-escalate
smart-contract
solana
tablet
test-pass
ux
wallet-issue
wallet:keplr
wallet:metamask
wallet:station
wallet:walletconnect
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-bridge-monorepo#100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mainnet v0.1.82 (
179afcb)Current behavior: opBNB->BSC (nonce 3, hash 0x0ce3c003...) and BSC->opBNB (nonce 30, hash 0xb952b402...) both stuck at Approved. Operator cannot execute withdrawExecuteMint because the post-fee amount falls below the deposit rate limit minimum. Transfers are approved but permanently stuck.
Expected behavior: Operator should be able to execute approved transfers. Rate limit checks should account for fee deduction, or the frontend should prevent deposits that will result in post-fee amounts below the withdrawal minimum.
Design choices needed:
Affected transfers:
Context: opBNB test token rate limits are very small (~0.005 testa) due to default 0.0001% of supply. Deposit succeeded with small amount but withdrawal execution is blocked by the same rate limit after fee deduction.
mentioned in commit
b9c6d54e0bFrontend change pushed to
main(b9c6d54) to mitigate deposits that pass the old gross-only minimum but fail withdraw execution after the bridge fee: we now validate against post-fee net vs the destination minimum, show the minimum send (gross) in the MIN label, and added a MIN preset that sets gross so net clears min + 1 base unit after fees.This does not change contracts or unblock already-stuck transfers; it reduces new stuck "Approved" cases from small amounts + tight rate-limit mins.
@brouie Could you QA on a route with a small
minTransfer(e.g. test token) and confirm MIN + submit behave as expected?/cc @brouie
mentioned in issue #105
@PlasticDigits Verified fixed on build v0.1.82 -
f227b6f(frontend bundle main-CvcBOh67), 4/20 mainnet.Test route: opBNB -> BSC, testa (tight rate limit chain)
MIN shown: 0.1005 (gross)
MAX shown: 2.046 (balance 2.046497)
MIN preset
Clicked MIN -> fills 0.100503 gross, YOU WILL RECEIVE shows 0.10 TOKENA-CB net (post 0.5% fee). Math checks out: net clears destination minimum + 1 base unit after fee as designed.
Below-MIN block
Entered 0.05 (below MIN 0.1005) with recipient filled. BRIDGE EVM TO EVM button shows blocked icon overlay and is not clickable. Net shown 0.04975.
MAX preset
Clicked MAX -> fills 2.046497 (full balance), YOU WILL RECEIVE 2.036265 net. Button active and clickable.
All three behaviors work as described in
b9c6d54. Closing.mentioned in issue #108
mentioned in issue #111