func: function redeem(address _series) public {
          OptionSeries memory series = seriesInfo[_series];
  
          require(now > series.expiration + DURATION);
  
          uint unsettledPercent = openInterest[_series] * 1 ether / totalInterest[_series];
          uint exercisedPercent = (totalInterest[_series] - openInterest[_series]) * 1 ether / totalInterest[_series];
          uint owed;
  
          if (series.flavor == Flavor.Call) {
              owed = writers[_series][msg.sender] * unsettledPercent / 1 ether;
              if (owed > 0) {
                  msg.sender.transfer(owed);
              }
  
              owed = writers[_series][msg.sender] * exercisedPercent / 1 ether;
              owed = owed * series.strike / 1 ether;
              if (owed > 0) {
                  require(usdERC20.transfer(msg.sender, owed));
              }
          } else {
              owed = writers[_series][msg.sender] * unsettledPercent / 1 ether;
              owed = owed * series.strike / 1 ether;
              if (owed > 0) {
                  require(usdERC20.transfer(msg.sender, owed));
              }
  
              owed = writers[_series][msg.sender] * exercisedPercent / 1 ether;
              if (owed > 0) {
                  msg.sender.transfer(owed);
              }
          }
  
          writers[_series][msg.sender] = 0;
      }