Risks
Read these before you lock a token.
An unpaid loan burns
Repay before someone settles, or lose the collateral.
- 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.
- 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()andsettle()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.
- 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.
- One borrower may hold the whole pair cap.
- It costs 10% APR and at least 3.3x the loan in collateral.
- Room comes back when loans are repaid.
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.
- 10 BNB 1 day testedprice 2.41x, ref 1.04x−7.60 BNB
- 40 BNB 1 day testedprice 10.4x, ref 1.04x−10.01 BNB
- 160 BNB 1 day testedprice 97.6x, ref 1.04x−10.94 BNB
- 40 BNB 7 days testedprice 10.4x, ref 1.40x−7.96 BNB
- 160 BNB 7 days testedprice 97.6x, ref 1.40x−8.78 BNB
- 40 BNB 30 days testedprice 10.4x, ref 4.32x−2.55 BNB
- 160 BNB 30 days testedprice 97.6x, ref 4.32x−3.15 BNB
- 40 BNB 60 days reportedprice 10.4x, ref 10.38x−0.99 BNB
- 160 BNB 60 days reportedprice 97.6x, ref 18.67x+3.02 BNB
- 40 BNB 1 dayearlier design+0.89 BNB
- 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
Loans taken: 2.49 BNB. The earlier design paid the attacker +12.93 BNB.