First, please understand I am not bashing your friend or anything, just trying to give you some advice. And it could all work out great if you ignore everything I am saying, but those aren't the times you worry about, it is when things are rough you have to plan for.
As for why I said don't compare this to a staffing agency. Technically that was probably wrong or maybe just too strong, you could compare it but I just think that is a mistake.
To me outside of all the rules around agencies the key difference is this: If you were introduced and went through a series of interviews just like an employee would then that is a typical agency placement. If instead, you sold your services through either writing up a proposal, or estimates and a timeline etc then you are an independent contractor. For me when I refer a friend they are going to have to do all the work, such as, write their proposal, and sell/close the client. My referral is just to get them to the right person who can make a decision, but they have to do the work to "win" the client. In the case I help them win the client then that is where I do expect more of a one time referral fee.
In your case if your friend already had the client under contract and just said hey, I have a good candidate for your open position (you), then yea the agency model fits. If instead you were introduced to the client and had to write up a proposal and sell or close the client then that is a referral and is not an agency model. Hopefully that makes more sense.
So with that in mind, here are my follow up's to your questions/comments
---
1. The work might be interesting but if your friend is only making an intro it isn't a fair deal. As for how to proceed, you have to approach him and be honest and say the deal is highly one sided with 0 risk for him and all the risk for you which is not fair.
2. Let's assume the following: His company is small and unable to guarantee your pay. Your contract is with his company not the client. Given that, you have 0 recourse against the real client but are expected to do all the work. So you would be screwed if the client disputed any invoice, failed to pay etc. In the end you'd be left holding the bag and bills without getting a check, not your friend. Sure your friend loses his 25% cut, but you lose actual time spent and hours you could've been working on a direct client where at least you could sue them for recourse, or settle for less than the full amount or whatever.
3. I will make intros for people, and I do it pretty regularly. For friends I don't ask for a penny because they are a friend (with an exception for high dollar contracts >$100k generally). For acquittances, if all I do is an intro and nothing else, than depending on the person and the client I have charged nothing to the max of 12%. Generally if I am asking for a referral fee, I have done some work to help you land the deal not just get a phone call back. The more work I do to help you land a gig the higher percentage I want. But after that initial gig, the client is yours to sell to without paying me a dime because I wouldn't be doing anything after that, you keep or lose the client on your own merit.
As for talking with your friend. I'd have a chat with him about the liabilities, the needs and about the risks for everyone. If he only sees it his way then he might be a good friend but not a good person to do business with (I have a few of those myself). I do think you should offer him a fair referral fee, say 10% or so depending on the contract value. It sounds like he is trying to establish his business and doesn't have the necessary skill to fulfill this contract so wanted to bring you in but still have his name established with this business. There isn't any issue with this honestly, but he is taking no risk so his demands are out of line with what is reasonable. If he was PM'ing the project and staying involved etc then his idea is much more fair.
If you want to chat offline you can find my personal email in my profile and I am always happy to jump on a call to just give you my 2 cents. Doesn't mean I am right all the time, but I do have a lot of experience around building consulting groups.