Basis/carry yield in expiring futures ≈ funding rate in perpetual futures
Both converge futures price with spot via an arbitrage incentive - long undervalued, short overvalued
Profits are realized once at expiry for basis, and periodically for funding rate (e.g. every 8h)