According to
Investopedia, the repurchase agreement, or repo,
is an agreement between two parties in which the first party borrows some funds
from the second party with certain securities as collaterals, such as stocks,
bonds, or government securities, with the promise that the first party would
buy back the collaterals (thus the second party will get their money back).
Usually the value of the loan is lower than the value of the collateral, for
example A borrows Rp100,000,000 from B with 100,000 shares of X as collateral, at
a price of Rp1,000 per share (so the loan value is Rp100 million), while the
stock price of X in the market was higher at Rp1,500. In theory, if A later can
not repay the debt, then B could just sell the shares of X that he holds in the
market, so he will still make 50% profit.