When you deposit CKB in the NervosDAO, those funds are locked in a smart contract for at least ~1 month and will earn interest immediately.
The Annual Yield Rate (APY) automatically compounds, therefore, you do not need to withdraw and redeposit funds at the end of the month to gain compounding interest.
Since NervosDAO is not staking in the traditional sense, but acts as an inflation shelter, the earned interest is automatically compounded upon withdrawing funds.
The smart contract that locks your funds into the NervosDAO calculates the following:
When you deposited the funds in the Nervos DAO.
When the withdrawal request was made.
Calculate the rewards and compounding interest for the period.