You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does not automatically imply large APY error; it usually starts as tiny base-unit rounding.
235
+
236
+
Approximate 18-decimal token magnitudes where floating spacing reaches:
237
+
238
+
-`1e-12` tokens at ~`4.72e3` tokens
239
+
-`1e-9` tokens at ~`4.84e6` tokens
240
+
-`1e-6` tokens at ~`4.95e9` tokens
241
+
-`1e-3` tokens at ~`5.07e12` tokens
242
+
-`0.1` tokens at ~`6.49e14` tokens
243
+
-`1` token at ~`5.19e15` tokens
244
+
245
+
At runtime, the math layer emits a one-time warning per market when estimated token spacing reaches `1e-6` tokens or higher.
246
+
213
247
## Custom Constraints
214
248
215
249
The `findMaxDeposit*` and `findMaxWithdrawal*` functions accept an optional `constraint` callback that adds custom criteria beyond APY impact. The binary search finds the largest amount satisfying **both** the APY impact threshold and the custom constraint.
0 commit comments