There are more ways to structure a codeshare agreement than might be apparent on the surface. I've negotiated codeshares that were based upon "hard blocks", "soft blocks", "moving block", "free sales", "revenue sharing", "open sale", "sell and report" and various other systems.
In a "hard block", the operating carrier makes available a fixed number of seats to the marketing carrier. This is usually done on a fixed cost per seat basis. The marketing carrier then applies its own yield management to these seats and sells them in competition with the operating carrier. If the marketing carrier fails to sell all the seats, then they go empty.
In a "soft block", the marketing carrier reserves the right to return to the operating carrier any unsold seats at various given points in time. Their liability to the operating carrier is reduced accordingly. The payments due may vary depending on whether the operating carrier is able to resell the seats returned.
In a "moving block", the marketing carrier guarantees a minimum number of sales over a given period based upon inventory ranges made available by the operating carrier. These ranges may be fluid or prenegotiated or a combination of both depending on specific operational day.
In a "free sale", the marketing carrier sells the operating carrier's inventory without any restrictions at either mutually agreed fares or unilaterally set fares.
In an "open sale", the marketing carrier sells the operating carrier's inventory until the operating carrier stops them from selling any more.
In a "sell and report", the marketing carrier sells the operating carrier's inventory independent of the operating carrier's systems and simply updates the systems subsequently with details of sales completed.
In a "revenue sharing" system, the marketing carrier and the operating carrier share all costs and revenues in pre-determined proportions, irrespective of who the actual cost may be incurred by or where the revenue may have been generated. This is the system used by most alliances who have attained anti-trust immunity.
Beyond this there are further restrictions as to traffic rights and markets in which the codeshares may be marketed and the settlement procedures and whether surcharges may be applicable and literally hundreds of other possibilities.