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
! Don't make quotes that would cause a swap to fail if supply/borrow caps exceeded
2
+
* Better revert messages when a swap fails due to maglev debt-limit/vault utilisation/etc
3
+
* currently it's an arithmetic underflow
4
+
5
+
6
+
TESTING
7
+
8
+
* when exchange rate in vaults != 1
9
+
* uniswap callback, flash swaps
10
+
* hitting reserve/utilisation limits
11
+
* AssetsOutOfOrderOrEqual
12
+
13
+
14
+
MISC
15
+
16
+
? A really small swap could fail because deposit() results in 0 shares, which causes EVK to revert. Call convertToShares() first? Seems like overkill...
17
+
? permit2 instead of regular approval: measure gas savings
18
+
* Improve the efficiency of on-chain quoting
19
+
* Probably necessary for supporting non-zero slippage swaps
20
+
* Use unchecked math in verify() (needs careful boundary analysis)
21
+
* Closed-form quoting solutions
22
+
* "Range hints" for the binary search
23
+
24
+
25
+
IDEAS
26
+
27
+
* Currently we have only been supporting stable-stable pairs
28
+
* What extra considerations would there be for floating pairs?
29
+
* Automatically re-invest fees? There are a few options:
30
+
* Don't do anything: Re-deploing probably isn't a huge deal
31
+
* Increase the reserves by the fee amount
32
+
* Increase the reserves by the extra amount of possible leverage supported by the new fee
33
+
* Apply fees to a super-concentrated middle section of the curve (needs R&D)
34
+
* Could current reserves be calculated dynamically based on balances/debts/debt limits?
35
+
* I guess you would lose a chunk of interest to arbitrage
36
+
* Donation attacks?
37
+
* What can we do to make this easily integrated with aggregators/MEV bots/etc?
38
+
* How to handle a discovery/tracking of the different Maglev instances?
39
+
? Factory? Registry? Maybe a fake factory that reads the actually installed operators from a set of addresses?
40
+
? Transparent proxy so a Maglev address can stay constant
0 commit comments