In the event that pursuant to the terms of the public works contract it is necessary to deduct any sum from retained earnings, the state or governmental unit or agency thereof shall first apply the deduction against sums not withdrawn and thereafter from the proceeds of the sale of any securities deposited or from the income earned on those securities, whichever is applicable.
R.I. Gen. Laws § 37-12.1-3