repurchase agreements are almost always over-collateralized
the borrower undervalues the collateral by a percentage (haircut) - this is a buffer against price volatility
the purchase and repurchase price are computed over the post-haircut value
so if you have a UST bond worth $100:
lender applies a haircut (e.g. 2%) - 100*(1-0.02)=$98
lender sets a repurchase price (e.g. $98.013)
so you use your $100 bond to get a $98 loan, for which you must repay with a fee (interest) $98.013
in the end, you get your UST bond back
and it makes sense for you to repurchase the bond (collateral) even if the price falls
as long as the price fall is < ≈haircut (2% in our case)
repo markets are HUGE - about the size of USD M2!
they underpin the global financial system
however, there's not many DeFi protocols addressing this part of the market
i may pick it up in the near future
if you're working on something similar - hit me up!
remember those HUGE repo markets that I talked about?
US bonds/treasuries are the favorite collateral for those transactions
and that's why they're not going away anytime soon
but of course, the financial system is slowly diversifying