Hilchos Ishus 5:23
Let’s say that a man asks a woman to be consecrated to him through a dinar and to accept some other object as security until he gives her the dinar. In such a case, she is not consecrated because she didn’t receive the dinar and the security wasn’t given to her to be her own property. If a man is holding onto collateral for a debt that is owed to him by a third party, and he gives this woman the collateral as kiddushin, marriage is effected even though it doesn’t belong to him. This is because a lender has certain rights when it comes to the collateral.
Hilchos Ishus 5:24
If a man asks a woman to be consecrated to him with a dinar on the condition that she gives it back to him, marriage is not effected whether or not she returns it. If she doesn’t return it, the condition has not been met, while if she does return it, she will not have received any benefit because he gave her nothing.