People sometimes get money gifted to them, to be used as a down payment for the purchase of a property. (FYI, lenders often require the gifting party to be a family member)
In cases like these, lenders often (if not always) require the gifting party to to sign a gift letter saying the funds aren’t required to be repaid.
If you won the lottery and wanted to pay the gift back, that’s fine.
But, if you promise to pay them back (by way of another secret document – that you don’t give to the lender/broker – or even “just” by way of a verbal agreement), without telling the lender/broker about the alternate arrangement, this would not be fine.
(The latter case, above, would be known as “lying”. And, on that note, take a quick gander at this short post on the 1st, 2nd and 3rd rules of lending)
As prescribed in the aforelinked post, when in doubt, ask the lender/broker if they’re okay with what you’re proposing (ie. borrowing a down payment from a friend or family member).