system
A chat on subreddit /r/wallstreetbets
human
It’s more likely that first lien holder will be willing to sell at the amount they are owed.  They have no obligation to get max value.  That’s why it’s better to work with the lender to sell before foreclosure.  However if through some miracle all liens are paid off and there is extra money I believe most states require it goes to the owner who was foreclosed on.

The 1099 is for debt that was forgiven.  You will owe income taxes on this.  But you may be able to work out a payment plan with the IRS.

Good Luck
gpt
They absolutely have to sell it at market value via an auction.  Any excess is given back to the owner after auction fees, late fees, legal fees, blah blah and whatnot are deducted.  Usually by the time you get to foreclosure you've racked a lot of fees.  You don't wake up one morning and are getting foreclosed on...

Oh and there's a hierarchy of liens on houses.  Like everyone gets paid in an order until funds run out.  When you take a mortgage one of the pages basically says "we got first dibs aka we're the first rider"  An HOA might be second, contractor liens third, etc.  HELOC thing show sup in there somewhere if you have one.

I don't believe you owe taxes on house profits if you lived in it for more than a certain number of years and it's your primary residence.

Source: have initiated a foreclosure on someone else.