Skip to content
MeridxBSC testnet
     9        8  x     e   %e 9    1         1              $   1         e                       4    i 1 xx          e   2     $ erx        i 3  e    $       2 e 90 2                    $     1 9      i    x       r       8      x  x   7x x      6    5     i 9    4   x    x0            4        i       d      3    e    x   m         0    1 e 9      $      2           1      %  5  9   5    i   %3              6   4$0  4 0           0      x  8        3 1 m e i4 5                 9  5   50   5   4                          $    0%       2 e                        7          x        8           6   5              i       5     2  $   r      7 x  %             0     5             4            3      m       x  33                                                                                        id60                             3       6 r               9    5           0       e                    $                       i%   d           d                                                            31                         %i    633x                                                                                                                   e    r                                          0x3     m   01          m   $2%7   4         % 3  1   2       8               x d   m4  4              r                                                       7544                     07%03e4  62d0                                                                                                                   $    6                                         7                  x     i    r                                               %    3       d     6       2                                                     13xxi7             r71e0r113  1                                                                                                                            x38$                                   5 m4      5       6  i   i          9    0                i           9      x          x               2  x   i                                                     147mm$%4      midre6e$                                                  % 5   %  98         2            x xx r                     %   r     e  i1    $ $ 3 d     6      x      i    x                                                        9r7x%0r8mi     m                                                       e2     m4  x  3$     %0     6  4  x xi      86                   e    6    i    $ 5           0 x6    x6     %       d                                                  989m    028%                                                                                                                x895                                                                     8  4      6 r     i2xx   7 $   r      2  9                  x  %   8                     7      2                                                                  $x   9r   9ex                                                                                                             ee%  $e2                                                              $   rr 9  $ 1 x           x       x r4   4                    9   $ 5 m167 x        5      x  4    m2   5   1  6     d                                                       82                                                                                                                $e0 7r  1x 7xr                                                                                                             d      %                                                             x   ri2       m2         1         r     4   51                %             m  %43                                3                                                          re                                                                                                                60  4$  i%  xi                                                                                                            x1      2m                                                                %       8       x         8 1    ed    d                     02             d 6      $  26  9          2   3  r                                                     0%8  rxd6  581                                                                                                             x3    ii                                                             x  e   2  x2  3 i        e 5d     m  9  7  3 3                     m   e  i 4d e        i        $ 5   7  d %   28                                                      x8r4      dem6                                                                                                              xe8i3x                                                             0       d      d   1           x    x     %                            m  er $                   8    i9       %       4                                                $8m26      9x43i                                                                                                             37e51d                                                             x           1  5m   e $5  6     %    0         0                                7   x   0   5x   0 6 $  4    1   $                                                      $2%86      e383e                                                                                                             i37367                                                                               8x7    m   3       82   0                            8 %              i  28                      4 34                                                  %r0d      1i9i                                                                                                              $9rxr0                                                               78     9  r$    rrx                   %i   29                            e                  x       $x e   8  6   6 1                                                   rd$4    $8ix                                                                                                                %102                                                                        1    1     x         $           x  7  i                 d 4               86         2 3    %9  54   6   x                                                      i7%4471456                                                            5    1    x     r2   2   %3     7                           2e      9    9    x         x        i                 r  0                                                    7x%249xd                                                                           7      e           x%     6              i       %    mi m 0%       $  % % i    0       $   0    x x     2       4          4     i              m%    x      x    $   8       $5 9$ r  1 9   3  9e   5 $          4  2  9  7 86    8        x         0       5 %    $ x    x       1     0         4        5      x      5       r     2  5  9            9             6 2  %1  1    e   6  $       $ 42    5        9      7                       $                   $   1  0 e              2    3 x   m   67   3   1    1 r         % r         9%   7    0   7      d r       7     m%e      x   0         7         1 x                   2     r    0 3      0    2          8 x      %         1         9     9       5 d           3  %                                   x %    3           9 3         818  $5 9            m %7 3    % 0x…dEaDSETTLER

Risks

Read these before you lock a token.

An unpaid loan burns

Repay before someone settles, or lose the collateral.

BORROWDUE+1 DAY1 TO 30 DAYSREPAY ANY TIME UNTIL SETTLEDTHEN ANYONE MAY SETTLE99% TO 0x…dEaD1% SETTLER
  • The vault never sells. It burns.
  • Due after 1 to 30 days, plus 1 day of grace.
  • Repaying stays open until the settle lands.

The Flap Guardian can move everything

They exist because Flap requires them (rule 009 and SYS-REQ-RESCUE-MECHANISM). They are stated in the vault's schema description.

Flap Guardian0x76Fa…6950
  • Replace the vault implementation through the beacon
  • Move the vault's whole BNB balance to an address it names
  • Move the vault's whole balance of any ERC-20 to an address it names, including USDT and the borrowers' locked collateral
  • Redirect incoming native tax

After a rescue

  • The ledgers are written down in the same transaction
  • Loans stay booked
  • If collateral was moved, repay() and settle() revert on the token transfer until the Guardian restores it or upgrades the vault

A rising token is valued below market

The reference climbs at most 5% per daily close.

1 close1.05x
7 closes1.41x
30 closes4.32x
60 closes18.68x
  • It starts no higher than the listing price.
  • A fall reaches the lending price at the next hourly close.
  • Try the price clock

Capacity is first come, first served

Borrowing stops at 50% of the pool or at the pair cap.

Manipulation, measured

A token aged 40 days, a 2,000 BNB pool so that only the price and pair limits bind, an attacker who locks just enough collateral, and nobody else trading.

attacker losesattacker gainsP&L in BNB
  1. 10 BNB 1 day testedprice 2.41x, ref 1.04x−7.60 BNB
  2. 40 BNB 1 day testedprice 10.4x, ref 1.04x−10.01 BNB
  3. 160 BNB 1 day testedprice 97.6x, ref 1.04x−10.94 BNB
  4. 40 BNB 7 days testedprice 10.4x, ref 1.40x−7.96 BNB
  5. 160 BNB 7 days testedprice 97.6x, ref 1.40x−8.78 BNB
  6. 40 BNB 30 days testedprice 10.4x, ref 4.32x−2.55 BNB
  7. 160 BNB 30 days testedprice 97.6x, ref 4.32x−3.15 BNB
  8. 40 BNB 60 days reportedprice 10.4x, ref 10.38x−0.99 BNB
  9. 160 BNB 60 days reportedprice 97.6x, ref 18.67x+3.02 BNB
  1. 40 BNB 1 dayearlier design+0.89 BNB
  2. 160 BNB 1 dayearlier design+13.6 BNB

The last row is the one case that pays. It needs a ~100× pump that nobody sells into for two months, while the attacker's 160 BNB sits in the pair. The pool's loss is bounded by the pair cap, 7.8 BNB there.

A pump held across the first daily close

Pump, borrow, default, sell143.7
Just sell157.0

Loans taken: 2.49 BNB. The earlier design paid the attacker +12.93 BNB.